Modding weapon accuracy. |
Lately, i have been trying to mod how weapons works. One neat idea i was trying to implement was to have an optimal range for each weapons. In practice, i mean a range at wich the weapon would be at it's most accurate/damaging. Right now, it's linear, either it drops or it increase, not both. What i want is the weapon accuracy/damage to rise up to a point then drop (an idea taken from EVE Online). I tryied several formulas but it seem the engine don't support it, or at least, if it does, it won't display it properly when you look at the weapons stats.
Here an exemple of what i mean
Range : 10 20 30 40 50 60 70 80 90
Damage : 5 10 15 20 15 10 5 0 0
Accuracy :-20 -10 0 -10 -20 -30 -40 -50 -60
But i just can't make it works
. The game don't seem to be able to to make it rise then drop, it either rise or it drops...

Parabolic shaped formula is what your looking for.
You need to make a parabolic formula y=-1*(x^2)/8 or something like that... but It's been too long from any math class I've taken... I can't figure out how to displace the curve on the X axis. Right now that curve places the high point of the curve at 0,0 and you want the high point at about 3 or 4.
As a side note I kind of like the parabolic drop off of the chance to hit, rather that a liner drop off.

I've got something that
I've got something that might work...
(-1*([%Range%]^2)/5)+[%Range%]
This produces at parabola with it's peak at about 2, right now it actually peaks and would be giving you a 12% bonus at range 2. You can play around at fine tune the numbers. I'm using devnull's editor with that formula wizard it has. it's pretty cool.
Negative

apparently SEV can't "parse"
apparently SEV can't "parse" my formula. I'm not sure what exactly that means. I guess it means the formula is too complicated??? Does anyone else have any thoughts?
Why have the ability to input formulas if there's a point where the formula is too complicated?

(-1 *(([%Range%] ^2)/ 50)+ (1.5 * [%Range%])) - 27.88
The "parse"ing problem was acutally due to the SEV needing spaces in the formula. You can do complex formulas. I suppose you could do iif statements also but this formula produces what your looking for:
(-1 *(([%Range%] ^2)/ 50)+ (1.5 * [%Range%])) - 27.88
this produces a:
10 20 30 40 50 60 70 80 90 100 110 distance
-15 -6 -1 0 -3 -10 -21 -36 -55 -78 -105 accuracy%

Parsing
Why have the ability to input formulas if there's a point where the formula is too complicated?
SEV is really piicky about formulas. Add extra spaces wehver they could POSSIBLY fit and it generally fixes the problem... generally.
_______________________
There are 10 types of people in the world:
Those that understand binary, and those that don't.

Try Forcing the math
Try "forcing" an absolute value based equation.
(("x"^2)^(1/2)) where X is range-40 for example, would produce a linear form of the above equation.
_______________________
There are 10 types of people in the world:
Those that understand binary, and those that don't.




.
Math formulas
What formulas did you try and use to get it to rise adn drop? The one that comes to mind for that is a power formula, though I don't think you can do linear shifts with it. Either that, or use a combination of IIF conditionals to have two seperate formulas.
_______________________
There are 10 types of people in the world:
Those that understand binary, and those that don't.