August 18, 2013, 22:19  #1 
Swordsman
Join Date: Aug 2011
Posts: 414

Sil: melee tohit chance table
Decided to work this out. Basically as I understand it all melee rolls are between two 20 sided dice, the attacker's roll having a positive or negative modifier based on the difference between the attackers' and defender's melee and evasion. Ties go to the defender.
So this amounts to two rolls, each having a range of 20, with those two ranges offset against one another by some amount. I.e., 524 vs 120, if melee is 4 more than evasion. So first you work out the chance that both rolls occur within the overlapping region of the ranges. That's the fraction of pairings where both values are within the overlap, divided by the total number of pairings. Easy enough. Within our example, rolls between 5 and 20 are within the overlap. Range is 16, making the number of pairings within the overlap 16^2. Total number of pairings would be 20^2. Then you work out the number of possible ties within the overlap. That's just the number of values within the overlap. 5 through 20 in our example, making 16 tied pairings. Then you work out the total number of wins within the overlap, which is just half the number of nonties within the overlap (since there will be identical number of nontied wins and losses, statistically, within any overlap region). If melee is greater than evasion, pairings outside the overlap are automatic wins. If melee is less than evasion, pairings outside the overlap are automatic losses. So chance of win outside overlap is always either 1 or 0 depending on whether melee is higher than evasion. So the formula for hit chance becomes "chance of being outside overlap * chance of win outside overlap + chance of being inside overlap * chance of win inside overlap". Here's the table, indexed by "melee minus evasion". Anything beyond these values are automatic hits or misses. For hairpulling fun, you can raise "one minus the appropriate value" by the power of N next time you miss N times in a row and die. That'll be the chance of that happening. Code:
18 0.0025 17 0.0075 16 0.015 15 0.025 14 0.0375 13 0.0525 12 0.07 11 0.09 10 0.1125 9 0.1375 8 0.165 7 0.195 6 0.2275 5 0.2625 4 0.3 3 0.34 2 0.3825 1 0.4275 0 0.475 1 0.525 2 0.5725 3 0.6175 4 0.66 5 0.7 6 0.7375 7 0.7725 8 0.805 9 0.835 10 0.8625 11 0.8875 12 0.91 13 0.93 14 0.9475 15 0.9625 16 0.975 17 0.985 18 0.9925 19 0.9975 Last edited by BlueFish; August 19, 2013 at 00:33. 
August 18, 2013, 23:00  #2 
Knight
Join Date: Jan 2009
Posts: 904

That looks right. It can be easy to think of it as chances in 400 of hitting. Seen that way it starts:
1, 3, 6, 10, 15, 21, ... (i.e. the triangular numbers) The chances of missing are like this starting from the other end. These numbers are the same with other opposed skill checks. They are out of 100 now, but still start from each side with: 1, 3, 6, 10, 15, 21, ... 
August 18, 2013, 23:06  #3 
Knight
Join Date: Jan 2009
Posts: 904

For the maths nerds, this two dice distribution has a nice scurve shaped culmulative distribution. The triangular numbers mean it is the piecewise combination of a parabola and an upsidedown parabola. Believe it or not, this was why I chose to use twodice distributions for all the skill checks in Sil. The properties of this distribution are much nicer than for one die (which has a flat PDF and a linear CDF).
(Wow that was even more mathsy than I intended, but I'm sure Nick will appreciate it...) 
August 18, 2013, 23:14  #4  
Swordsman
Join Date: Aug 2011
Posts: 414

Quote:


August 19, 2013, 00:12  #5 
Knight
Join Date: Jan 2008
Posts: 526

Yeah, the two roll distribution is great for making just barely getting higher than your opponent's statistic worth it.
__________________
My Chiptune music, made in Famitracker: http://soundcloud.com/patashu 
August 19, 2013, 09:58  #6  
Knight
Join Date: Jan 2013
Posts: 710

Quote:
@patashu: While percentagewise the biggest effect seems to be in the middle  the relative value you get out of an additional point is biggest in the margins. Say your evasion is 14 points better than your opponents  now gaining two additional points (say finding a nice +2 shortsword as substitute for your +1 shortsword w/ parry) in evasion more than halves the hits against you. (2 points incidentally is the size of the stun effect.) 

August 19, 2013, 10:57  #7  
Knight
Join Date: Jan 2008
Posts: 526

Quote:
__________________
My Chiptune music, made in Famitracker: http://soundcloud.com/patashu 

August 19, 2013, 11:52  #8  
Vanilla maintainer
Join Date: Apr 2007
Location: Canberra, Australia
Age: 55
Posts: 8,759
Donated: $60

Quote:
__________________
One for the Dark Lord on his dark throne In the Land of Mordor where the Shadows lie. 

August 19, 2013, 12:07  #9 
Swordsman
Join Date: Jan 2012
Posts: 414


August 19, 2013, 12:19  #10  
Knight
Join Date: Jan 2009
Posts: 904

Quote:
Regarding the relative values, I remember playing Pool of Radiance and getting a character to have such a good AC that I went from being hit 1/10 to 1/20. This effectively doubled my character's HP, and I thought it was very interesting. There are a number of things that go against aiming for this kind of thing though. (1) there are several effects (breath weapons, archery, spells) that ignore evasion. (2) you end up using a lot of time in each battle. (3) different monsters have different skill scores so finessing it against one won't be as good against others. (4) it matters by how much opponents hit you, which makes evasion quite useful in the middle too. Note that protection works similarly at the top end: if an extra point of prot lets you take 1 damage instead of 2, you last twice as long. However the randomness in damage and protection rolls makes this less striking, and (1)(3) all still apply. If any of you have played the board game Eclipse, it has a one die (1d6) distribution, but because the default is to hit only on a 6 and 6s are automatic hits, it is always hovering right on the edge of the relative value thing. If you get better accuracy, you hit twice as often, doubling your combat prowess, but then the incentive for them is to get better shields, halving their chance of hitting etc. It is actually a very neat system. I invented a really tight 1d6 evasion/protection combat system the other day and Scatha pointed out that it was equivalent to the Eclipse one... 

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)  
Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Sil: stealth melee assassin  BlueFish  Sil  9  May 3, 2013 08:03 
UI: basetohit for shoot and melee are not intutitive  Pete Mack  v4  18  April 30, 2013 22:59 
Chance of spell failure  tony  Vanilla  1  June 22, 2011 08:30 
Best melee?  Swede2378  Vanilla  22  June 16, 2010 20:03 
Any chance for (compiled) Angband 3.0.9 debian file?  ivanj  Vanilla  9  November 3, 2007 11:29 