Skip to content

Creates a table of success/failure probabilities and average number of success for the World of Darkness system

License

Notifications You must be signed in to change notification settings

QuentinAndre11/D10-WoD-Probabilities

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

D10-WoD-Probabilities

The goal of this code is to get the probability of success when you roll your dices with the World of Darkness roleplaying system.

Brief reminder of the WoD system :

  • Roll as many D10 (dices with 10 faces) as your character score in attribute + skill (example : you want to give a sword blow, you have a strength of 3 and a score in melee of 2, you roll 3+2=5 dices)

  • Difficulty threshold is given by the Game Master. A dice is a success if the value of the dice is greater or equal than the difficulty, except if the value is one. In this case, it substracts one success at the total.

  • If the total is strictly positive, the action is a success. If you have 0 success, it is a failure. If it is negative, it is a critical failure. (example : you roll your 5 dices, you have 10,10,6,5,1. Your GM says the difficulty is set at 6. You have 3-1=2 success, you success in your action)

  • Special rule : if your character has the attribute "hero", your 10 are counted as 2 success, but are cancelled by the 1 in the first place. (example : with the same roll, you have now one 10 which is cancelled by the one, and the other 10 counts two success. So you have 3 success)

In this code, there are two useful functions :

  • rollsStats(dices,diff,hero) which gives the useful statistics for a given number of dices and difficulty (and the optional hero attribute)

  • prettyArray(hero,maxDices,value) which gives an array with difficulty as columns and number of dices as rows. You can choose what statistic is shown with the input "value", and you can input whether you want an array for hero attribute, and the maximum number of rows (number of dices).

Here are the tables for 20 dices :

Standard - average number of success

           1       2       3       4       5       6       7       8       9      10
   1     0.8    0.81     0.7    0.61     0.5    0.39     0.3    0.19    0.09     0.0
   2     1.6    1.59    1.39     1.2    0.99    0.79    0.59    0.41     0.2   -0.01
   3    2.41     2.4    2.09    1.81    1.51    1.19     0.9    0.61    0.31   -0.01
   4     3.2     3.2    2.79    2.41    1.99    1.62     1.2    0.77     0.4     0.0
   5    4.03     4.0    3.49    3.01    2.49     2.0     1.5    1.01    0.49     0.0
   6     4.8    4.83    4.19    3.59    2.98    2.41    1.82     1.2    0.62    0.01
   7    5.58    5.61    4.88    4.21    3.46    2.81    2.09    1.41    0.68   -0.01
   8     6.4    6.37    5.64    4.81    4.01    3.23    2.41    1.59    0.78    0.01
   9    7.19    7.19    6.31    5.38     4.5     3.6    2.71    1.81    0.93    0.01
  10    7.99     8.0    7.01    6.02    4.98    4.01    2.98    2.04    0.99    0.02
  11    8.79    8.81    7.68    6.58    5.52    4.39    3.31    2.21     1.1    0.01
  12    9.62    9.59     8.4    7.18     6.0    4.84    3.63    2.42    1.19    0.02
  13   10.37    10.4    9.16    7.82    6.53     5.2    3.88     2.6     1.3   -0.01
  14   11.18    11.2    9.79     8.4    6.99    5.62    4.21    2.78    1.43   -0.01
  15   12.03   12.04   10.52    8.97    7.48    6.04    4.51    3.03    1.52   -0.01
  16   12.76   12.76   11.22     9.6    8.01    6.43    4.87    3.18    1.59   -0.03
  17   13.57    13.6   11.88   10.22    8.52    6.82    5.09    3.43     1.7   -0.01
  18    14.4   14.39   12.58   10.82    8.99    7.19    5.35    3.59     1.8   -0.02
  19   15.17   15.18   13.25   11.39    9.46    7.59    5.68     3.8    1.89    0.02
  20    16.0   16.02   14.05   11.98    9.99    7.98     6.0    4.01    2.03    0.03

