In the table of example values I mixed up the title for the second and third
column: correctly the middle column is the new value and the right column is the
old value.
@salimiles:
Sure, it is src/character.c, l. 274 (
update_secondary_stats_from_primary_stats() ), but I have Version 0.14.1. I am
not sure about whether the line has changed since then.
@ahuillet:
I looked into the source code for it and the only place to_hit was really used
is in src/bullet.c in the function DoMeleeDamage(). Every value over 100 has
exactly the same effect as the value 100. In other words: every dexterity point
over 40 is absolutely useless for the hit chance.
An adequate formula with exp(x) is
hit chance = 100% - 40% * exp(-0.03 * dexterity)
for source code (src/character.c):
l.274: Me.to_hit = 100 - 40 * exp(- (TOHIT_PERCENT_PER_DEX_POINT / 100) *
Me.Dexterity);
l.43: #define TOHIT_PERCENT_PER_DEX_POINT (3.0)
Maybe this is a silly question, but since I am new here, it is maybe ok to ask
silly questions: What is RB and how do I get the actually newest version to
implement it without version conflict? :)
And again some example values:
old: the old formula
prop I: the formula from my first post (with 0,97)
prop II: the formula from this post (with exp)
dex prop I prop II old
0 60% 60% 60%
5 66% 66% 65%
10 71% 70% 70%
15 75% 74% 75%
20 78% 78% 80%
25 81% 81% 85%
30 84% 84% 90%
35 86% 86% 95%
40 88% 88% 100%
45 90% 90% 105%
50 91% 91% 110%
55 93% 92% 115%
60 94% 93% 120%
65 94% 94% 125%
70 95% 95% 130%
75 96% 96% 135%
80 97% 96% 140%
85 97% 97% 145%
90 97% 97% 150%
95 98% 98% 155%
100 98% 98% 160% |