Sil: melee to-hit chance table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • BlueFish
    Swordsman
    • Aug 2011
    • 414

    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, 00:33.
  • half
    Knight
    • Jan 2009
    • 910

    #2
    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, ...

    Comment

    • half
      Knight
      • Jan 2009
      • 910

      #3
      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...)

      Comment

      • BlueFish
        Swordsman
        • Aug 2011
        • 414

        #4
        Originally posted by half
        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.

        Comment

        • Patashu
          Knight
          • Jan 2008
          • 528

          #5
          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

          Comment

          • taptap
            Knight
            • Jan 2013
            • 710

            #6
            Originally posted by half
            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.)

            Comment

            • Patashu
              Knight
              • Jan 2008
              • 528

              #7
              Originally posted by taptap
              @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

              Comment

              • Nick
                Vanilla maintainer
                • Apr 2007
                • 9638

                #8
                Originally posted by half
                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.

                Comment

                • Scatha
                  Swordsman
                  • Jan 2012
                  • 414

                  #9
                  Originally posted by Nick
                  ... and the sum of any two triangular numbers is a square
                  Of any two *consecutive* triangular numbers.

                  Comment

                  • half
                    Knight
                    • Jan 2009
                    • 910

                    #10
                    Originally posted by Patashu
                    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...

                    Comment

                    • Nick
                      Vanilla maintainer
                      • Apr 2007
                      • 9638

                      #11
                      Originally posted by Scatha
                      Of any two *consecutive* triangular numbers.
                      *facepalm*

                      That's what I meant...
                      One for the Dark Lord on his dark throne
                      In the Land of Mordor where the Shadows lie.

                      Comment

                      • half
                        Knight
                        • Jan 2009
                        • 910

                        #12
                        Originally posted by Nick
                        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
                        Indeed, if you draw out all the combinations of rolls you and your opponent could get, then form a square (either 10x10 or 20x20). I'll illustrate with a little 6x6 one to save space. The chances of hitting are illustrated with 'o' and missing with '.'. The horizontal axis is the defender's roll. The vertical is the attacker's roll. The chances of hitting literally start as increasing triangles until they clip the edges, then the chances of missing are decreasing triangles. Hopefully that will make it more intuitive for some people.

                        Code:
                         123456
                        1......   ......   ......   ......   ......   o.....   oo....   ooo...   etc
                        2......   ......   ......   ......   o.....   oo....   ooo...   oooo..   
                        3......   ......   ......   o.....   oo....   ooo...   oooo..   ooooo.   
                        4......   ......   o.....   oo....   ooo...   oooo..   ooooo.   oooooo   
                        5......   o.....   oo....   ooo...   oooo..   ooooo.   oooooo   oooooo   
                        6o.....   oo....   ooo...   oooo..   ooooo.   oooooo   oooooo   oooooo

                        Comment

                        • taptap
                          Knight
                          • Jan 2013
                          • 710

                          #13
                          Yes, I do like the system. I am very happy that you didn't spoil it by introducing automatic hits on a rolled 20 (as a lot of table top RPGs do) - so you allow different styles to prosper although every style hits limits by different kind of opponents. But looking at the tables you realize how amazing a -1, 2d5 mithril corslet of resilience really is

                          Comment

                          • kryft
                            Rookie
                            • Aug 2013
                            • 20

                            #14
                            I've been writing a little tool for myself that basically takes a char dump and the name of a monster (the tool reads monster.txt) and spits out two probability distributions, one for the melee damage dealt by the player to the monster in a single turn and another for the melee damage dealt by the monster to the player. The tool is written in Haskell using the probabilistic functional programming library, which means that if you use it interactively from within the interpreter, you can easily compute probabilities for arbitrary events.

                            For example,

                            meVsWarg <- fight "kryft.txt" "Warg"
                            (> 10) ?? (defend meVsWarg)
                            mean (attack meVsWarg)

                            would pit the character in "kryft.txt" against a warg and then calculate the probability that the warg would deal more than 10 points of damage with a single attack (taking into account both the possibility of missing and the possibility of getting extra dice from criticals).

                            I wrote this for myself for fun, but looking at this thread it occurred to me that perhaps others might be interested too. I'm happy to share the code if anyone else wants to play with it. It's not quite finished yet (but should be soon), and it's a bit simplistic; for example, the distributions are for a single attack, so it doesn't need to consider player or monster speed. I'm going to take brands and resistances/vulnerabilities into account automatically, as well as certain player abilities that are always active, but I will most likely ignore abilities that give situational bonuses, such as Dodging or Concentration.

                            You shouldn't need to know any Haskell to use it (at least if I write a readme), and installing the Haskell platform is easy on windows, mac and linux. I suppose I could also make a command line executable that takes a char dump and a monster name and outputs the distributions (and some statistics and maybe the CDFs) as text; this could even be distributed as a binary for people who don't want to install anything.
                            Last edited by kryft; August 19, 2013, 14:32.

                            Comment

                            • debo
                              Veteran
                              • Oct 2011
                              • 2402

                              #15
                              I would like to see this code!
                              Glaurung, Father of the Dragons says, 'You cannot avoid the ballyhack.'

                              Comment

                              Working...
                              😀
                              😂
                              🥰
                              😘
                              🤢
                              😎
                              😞
                              😡
                              👍
                              👎