Standard - success rate

           1       2       3       4       5       6       7       8       9      10
   1     0.9     0.9     0.8     0.7     0.6    0.51    0.41     0.3     0.2     0.1
   2    0.82    0.81     0.8    0.77    0.73    0.65    0.56    0.45    0.32    0.16
   3    0.97    0.97    0.92    0.86    0.81    0.73    0.65    0.53     0.4    0.21
   4    0.95    0.95    0.94    0.91    0.86     0.8    0.72     0.6    0.45    0.26
   5    0.99    0.99    0.97    0.94     0.9    0.84    0.76    0.64    0.49    0.28
   6    0.98    0.98    0.98    0.96    0.92    0.87     0.8    0.69    0.52     0.3
   7     1.0     1.0    0.99    0.97    0.95     0.9    0.83    0.72    0.56    0.32
   8     1.0    0.99    0.99    0.98    0.96    0.92    0.86    0.74    0.57    0.34
   9     1.0     1.0     1.0    0.99    0.97    0.94    0.87    0.76    0.59    0.35
  10     1.0     1.0     1.0    0.99    0.98    0.95    0.89    0.79    0.61    0.35
  11     1.0     1.0     1.0    0.99    0.98    0.96    0.91     0.8    0.64    0.37
  12     1.0     1.0     1.0    0.99    0.99    0.96    0.92    0.82    0.65    0.37
  13     1.0     1.0     1.0     1.0    0.99    0.97    0.93    0.84    0.66    0.37
  14     1.0     1.0     1.0     1.0    0.99    0.98    0.94    0.85    0.68    0.38
  15     1.0     1.0     1.0     1.0     1.0    0.98    0.94    0.86    0.68    0.38
  16     1.0     1.0     1.0     1.0     1.0    0.98    0.95    0.87    0.69    0.38
  17     1.0     1.0     1.0     1.0     1.0    0.99    0.96    0.88    0.69    0.39
  18     1.0     1.0     1.0     1.0     1.0    0.99    0.96    0.89    0.72    0.39
  19     1.0     1.0     1.0     1.0     1.0    0.99    0.97     0.9    0.72    0.39
  20     1.0     1.0     1.0     1.0     1.0    0.99    0.97     0.9    0.73     0.4

Standard - failure rate

           1       2       3       4       5       6       7       8       9      10
   1     0.0     0.0     0.1     0.2     0.3    0.41     0.5    0.59     0.7    0.79
   2    0.18    0.18    0.17    0.18    0.21    0.26    0.33    0.42    0.52    0.66
   3     0.0     0.0    0.05    0.09    0.14    0.18    0.24    0.32    0.43    0.56
   4    0.05    0.05    0.05    0.07    0.09    0.13    0.19    0.26    0.36    0.48
   5     0.0     0.0    0.02    0.04    0.07     0.1    0.15    0.23    0.32    0.43
   6    0.01    0.01    0.02    0.03    0.04    0.08    0.13    0.19    0.28    0.39
   7     0.0     0.0    0.01    0.02    0.03    0.07     0.1    0.17    0.26    0.36
   8     0.0     0.0    0.01    0.01    0.03    0.05    0.09    0.14    0.25    0.34
   9     0.0     0.0     0.0    0.01    0.02    0.04    0.08    0.13    0.21    0.31
  10     0.0     0.0     0.0    0.01    0.02    0.03    0.06    0.12     0.2    0.29
  11     0.0     0.0     0.0     0.0    0.01    0.03    0.06     0.1    0.19    0.27
  12     0.0     0.0     0.0     0.0    0.01    0.02    0.05     0.1    0.18    0.27
  13     0.0     0.0     0.0     0.0    0.01    0.02    0.04    0.09    0.16    0.24
  14     0.0     0.0     0.0     0.0     0.0    0.02    0.04    0.08    0.16    0.25
  15     0.0     0.0     0.0     0.0     0.0    0.01    0.03    0.08    0.15    0.24
  16     0.0     0.0     0.0     0.0     0.0    0.01    0.03    0.07    0.15    0.23
  17     0.0     0.0     0.0     0.0     0.0    0.01    0.03    0.06    0.13    0.22
  18     0.0     0.0     0.0     0.0     0.0    0.01    0.02    0.06    0.13    0.21
  19     0.0     0.0     0.0     0.0     0.0    0.01    0.02    0.05    0.12    0.22
  20     0.0     0.0     0.0     0.0     0.0     0.0    0.02    0.05    0.12    0.21

