Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Sil

Reply
 
Thread Tools Display Modes
Old August 18, 2013, 22:19   #1
BlueFish
Swordsman
 
Join Date: Aug 2011
Posts: 414
BlueFish is on a distinguished road
Sil: melee to-hit 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., 5-24 vs 1-20, 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 non-ties within the overlap (since there will be identical number of non-tied 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 hair-pulling 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.
BlueFish is offline   Reply With Quote
Old August 18, 2013, 23:00   #2
half
Knight
 
half's Avatar
 
Join Date: Jan 2009
Posts: 904
half is on a distinguished road
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, ...
half is offline   Reply With Quote
Old August 18, 2013, 23:06   #3
half
Knight
 
half's Avatar
 
Join Date: Jan 2009
Posts: 904
half is on a distinguished road
For the maths nerds, this two dice distribution has a nice s-curve shaped culmulative distribution. The triangular numbers mean it is the piece-wise combination of a parabola and an upside-down parabola. Believe it or not, this was why I chose to use two-dice 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...)
half is offline   Reply With Quote
Old August 18, 2013, 23:14   #4
BlueFish
Swordsman
 
Join Date: Aug 2011
Posts: 414
BlueFish is on a distinguished road
Quote:
Originally Posted by half View Post
For the maths nerds, this two dice distribution has a nice s-curve shaped culmulative distribution. The triangular numbers mean it is the piece-wise combination of a parabola and an upside-down parabola. Believe it or not, this was why I chose to use two-dice 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...)
I think it makes sense from a game design standpoint. The player is likely to be floating around "equal with his opponents" at any given point in the game, and that point should have some gravity. One more point of evasion or melee has more meaning while you're equal than it has at any other point.
BlueFish is offline   Reply With Quote
Old August 19, 2013, 00:12   #5
Patashu
Knight
 
Patashu's Avatar
 
Join Date: Jan 2008
Posts: 526
Patashu is on a distinguished road
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
Patashu is offline   Reply With Quote
Old August 19, 2013, 09:58   #6
taptap
Knight
 
Join Date: Jan 2013
Posts: 710
taptap is on a distinguished road
Quote:
Originally Posted by half View Post
Believe it or not, this was why I chose to use two-dice distributions for all the skill checks in Sil.
I believe it. Triangular numbers are all over Sil after all. I like the properties of this, compared to the flat distribution in single rolls, or the many complicated systems which however are flattened by introducing a critical roll that always hits. Having it listed as a table is quite helpful when calculating chances for critical hits (is the 0, 1d7, 1lb or the +1,1d8, 1.3 lb shortsword better?).

@patashu: While percentage-wise 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.)
taptap is offline   Reply With Quote
Old August 19, 2013, 10:57   #7
Patashu
Knight
 
Patashu's Avatar
 
Join Date: Jan 2008
Posts: 526
Patashu is on a distinguished road
Quote:
Originally Posted by taptap View Post
@patashu: While percentage-wise 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.)
The relative value is indeed largest in the margins, but the absolute value is largest near the center. If you outclass opponents by that much in the relevant statistic, they're starting to become lesser and lesser threats - though, it depends on what the result of a failed roll will be (As in, will it be catastrophic if it happens once? twice? more times?) - if you REALLY don't want it to happen, the relative gain at the margins is very important and nice to track.
__________________
My Chiptune music, made in Famitracker: http://soundcloud.com/patashu
Patashu is offline   Reply With Quote
Old August 19, 2013, 11:52   #8
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 56
Posts: 9,138
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by half View Post
For the maths nerds, this two dice distribution has a nice s-curve shaped culmulative distribution. The triangular numbers mean it is the piece-wise combination of a parabola and an upside-down parabola. Believe it or not, this was why I chose to use two-dice 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...)
That is really cool. For anyone who doesn't believe me, note that a parabola is the graph of y = x², and the sum of any two triangular numbers is a square
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old August 19, 2013, 12:07   #9
Scatha
Swordsman
 
Join Date: Jan 2012
Posts: 414
Scatha is on a distinguished road
Quote:
Originally Posted by Nick View Post
... and the sum of any two triangular numbers is a square
Of any two *consecutive* triangular numbers.
Scatha is offline   Reply With Quote
Old August 19, 2013, 12:19   #10
half
Knight
 
half's Avatar
 
Join Date: Jan 2009
Posts: 904
half is on a distinguished road
Quote:
Originally Posted by Patashu View Post
The relative value is indeed largest in the margins, but the absolute value is largest near the center. If you outclass opponents by that much in the relevant statistic, they're starting to become lesser and lesser threats - though, it depends on what the result of a failed roll will be (As in, will it be catastrophic if it happens once? twice? more times?) - if you REALLY don't want it to happen, the relative gain at the margins is very important and nice to track.
Yes, I really like the tension between these two things.

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...
half is offline   Reply With Quote
Reply


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sil: stealth melee assassin BlueFish Sil 9 May 3, 2013 08:03
UI: base-to-hit 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


All times are GMT +1. The time now is 09:44.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.