Altering the damage math?
Posted: Tue Nov 18, 2014 8:38 pm
I'd like to do a bit of a redesign of items, skills, and stats, and for that I need to somehow get access to the engine's damage calculations. Specifically, what I want to do is make it so that different kinds of weapons vary in terms of a multiplier they apply to the relevant damage stat, rather than varying in their base damage. I figure there must be some way to do this kind of thing, because the skills like Heavy Weapons apply a percentage damage bonus to each hit.
For example, right now there's a sort of subtle multiplier effect going on where faster weapons effectively receive bigger bonuses for large stats, because they apply the stat more often during the DPS calculation. So e.g. a barbarian with super-high strength might well be better off wielding a Longsword than a Great Axe (in an extreme case, at 50 Strength, the Longsword does 2/3rds more damage before taking skills into account). Whether or not that's a good state of affairs is one thing, but it's a bit counter-intuitive since the Great Axe appears to have better stats (even if you calculate the DPS naively and factor in cooldown time but not the character's strength score).
What you could do to make this a bit more obvious would be to make it so that weapons automatically factor in different cooldown rates when applying damage from stats - so a weapon with a 7sec cooldown applies 2xStrength, whereas a weapon with 3.5sec cooldown applies 1xStrength. That's just one example of course. Other possibilities include things like giving damage bonuses against specific kinds of enemies (magic sword vs insects), adding magic items which have effects such as 'increase strength contribution to damage by x%', creating a mechanic whereby Dexterity gives you increased armor penetration even as a heavy weapons character, etc.
So I'd like to ask, does anyone know where these calculations are done by the engine, and is it somewhere that is accessible through scripting?
For example, right now there's a sort of subtle multiplier effect going on where faster weapons effectively receive bigger bonuses for large stats, because they apply the stat more often during the DPS calculation. So e.g. a barbarian with super-high strength might well be better off wielding a Longsword than a Great Axe (in an extreme case, at 50 Strength, the Longsword does 2/3rds more damage before taking skills into account). Whether or not that's a good state of affairs is one thing, but it's a bit counter-intuitive since the Great Axe appears to have better stats (even if you calculate the DPS naively and factor in cooldown time but not the character's strength score).
What you could do to make this a bit more obvious would be to make it so that weapons automatically factor in different cooldown rates when applying damage from stats - so a weapon with a 7sec cooldown applies 2xStrength, whereas a weapon with 3.5sec cooldown applies 1xStrength. That's just one example of course. Other possibilities include things like giving damage bonuses against specific kinds of enemies (magic sword vs insects), adding magic items which have effects such as 'increase strength contribution to damage by x%', creating a mechanic whereby Dexterity gives you increased armor penetration even as a heavy weapons character, etc.
So I'd like to ask, does anyone know where these calculations are done by the engine, and is it somewhere that is accessible through scripting?