Standard - critical failure rate

           1       2       3       4       5       6       7       8       9      10
   1     0.1     0.1    0.09     0.1     0.1     0.1     0.1     0.1    0.09     0.1
   2    0.01    0.01    0.03    0.05    0.07    0.09    0.11    0.13    0.15    0.17
   3    0.03    0.03    0.03    0.04    0.06    0.07     0.1    0.13    0.17    0.22
   4     0.0     0.0    0.01    0.03    0.04    0.06    0.09    0.13    0.19    0.27
   5    0.01    0.01    0.01    0.02    0.03    0.05    0.08    0.12    0.19    0.28
   6     0.0     0.0    0.01    0.01    0.02    0.04    0.07    0.12     0.2     0.3
   7     0.0     0.0     0.0    0.01    0.02    0.04    0.06    0.11    0.19    0.33
   8     0.0     0.0     0.0    0.01    0.01    0.03    0.06     0.1    0.19    0.33
   9     0.0     0.0     0.0     0.0    0.01    0.02    0.05     0.1    0.19    0.35
  10     0.0     0.0     0.0     0.0    0.01    0.02    0.05    0.09    0.18    0.35
  11     0.0     0.0     0.0     0.0    0.01    0.02    0.04    0.09    0.18    0.36
  12     0.0     0.0     0.0     0.0     0.0    0.01    0.04    0.08    0.18    0.38
  13     0.0     0.0     0.0     0.0     0.0    0.01    0.03    0.07    0.18    0.37
  14     0.0     0.0     0.0     0.0     0.0    0.01    0.02    0.07    0.17    0.38
  15     0.0     0.0     0.0     0.0     0.0    0.01    0.02    0.06    0.17    0.38
  16     0.0     0.0     0.0     0.0     0.0    0.01    0.02    0.06    0.17    0.39
  17     0.0     0.0     0.0     0.0     0.0    0.01    0.02    0.05    0.16    0.39
  18     0.0     0.0     0.0     0.0     0.0    0.01    0.02    0.05    0.16    0.38
  19     0.0     0.0     0.0     0.0     0.0     0.0    0.01    0.05    0.15    0.39
  20     0.0     0.0     0.0     0.0     0.0     0.0    0.01    0.05    0.15    0.39

Hero - average number of success

           1       2       3       4       5       6       7       8       9      10
   1    0.91     0.9     0.8    0.69     0.6    0.51     0.4     0.3    0.19    0.11
   2    1.78    1.77    1.57    1.37    1.19    0.98    0.77    0.58    0.38    0.18
   3    2.64    2.62    2.35    2.04    1.74    1.46    1.17    0.84    0.55    0.24
   4    3.51     3.5    3.09    2.71     2.3    1.88    1.49     1.1     0.7    0.31
   5    4.35    4.36    3.82    3.33    2.84    2.32    1.87    1.33    0.85    0.35
   6    5.17    5.18    4.62    4.01    3.41    2.78    2.18    1.62    0.97    0.41
   7    6.05    6.04    5.33    4.69    3.94    3.24    2.51    1.81    1.14    0.41
   8    6.84    6.88    6.08    5.26    4.45    3.67    2.88    2.08    1.26    0.43
   9     7.7    7.69     6.8    5.92    5.01    4.14    3.22     2.3    1.44    0.54
  10    8.54    8.54    7.53    6.51    5.54    4.51    3.57    2.54    1.54    0.54
  11    9.36    9.35    8.26    7.18    6.07    5.01    3.84    2.74    1.61    0.59
  12    10.2   10.16    9.01    7.79    6.64    5.31    4.21    2.95    1.78    0.58
  13    11.0    11.0    9.68    8.37    7.14    5.79    4.57    3.23    1.93    0.58
  14   11.85   11.91   10.43    9.05    7.58    6.21    4.83    3.38    2.05    0.61
  15   12.65   12.63   11.18    9.65     8.2    6.66    5.15    3.67    2.16    0.69
  16   13.52   13.47   11.87   10.31    8.71    7.15    5.52    3.92    2.26    0.68
  17   14.31   14.29   12.65   10.94    9.23    7.49    5.84    4.07    2.46    0.76
  18   15.12   15.13   13.32   11.54    9.74     8.0     6.2    4.31    2.51    0.77
  19   15.94   15.91   14.11   12.15   10.22    8.31    6.42    4.58     2.6    0.75
  20   16.76   16.72   14.82   12.75    10.8    8.85    6.78    4.72    2.76    0.79

