I've been working through the tutorials and how-tos on equipment and combat and am trying to work out how to do something.
Say I have two types of weapons: physical (clubs etc) and projectile (guns etc). I want the damage value for physicals to be calculated using character strength (as in the tutorial). But for projectile weapons I want the damage to be a fixed amount dependant purely on the weapon.
I can see how to define different attack types using Attack Attributes. I guess I'd then change the damage calculation formula to branch according to the weapon's attack type. What I can't work out is how to assign an Attack Attribute to weapons. The tutorial defines Cut, Stab etc but I can't see where it attaches these to weapons.
Have I missed something obvious or am I going about it in entirely the wrong way?
Switch dropdown from Element to Attack Type.
My original thought was to branch the formula dependent on a flag but this isn't a flag so there's no way to test it.
So I guess the best thing for me to do is have a sub formula for 'Physical damage' which multiplies character strength bonus by the Physical attribute value - Projectile weapons will have 0 for the attribute so this will effectively ignore it. Then another sub formula for Projectile damage etc then add them all together in the main damage formula.
Similarly I'd use sub formulae to build up the Hit Chance formula.
Looks like I'm going to have to get used to thinking in terms ofsub-formulae and multiplying by zero rather than branching!
My head hurts...
It seems to work, but I feel a bit guilty about effectively removing a whole chunk of functionality (the basic Attack mechanism). Please let me know if I've done something really stupid!
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!