Modding Weapons...
Posted: Mon Mar 26, 2007 3:33 pm
Don't recall seeing this here, so I thought I'd mention it, in case people are having issues with modding weapons - specifically low end beam lasers.
In the damage calculations there appears to be an integer conversion, or at least some form of clamp... in that:
For a weapon with: damage = 10, charge = 0.8, life = 0.2, you will see no damage at all. Even if you make damage = 8, charge = 1, you still see no damage.
However, if you change charge to 10, so that life * charge > 1, suddenly you get some actual damage!
What I suspect is that there's something like:
(int)true_charge=(int)(charge*life)
real_damage=(damage*true_charge*(length-actual_range))/length
Not sure if damage is a float or not (ie. whether damage =0 .5, charge = 20, life =0.2 would actually result in any damage). Systematic testing is not my forte, but I may get round to it.
In the damage calculations there appears to be an integer conversion, or at least some form of clamp... in that:
For a weapon with: damage = 10, charge = 0.8, life = 0.2, you will see no damage at all. Even if you make damage = 8, charge = 1, you still see no damage.
However, if you change charge to 10, so that life * charge > 1, suddenly you get some actual damage!
What I suspect is that there's something like:
(int)true_charge=(int)(charge*life)
real_damage=(damage*true_charge*(length-actual_range))/length
Not sure if damage is a float or not (ie. whether damage =0 .5, charge = 20, life =0.2 would actually result in any damage). Systematic testing is not my forte, but I may get round to it.