Hero - success rate

           1       2       3       4       5       6       7       8       9      10
   1     0.9     0.9     0.8    0.69    0.59     0.5    0.39     0.3     0.2     0.1
   2    0.81    0.81     0.8    0.77    0.72    0.64    0.56    0.45    0.33    0.17
   3    0.97    0.97    0.92    0.87    0.81    0.74    0.66    0.54    0.39    0.22
   4    0.95    0.94    0.94    0.91    0.87     0.8    0.71    0.59    0.45    0.25
   5    0.99    0.99    0.97    0.94    0.91    0.84    0.76    0.65     0.5    0.28
   6    0.99    0.98    0.98    0.96    0.93    0.88     0.8    0.68    0.53     0.3
   7     1.0     1.0    0.99    0.97    0.95     0.9    0.83    0.72    0.55    0.32
   8    0.99     1.0    0.99    0.98    0.96    0.92    0.85    0.74    0.57    0.33
   9     1.0     1.0    0.99    0.99    0.97    0.94    0.88    0.77     0.6    0.34
  10     1.0     1.0     1.0    0.99    0.98    0.95    0.89    0.79    0.61    0.35
  11     1.0     1.0     1.0    0.99    0.98    0.96     0.9    0.81    0.64    0.36
  12     1.0     1.0     1.0     1.0    0.98    0.97    0.91    0.82    0.65    0.37
  13     1.0     1.0     1.0     1.0    0.99    0.97    0.93    0.84    0.66    0.37
  14     1.0     1.0     1.0     1.0    0.99    0.98    0.94    0.86    0.67    0.38
  15     1.0     1.0     1.0     1.0    0.99    0.98    0.94    0.86    0.69    0.38
  16     1.0     1.0     1.0     1.0    0.99    0.98    0.95    0.87     0.7    0.38
  17     1.0     1.0     1.0     1.0     1.0    0.99    0.96    0.88    0.71    0.38
  18     1.0     1.0     1.0     1.0     1.0    0.99    0.96    0.88    0.71    0.39
  19     1.0     1.0     1.0     1.0     1.0    0.99    0.97     0.9    0.72    0.39
  20     1.0     1.0     1.0     1.0     1.0    0.99    0.97    0.91    0.73    0.41

