# Are my AnyDice calculations for the Old World Of Darkness correct?

Here is my program on AnyDice.com.

Are there any mistakes in it? The program is well-commented, so it should be easy to understand things.

I am writing an article about oWoD (more specifically, V20) odds, usefullness of some skills, and if some of the calculations are incorrect, the whole article will be useless. So please, help me. :)

P.S. I should credit the developer of for answering my questions about syntaxis of AnyDice for almost 2 hours, and also helping me with the concept of one function (even though I rewrote things almost entirely :3).

• If you haven't seen it already, the creator of AnyDice implemented a slightly different program for oWoD; it may be a useful reference point. rpg.stackexchange.com/questions/39597/… – Alan De Smet Apr 19 '17 at 20:17
• @AlanDeSmet Oh, I have, for sure, seen it, and discussed my program with AnyDice creator. (OMG is it you? Hello then!) However, I have made a lot of improvements since that chat session, so I gonna update the link. Anyway, I see that it wasn't a good idea to ask RPG.SE to find mistakes in my program. – Baskakov_Dmitriy Apr 19 '17 at 20:41

# No.

You can recognize this from the first cell, which should be 0.9 (results of 2,3,4,5,6,7,8,9,0 are all 1 success, 1 is 0 successes and is also a botch).

$$\frac{9 \times 1 + 1 \times 0}{9+ 1} = \frac{9 + 0}{10} = 0.9$$

Per clarification in the comments, you are looking specifically at V20 (Onyx Path's 20th anniversary edition of Vampire: The Masquerade). The general case for that is actually fairly convoluted, but ends up just being plug-and-chug. Some specifics are complexer enough that I won't address them.

The core Storyteller resolution mechanic works by rolling some number ("dice pool", which I will call n) of ten-sided dice. Any which show a result equal to or greater than a given "target number" (which I will call t) are "successes," and the output of this trial is the number of successes.

So far, so good: that's a completely standard binomial distribution. The expected number of successes should simply be

$$(11-t)/10 \times n$$

…the likelihood of rolling exactly k successes is

$$\left( \frac{11-t}{10} \right) ^ k \times \left( \frac{t-1}{10} \right) ^ {n-k} \times \frac {n!} {k! \times (n! - k!)}$$

…and the likelihood of rolling at least k successes is the sum from k to n of the above. That's all very generic, and doesn't account for the little quirks each institution of Storyteller adds. V20 also includes a rule that if any faces in the entire roll show a 1, one success is subtracted from the total (the specific wording is a little ambiguous, but browsing around convinces me that's the intent). That's… suddenly a lot of bookkeeping. But okay.

There are a couple of ways to go after this. This is likely the most intuitive:

Each term from the binomial probability distribution above has some likelihood of a "1" appearing, and lowering the output. That likelihood varies by number of successes and dice rolled (e.g. If you roll three dice and all three are successes, obviously none of them can be "1"), and by target number (e.g. given that you have a die which failed at t=2, you know it's a 1. Given the same at t=9, it's a 1/8th chance that it's a 1). So, that likelihood of at least one 1 showing up given n, k, and t is

$$1 - \left( \frac{t-2}{t-1} \right) ^ {n-k}$$

So, then we subtract that percentage from each k number of successes, but add the amount for k+1 successes decrementing (except at k=n, where we just subtract).

So for k=0:n-1, likelihood of k successes =

$$\left[ \left( \frac{11-t}{10} \right) ^ k \times \left( \frac{t-1}{10} \right) ^ {n-k} \times \frac{n!}{k! \times (n! - k!)} \right] - \left[ 1 - \left( \frac{t-2}{t-1} \right) ^ {n-k} \right] + \left[ 1 - \left( \frac{t-2}{t-1} \right) ^ {n-k+1} \right]$$

…and at k=n, likelihood of k successes is a special case anyway, so is simply

$$\left( \frac{11-t}{10} \right) ^ n$$

V20 also includes some edge cases where rolls showing "10" might be worth two successes each. That's enough more complicated that it should be a separate question and answer.