Recoil - ((math.sqrt(STR*1.5)-(5))
ah that makes more sense now more strength=more accuracy and higher number=higher accuracy loss
for x in itertools.product(range(1,7),range(20,71,10)): print (x,x[0]-(math.sqrt(x[1]*1.5)-5))
(1, 20) 0.5227744249483388
(1, 30) -0.7082039324993694
(1, 40) -1.745966692414834
(1, 50) -2.6602540378443873
(1, 60) -3.486832980505138
(1, 70) -4.246950765959598
(2, 20) 1.5227744249483388
(2, 30) 0.2917960675006306
(2, 40) -0.745966692414834
(2, 50) -1.6602540378443873
(2, 60) -2.486832980505138
(2, 70) -3.246950765959598
(3, 20) 2.522774424948339
(3, 30) 1.2917960675006306
(3, 40) 0.25403330758516596
(3, 50) -0.6602540378443873
(3, 60) -1.4868329805051381
(3, 70) -2.246950765959598
(4, 20) 3.522774424948339
(4, 30) 2.2917960675006306
(4, 40) 1.254033307585166
(4, 50) 0.3397459621556127
(4, 60) -0.4868329805051381
(4, 70) -1.246950765959598
(5, 20) 4.522774424948339
(5, 30) 3.2917960675006306
(5, 40) 2.254033307585166
(5, 50) 1.3397459621556127
(5, 60) 0.5131670194948619
(5, 70) -0.24695076595959797
(6, 20) 5.522774424948339
(6, 30) 4.291796067500631
(6, 40) 3.254033307585166
(6, 50) 2.3397459621556127
(6, 60) 1.5131670194948619
(6, 70) 0.753049234040402
in my opinion the points: "it is not obvious what is a useful value"/"behaviour a bit unpredictable" are still valid
to be clear i dont want to discourage here i just see it from a modder perspective who wants to use this value and give it a useful meaning ..
perhaps a wiki page that sums up a list like above would be enough to explain
and to go one step further i had an idea about an alternative base for strength
one could go and use "free" strength points (strenght-weight?) so you can increse the reliability in using a heavy recoil weapon with a 30 strength guy if you get rid of all his other items medipacks,grenades, second ammoclip,... like: (Recoil - ((math.sqrt(max(0,(STR-WeightOfAllItems)*1.5))-5))
ah that makes more sense now more strength=more accuracy and higher number=higher accuracy loss
for x in itertools.product(range(1,7),range(20,71,10)): print (x,x[0]-(math.sqrt(x[1]*1.5)-5))
(1, 20) 0.5227744249483388
(1, 30) -0.7082039324993694
(1, 40) -1.745966692414834
(1, 50) -2.6602540378443873
(1, 60) -3.486832980505138
(1, 70) -4.246950765959598
(2, 20) 1.5227744249483388
(2, 30) 0.2917960675006306
(2, 40) -0.745966692414834
(2, 50) -1.6602540378443873
(2, 60) -2.486832980505138
(2, 70) -3.246950765959598
(3, 20) 2.522774424948339
(3, 30) 1.2917960675006306
(3, 40) 0.25403330758516596
(3, 50) -0.6602540378443873
(3, 60) -1.4868329805051381
(3, 70) -2.246950765959598
(4, 20) 3.522774424948339
(4, 30) 2.2917960675006306
(4, 40) 1.254033307585166
(4, 50) 0.3397459621556127
(4, 60) -0.4868329805051381
(4, 70) -1.246950765959598
(5, 20) 4.522774424948339
(5, 30) 3.2917960675006306
(5, 40) 2.254033307585166
(5, 50) 1.3397459621556127
(5, 60) 0.5131670194948619
(5, 70) -0.24695076595959797
(6, 20) 5.522774424948339
(6, 30) 4.291796067500631
(6, 40) 3.254033307585166
(6, 50) 2.3397459621556127
(6, 60) 1.5131670194948619
(6, 70) 0.753049234040402
in my opinion the points: "it is not obvious what is a useful value"/"behaviour a bit unpredictable" are still valid
to be clear i dont want to discourage here i just see it from a modder perspective who wants to use this value and give it a useful meaning ..
perhaps a wiki page that sums up a list like above would be enough to explain
and to go one step further i had an idea about an alternative base for strength
one could go and use "free" strength points (strenght-weight?) so you can increse the reliability in using a heavy recoil weapon with a 30 strength guy if you get rid of all his other items medipacks,grenades, second ammoclip,... like: (Recoil - ((math.sqrt(max(0,(STR-WeightOfAllItems)*1.5))-5))
Well, once the value reaches less than zero, it flatlines at 0 or 1. Otherwise, yes, at high strengths and lower recoil values, high strength squadies would see their accuracy increase per shot. That's not intended. Generally a higher strength always lets you have better control of the weapon with this equation.
hm so how about two numbers?
recoilstep and recoilstrength
recoilstep is the base decrease in accuracy for each shot
recoilstrength is a value that is substracted from the recoil for every 10 strengthpoints
now:
recoilstep=0 => no recoil
recoilstep>0 => weapon has recoil that decrease accuracy
recoilstep<0 => weapon aims with more shots (laser)
recoilstrength=0 means strenght has no influence
e.g. recoilstep=4, recoilstrength=0.3 , strength=40 is easy to calculate each shot you get 4-(40/10)*0.3 = 2.8 accuracy loss
a laser weapon would be like: recoilstep=-3, recoilstrength=0 # no strength benefit but increasing accuracy by 3 per shot
the formula allows for recoilstep=0 and recoilstrength>0 so real recoil but strenght gives accuracy - could be an option for very heavy weapons with autofire?
for x in itertools.product([-5,0,5,10],[-0.5,0,0.5,1],range(20,71,25)): print (x,x[0]-(math.ceil(x[2]/10)*x[1]))
(-5, -0.5, 20) -4.0
(-5, -0.5, 45) -2.5
(-5, -0.5, 70) -1.5
(-5, 0, 20) -5
(-5, 0, 45) -5
(-5, 0, 70) -5
(-5, 0.5, 20) -6.0
(-5, 0.5, 45) -7.5
(-5, 0.5, 70) -8.5
(-5, 1, 20) -7
(-5, 1, 45) -10
(-5, 1, 70) -12
(0, -0.5, 20) 1.0
(0, -0.5, 45) 2.5
(0, -0.5, 70) 3.5
(0, 0, 20) 0
(0, 0, 45) 0
(0, 0, 70) 0
(0, 0.5, 20) -1.0
(0, 0.5, 45) -2.5
(0, 0.5, 70) -3.5
(0, 1, 20) -2
(0, 1, 45) -5
(0, 1, 70) -7
(5, -0.5, 20) 6.0
(5, -0.5, 45) 7.5
(5, -0.5, 70) 8.5
(5, 0, 20) 5
(5, 0, 45) 5
(5, 0, 70) 5
(5, 0.5, 20) 4.0
(5, 0.5, 45) 2.5
(5, 0.5, 70) 1.5
(5, 1, 20) 3
(5, 1, 45) 0
(5, 1, 70) -2
(10, -0.5, 20) 11.0
(10, -0.5, 45) 12.5
(10, -0.5, 70) 13.5
(10, 0, 20) 10
(10, 0, 45) 10
(10, 0, 70) 10
(10, 0.5, 20) 9.0
(10, 0.5, 45) 7.5
(10, 0.5, 70) 6.5
(10, 1, 20) 8
(10, 1, 45) 5
(10, 1, 70) 3
hm so how about two numbers?
recoilstep and recoilstrength
recoilstep is the base decrease in accuracy for each shot
recoilstrength is a value that is substracted from the recoil for every 10 strengthpoints
now:
recoilstep=0 => no recoil
recoilstep>0 => weapon has recoil that decrease accuracy
recoilstep<0 => weapon aims with more shots (laser)
recoilstrength=0 means strenght has no influence
e.g. recoilstep=4, recoilstrength=0.3 , strength=40 is easy to calculate each shot you get 4-(40/10)*0.3 = 2.8 accuracy loss
a laser weapon would be like: recoilstep=-3, recoilstrength=0 # no strength benefit but increasing accuracy by 3 per shot
the formula allows for recoilstep=0 and recoilstrength>0 so real recoil but strenght gives accuracy - could be an option for very heavy weapons with autofire?
for x in itertools.product([-5,0,5,10],[-0.5,0,0.5,1],range(20,71,25)): print (x,x[0]-(math.ceil(x[2]/10)*x[1]))
(-5, -0.5, 20) -4.0
(-5, -0.5, 45) -2.5
(-5, -0.5, 70) -1.5
(-5, 0, 20) -5
(-5, 0, 45) -5
(-5, 0, 70) -5
(-5, 0.5, 20) -6.0
(-5, 0.5, 45) -7.5
(-5, 0.5, 70) -8.5
(-5, 1, 20) -7
(-5, 1, 45) -10
(-5, 1, 70) -12
(0, -0.5, 20) 1.0
(0, -0.5, 45) 2.5
(0, -0.5, 70) 3.5
(0, 0, 20) 0
(0, 0, 45) 0
(0, 0, 70) 0
(0, 0.5, 20) -1.0
(0, 0.5, 45) -2.5
(0, 0.5, 70) -3.5
(0, 1, 20) -2
(0, 1, 45) -5
(0, 1, 70) -7
(5, -0.5, 20) 6.0
(5, -0.5, 45) 7.5
(5, -0.5, 70) 8.5
(5, 0, 20) 5
(5, 0, 45) 5
(5, 0, 70) 5
(5, 0.5, 20) 4.0
(5, 0.5, 45) 2.5
(5, 0.5, 70) 1.5
(5, 1, 20) 3
(5, 1, 45) 0
(5, 1, 70) -2
(10, -0.5, 20) 11.0
(10, -0.5, 45) 12.5
(10, -0.5, 70) 13.5
(10, 0, 20) 10
(10, 0, 45) 10
(10, 0, 70) 10
(10, 0.5, 20) 9.0
(10, 0.5, 45) 7.5
(10, 0.5, 70) 6.5
(10, 1, 20) 8
(10, 1, 45) 5
(10, 1, 70) 3
I do appreciate the work, but I do better with seeing things in a matrix, can you do a spreadsheet up in google drive and let me see it? Just a run of STRs from 30-70. I'm still playing with the equation still.
here as matrix (i do not have google account)
+------------+----------------+----------+--------+
| recoilstep | recoilstrength | strength | result |
+------------+----------------+----------+--------+
| -5 | -0.5 | 20 | -4.0 |
+------------+----------------+----------+--------+
| -5 | -0.5 | 30 | -3.5 |
+------------+----------------+----------+--------+
| -5 | -0.5 | 40 | -3.0 |
+------------+----------------+----------+--------+
| -5 | -0.5 | 50 | -2.5 |
+------------+----------------+----------+--------+
| -5 | -0.5 | 60 | -2.0 |
+------------+----------------+----------+--------+
| -5 | -0.5 | 70 | -1.5 |
+------------+----------------+----------+--------+
| -5 | 0 | 20 | -5 |
+------------+----------------+----------+--------+
| -5 | 0 | 30 | -5 |
+------------+----------------+----------+--------+
| -5 | 0 | 40 | -5 |
+------------+----------------+----------+--------+
| -5 | 0 | 50 | -5 |
+------------+----------------+----------+--------+
| -5 | 0 | 60 | -5 |
+------------+----------------+----------+--------+
| -5 | 0 | 70 | -5 |
+------------+----------------+----------+--------+
| -5 | 0.5 | 20 | -6.0 |
+------------+----------------+----------+--------+
| -5 | 0.5 | 30 | -6.5 |
+------------+----------------+----------+--------+
| -5 | 0.5 | 40 | -7.0 |
+------------+----------------+----------+--------+
| -5 | 0.5 | 50 | -7.5 |
+------------+----------------+----------+--------+
| -5 | 0.5 | 60 | -8.0 |
+------------+----------------+----------+--------+
| -5 | 0.5 | 70 | -8.5 |
+------------+----------------+----------+--------+
| -5 | 1 | 20 | -7 |
+------------+----------------+----------+--------+
| -5 | 1 | 30 | -8 |
+------------+----------------+----------+--------+
| -5 | 1 | 40 | -9 |
+------------+----------------+----------+--------+
| -5 | 1 | 50 | -10 |
+------------+----------------+----------+--------+
| -5 | 1 | 60 | -11 |
+------------+----------------+----------+--------+
| -5 | 1 | 70 | -12 |
+------------+----------------+----------+--------+
| 0 | -0.5 | 20 | 1.0 |
+------------+----------------+----------+--------+
| 0 | -0.5 | 30 | 1.5 |
+------------+----------------+----------+--------+
| 0 | -0.5 | 40 | 2.0 |
+------------+----------------+----------+--------+
| 0 | -0.5 | 50 | 2.5 |
+------------+----------------+----------+--------+
| 0 | -0.5 | 60 | 3.0 |
+------------+----------------+----------+--------+
| 0 | -0.5 | 70 | 3.5 |
+------------+----------------+----------+--------+
| 0 | 0 | 20 | 0 |
+------------+----------------+----------+--------+
| 0 | 0 | 30 | 0 |
+------------+----------------+----------+--------+
| 0 | 0 | 40 | 0 |
+------------+----------------+----------+--------+
| 0 | 0 | 50 | 0 |
+------------+----------------+----------+--------+
| 0 | 0 | 60 | 0 |
+------------+----------------+----------+--------+
| 0 | 0 | 70 | 0 |
+------------+----------------+----------+--------+
| 0 | 0.5 | 20 | -1.0 |
+------------+----------------+----------+--------+
| 0 | 0.5 | 30 | -1.5 |
+------------+----------------+----------+--------+
| 0 | 0.5 | 40 | -2.0 |
+------------+----------------+----------+--------+
| 0 | 0.5 | 50 | -2.5 |
+------------+----------------+----------+--------+
| 0 | 0.5 | 60 | -3.0 |
+------------+----------------+----------+--------+
| 0 | 0.5 | 70 | -3.5 |
+------------+----------------+----------+--------+
| 0 | 1 | 20 | -2 |
+------------+----------------+----------+--------+
| 0 | 1 | 30 | -3 |
+------------+----------------+----------+--------+
| 0 | 1 | 40 | -4 |
+------------+----------------+----------+--------+
| 0 | 1 | 50 | -5 |
+------------+----------------+----------+--------+
| 0 | 1 | 60 | -6 |
+------------+----------------+----------+--------+
| 0 | 1 | 70 | -7 |
+------------+----------------+----------+--------+
| 5 | -0.5 | 20 | 6.0 |
+------------+----------------+----------+--------+
| 5 | -0.5 | 30 | 6.5 |
+------------+----------------+----------+--------+
| 5 | -0.5 | 40 | 7.0 |
+------------+----------------+----------+--------+
| 5 | -0.5 | 50 | 7.5 |
+------------+----------------+----------+--------+
| 5 | -0.5 | 60 | 8.0 |
+------------+----------------+----------+--------+
| 5 | -0.5 | 70 | 8.5 |
+------------+----------------+----------+--------+
| 5 | 0 | 20 | 5 |
+------------+----------------+----------+--------+
| 5 | 0 | 30 | 5 |
+------------+----------------+----------+--------+
| 5 | 0 | 40 | 5 |
+------------+----------------+----------+--------+
| 5 | 0 | 50 | 5 |
+------------+----------------+----------+--------+
| 5 | 0 | 60 | 5 |
+------------+----------------+----------+--------+
| 5 | 0 | 70 | 5 |
+------------+----------------+----------+--------+
| 5 | 0.5 | 20 | 4.0 |
+------------+----------------+----------+--------+
| 5 | 0.5 | 30 | 3.5 |
+------------+----------------+----------+--------+
| 5 | 0.5 | 40 | 3.0 |
+------------+----------------+----------+--------+
| 5 | 0.5 | 50 | 2.5 |
+------------+----------------+----------+--------+
| 5 | 0.5 | 60 | 2.0 |
+------------+----------------+----------+--------+
| 5 | 0.5 | 70 | 1.5 |
+------------+----------------+----------+--------+
| 5 | 1 | 20 | 3 |
+------------+----------------+----------+--------+
| 5 | 1 | 30 | 2 |
+------------+----------------+----------+--------+
| 5 | 1 | 40 | 1 |
+------------+----------------+----------+--------+
| 5 | 1 | 50 | 0 |
+------------+----------------+----------+--------+
| 5 | 1 | 60 | -1 |
+------------+----------------+----------+--------+
| 5 | 1 | 70 | -2 |
+------------+----------------+----------+--------+
| 10 | -0.5 | 20 | 11.0 |
+------------+----------------+----------+--------+
| 10 | -0.5 | 30 | 11.5 |
+------------+----------------+----------+--------+
| 10 | -0.5 | 40 | 12.0 |
+------------+----------------+----------+--------+
| 10 | -0.5 | 50 | 12.5 |
+------------+----------------+----------+--------+
| 10 | -0.5 | 60 | 13.0 |
+------------+----------------+----------+--------+
| 10 | -0.5 | 70 | 13.5 |
+------------+----------------+----------+--------+
| 10 | 0 | 20 | 10 |
+------------+----------------+----------+--------+
| 10 | 0 | 30 | 10 |
+------------+----------------+----------+--------+
| 10 | 0 | 40 | 10 |
+------------+----------------+----------+--------+
| 10 | 0 | 50 | 10 |
+------------+----------------+----------+--------+
| 10 | 0 | 60 | 10 |
+------------+----------------+----------+--------+
| 10 | 0 | 70 | 10 |
+------------+----------------+----------+--------+
| 10 | 0.5 | 20 | 9.0 |
+------------+----------------+----------+--------+
| 10 | 0.5 | 30 | 8.5 |
+------------+----------------+----------+--------+
| 10 | 0.5 | 40 | 8.0 |
+------------+----------------+----------+--------+
| 10 | 0.5 | 50 | 7.5 |
+------------+----------------+----------+--------+
| 10 | 0.5 | 60 | 7.0 |
+------------+----------------+----------+--------+
| 10 | 0.5 | 70 | 6.5 |
+------------+----------------+----------+--------+
| 10 | 1 | 20 | 8 |
+------------+----------------+----------+--------+
| 10 | 1 | 30 | 7 |
+------------+----------------+----------+--------+
| 10 | 1 | 40 | 6 |
+------------+----------------+----------+--------+
| 10 | 1 | 50 | 5 |
+------------+----------------+----------+--------+
| 10 | 1 | 60 | 4 |
+------------+----------------+----------+--------+
| 10 | 1 | 70 | 3 |
+------------+----------------+----------+--------+