Norbyte / ositools

Advanced scripting and mod support for Divinity Original Sin 2
MIT License
376 stars 30 forks source link

Base Damage Example Calculation #63

Open bryanbrunt opened 3 years ago

bryanbrunt commented 3 years ago

I'm looking at Game.Math.lua and it isn't clear how Base Weapon Damage is calculated.

For example, a Level 1 dagger has a value of 55 for DamageFromBase. The calculated damage for the dagger is 21-22.

How is 55 translated into 21-22?

Norbyte commented 3 years ago

Hi,

DamageFromBase is a % value that scales the MinDamage and MaxDamage fields. So 55 means that the damage range of the weapon is 0.55*MinDamage .. 0.55*MaxDamage.

bryanbrunt commented 3 years ago

Thanks for the info.

Where are MinDamage and MaxDamage calculated? I'm not seeing fields for those values in the Stats Editor.