Hero - failure rate

           1       2       3       4       5       6       7       8       9      10
   1     0.0     0.0     0.1     0.2    0.29     0.4     0.5    0.61     0.7     0.8
   2    0.18    0.18    0.16    0.17     0.2    0.26    0.33    0.41    0.53    0.66
   3     0.0     0.0    0.05    0.09    0.14    0.19    0.25    0.32    0.43    0.56
   4    0.05    0.05    0.05    0.06     0.1    0.14     0.2    0.27    0.36    0.49
   5     0.0     0.0    0.02    0.04    0.07     0.1    0.16    0.23    0.32    0.44
   6    0.01    0.02    0.02    0.03    0.05    0.08    0.13    0.19    0.29     0.4
   7     0.0     0.0    0.01    0.02    0.03    0.06    0.11    0.17    0.25    0.37
   8     0.0     0.0    0.01    0.01    0.03    0.05    0.09    0.15    0.23    0.33
   9     0.0     0.0     0.0    0.01    0.02    0.04    0.08    0.13    0.21    0.31
  10     0.0     0.0     0.0    0.01    0.02    0.03    0.06    0.12     0.2    0.29
  11     0.0     0.0     0.0     0.0    0.01    0.02    0.06    0.11    0.19    0.27
  12     0.0     0.0     0.0     0.0    0.01    0.02    0.05     0.1    0.17    0.27
  13     0.0     0.0     0.0     0.0    0.01    0.02    0.04    0.09    0.17    0.26
  14     0.0     0.0     0.0     0.0    0.01    0.02    0.04    0.08    0.15    0.25
  15     0.0     0.0     0.0     0.0     0.0    0.01    0.03    0.08    0.15    0.25
  16     0.0     0.0     0.0     0.0     0.0    0.01    0.03    0.06    0.14    0.22
  17     0.0     0.0     0.0     0.0     0.0    0.01    0.02    0.06    0.14    0.22
  18     0.0     0.0     0.0     0.0     0.0    0.01    0.02    0.06    0.13    0.22
  19     0.0     0.0     0.0     0.0     0.0    0.01    0.02    0.06    0.12    0.21
  20     0.0     0.0     0.0     0.0     0.0     0.0    0.02    0.04    0.12     0.2

Hero - critical failure rate

           1       2       3       4       5       6       7       8       9      10
   1     0.1     0.1     0.1     0.1     0.1     0.1     0.1     0.1     0.1     0.1
   2    0.01    0.01    0.03    0.05    0.07    0.09    0.11    0.13    0.15    0.16
   3    0.03    0.03    0.03    0.04    0.06    0.08     0.1    0.13    0.17    0.23
   4     0.0     0.0    0.02    0.02    0.04    0.06    0.09    0.13    0.19    0.25
   5    0.01    0.01    0.01    0.02    0.03    0.05    0.08    0.13    0.19    0.28
   6     0.0     0.0    0.01    0.01    0.03    0.04    0.07    0.12     0.2    0.31
   7     0.0     0.0    0.01    0.01    0.02    0.04    0.07    0.11    0.19    0.32
   8     0.0     0.0     0.0    0.01    0.01    0.03    0.06    0.11    0.19    0.33
   9     0.0     0.0     0.0     0.0    0.01    0.02    0.05     0.1    0.19    0.34
  10     0.0     0.0     0.0     0.0    0.01    0.02    0.04    0.09    0.18    0.36
  11     0.0     0.0     0.0     0.0    0.01    0.02    0.04    0.08    0.18    0.36
  12     0.0     0.0     0.0     0.0     0.0    0.01    0.04    0.08    0.19    0.36
  13     0.0     0.0     0.0     0.0     0.0    0.01    0.03    0.08    0.18    0.37
  14     0.0     0.0     0.0     0.0     0.0    0.01    0.03    0.07    0.17    0.38
  15     0.0     0.0     0.0     0.0     0.0    0.01    0.03    0.07    0.16    0.38
  16     0.0     0.0     0.0     0.0     0.0    0.01    0.02    0.06    0.16    0.38
  17     0.0     0.0     0.0     0.0     0.0     0.0    0.02    0.05    0.16    0.39
  18     0.0     0.0     0.0     0.0     0.0     0.0    0.02    0.05    0.16     0.4
  19     0.0     0.0     0.0     0.0     0.0     0.0    0.02    0.05    0.15    0.39
  20     0.0     0.0     0.0     0.0     0.0     0.0    0.01    0.05    0.15    0.41

About

Creates a table of success/failure probabilities and average number of success for the World of Darkness system

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages