Hi, I have a big question about the capabilities of Stratagus' engine. Is it possible for a single unit type to do different amounts of damage to different types of other units?
So, say I have three kinds of units: a Pikeman, an Archer, and a Knight. Would it be possible for the Pikeman to do, say, 8 damage to the Knight and only 4 damage to the Archer?
I have noticed that the game does define 'BasicDamage' and 'PiercingDamage' separately, but I have no idea what these do, especially since I see only one type of Armor.
Note that I am looking only at Aleona's Tales, so I have no idea what the differences are between it and other Stratagus games.
Dealing Different Damage to Different Units
-
- Posts: 8
- Joined: Tue Mar 10, 2015 4:11 pm
Re: Dealing Different Damage to Different Units
Yes, it is possible to do that. cybermind did something like that in his Doom Wars, for instance. In fact, the damage formula can be entirely redefined through Lua =)PerseusSpartacus wrote:Hi, I have a big question about the capabilities of Stratagus' engine. Is it possible for a single unit type to do different amounts of damage to different types of other units?
So, say I have three kinds of units: a Pikeman, an Archer, and a Knight. Would it be possible for the Pikeman to do, say, 8 damage to the Knight and only 4 damage to the Archer?
I have noticed that the game does define 'BasicDamage' and 'PiercingDamage' separately, but I have no idea what these do, especially since I see only one type of Armor.
Note that I am looking only at Aleona's Tales, so I have no idea what the differences are between it and other Stratagus games.
Re: Dealing Different Damage to Different Units
Just take a look into Doom Wars documentation (located in /doc/doc_en.html from the Doom Wars directory), I have described there all information about damage type system of Doom Wars. The damage calculation formula is located in /scripts/stratagus.lua file (SetDamageFormula function).
-
- Posts: 8
- Joined: Tue Mar 10, 2015 4:11 pm
Re: Dealing Different Damage to Different Units
Thank you so much. This really defines how I will approach the design of my game, so it helps a lot to know what I can do.
-
- Posts: 8
- Joined: Tue Mar 10, 2015 4:11 pm
Re: Dealing Different Damage to Different Units
Sorry to be a bother, but the download for Doom Wars is just way too big for my internet connection, so is there any chance you could give me the relevant code for this? I would be eternally grateful.cybermind wrote:Just take a look into Doom Wars documentation (located in /doc/doc_en.html from the Doom Wars directory), I have described there all information about damage type system of Doom Wars. The damage calculation formula is located in /scripts/stratagus.lua file (SetDamageFormula function).
Re: Dealing Different Damage to Different Units
Here are the two files:PerseusSpartacus wrote:Sorry to be a bother, but the download for Doom Wars is just way too big for my internet connection, so is there any chance you could give me the relevant code for this? I would be eternally grateful.cybermind wrote:Just take a look into Doom Wars documentation (located in /doc/doc_en.html from the Doom Wars directory), I have described there all information about damage type system of Doom Wars. The damage calculation formula is located in /scripts/stratagus.lua file (SetDamageFormula function).
https://dl.dropboxusercontent.com/u/173 ... oc_en.html
https://dl.dropboxusercontent.com/u/173 ... atagus.lua
Hopefully cybermind won't mind me posting them here.
-
- Posts: 8
- Joined: Tue Mar 10, 2015 4:11 pm
Re: Dealing Different Damage to Different Units
Thank you so much. I'm sure I'll need more help in future, but what you've given me so far has been huge - literally game-changing, in fact.