PDA

View Full Version : Spellcasting [probability calculator]

ElBeaver
29-07-2012, 15:43
somewhat small functionality as of this writing, but I wanted to get some feedback before continuing any eventual development. It is a simple webpage that loads a "program" on anydice.com and shows the result in an iframe. Calculator is here: Spellcasting (http://fmitcar.appspot.com/static/spellcast.html)

It takes critical failure into account, and also calculates the chance of irresistible force.

Feedback appreciated!

edit:

It is simply too much of a hassle to do a nice setup with this. Instead go to this link and only edit the top of the program. There are 3 variables which are fairly self explanatory. These are the only things one should edit. Put in the values you like then hit calculate.

moar edit

updated the program description:

This program helps you decide how many power dice you should spend on a spell if you expect your opponent will attempt to dispel it.
Why is this important? You only have, on average, 2.7 more power dice than your opponent in your own magic phase.
The previous program tells us that there is a 95% chance to beat a spell with casting value 10 as a level 4 wizard with 3d6, and this program then tells you if you that a if a level 1 wizard will attempt to dispel this spell with 3d6 there is still 70.7% chance it will succeed. That drops to 63% if the casting wizard is only level 3, and down to 54.6% if level 2. That same wizard will succeed almost 84% of the time if the dispelling wizard has only 2d6 to dispel with. Knowledge is power!

Lord Dan
29-07-2012, 16:46
I'm sort of confused by it. For example if you choose "Lv. 1" and "2D6", it says you have a 100% chance of casting a spell that requires a 4+ to cast, which is not true.

ElBeaver
29-07-2012, 17:20
I'm sort of confused by it. For example if you choose "Lv. 1" and "2D6", it says you have a 100% chance of casting a spell that requires a 4+ to cast, which is not true.

yeah, it does call for an explanation. And you did point out a mistake on my behalf. I am not sure how AnyDice would include critical failure and irresistible force into one calculation (as I recall it from school it is something called conditional probability), alas I tried to do so anyways - will be fixed right away.

To elaborate on your example there is a 100% chance that you will a total of atleast 3 (not 4 as my calculations suggested) with a lvl 1 wizard using two powerdice in the absence of critical failure.

I will try and investigate if the critical failure can be included into the calculation (it does skew the 1d6 and 2d6 numbers abit)

Lord Dan
29-07-2012, 17:28
Is there a way to just subtract the chance of a critical failure from each result for one dice and two dice? Unless I'm missing something you'd just need to 33% from each for one dice (for natural rolls of 1 and 2) and subtract 2.7% from each for two dice (for natural rolls of 2).

Lorcryst
29-07-2012, 17:52
Just my two cents, but remember that you need a natural dice score of at least 3 to cast a spell in 8th ed ... so with 1D6, results of 1 and 2 are automatically failed even for a lvl 4 wizard casting a spell that requires a 4+ to cast ...

Same thing with 2D6, a double-1 result fails whatever the lvl of the wizard or the difficulty of the spell.

With 3D6 and up, you eliminate that "below 3 is failed" problem, the minimum being 3 ...

Finally, when I try to follow the "Spellcasting" link on my computer, I get a white page with two dropdown menus, for level 1 to 3 (not up to 4, even 5 for Arkhan the Black), and a max of 5D6 on the second dropdown menu ... but even after playing with all of the combinations, the "show me" button does absolutely nothing ...

Is this for iPads only ? (noted the iframe term, not sure if that's a typo)

Moss
29-07-2012, 17:58
Getting the same problem as Lorcryst. Running Explorer9 on Windows 7. Should I play with my internet options or is there no way I can run it?

ElBeaver
29-07-2012, 18:12
Just my two cents, but remember that you need a natural dice score of at least 3 to cast a spell in 8th ed ... so with 1D6, results of 1 and 2 are automatically failed even for a lvl 4 wizard casting a spell that requires a 4+ to cast ...

Same thing with 2D6, a double-1 result fails whatever the lvl of the wizard or the difficulty of the spell.

With 3D6 and up, you eliminate that "below 3 is failed" problem, the minimum being 3 ...

Finally, when I try to follow the "Spellcasting" link on my computer, I get a white page with two dropdown menus, for level 1 to 3 (not up to 4, even 5 for Arkhan the Black), and a max of 5D6 on the second dropdown menu ... but even after playing with all of the combinations, the "show me" button does absolutely nothing ...

Is this for iPads only ? (noted the iframe term, not sure if that's a typo)

Yes, I am aware of how the critical failure works. I am trying to encompass this, but I am no probability expert by far, and the AnyDice language is rather cumbersome.

The iframe is afaik not iPad or Apple related, but I have heard about troubles with IE and iframes not reloading properly. I will make it open in a new tab instead. Should work on all browsers (more or less) :D

ElBeaver
29-07-2012, 18:33
Finally, when I try to follow the "Spellcasting" link on my computer, I get a white page with two dropdown menus, for level 1 to 3 (not up to 4, even 5 for Arkhan the Black), and a max of 5D6 on the second dropdown menu ... but even after playing with all of the combinations, the "show me" button does absolutely nothing ...

the limited functionality is intentional. I have to copy-paste the link to all combinations of "programs" on AnyDice, which is 12x5=60 links. When the math is solid I will expand it. And it should work on IE now (atleast on my testmachine)

ElBeaver
29-07-2012, 19:00
Is there a way to just subtract the chance of a critical failure from each result for one dice and two dice? Unless I'm missing something you'd just need to 33% from each for one dice (for natural rolls of 1 and 2) and subtract 2.7% from each for two dice (for natural rolls of 2).

I don't think probability works that way. For instance, with 2d6+1 there is a 83.33% probability that one will roll atleast a total of 6. Besides what AnyDice is working on is collections of dice, which one operates on, and then it outputs the sum of all combinations along with the probability, ie. 2d2: (1,1),(1,2), (2,1),(2,2) would give you 2 with 25% probability, 3 with 50% probability and 4 with 25% probability.
What you suggest is that we substract 25% (chance of double 1's) which would yield 0% chance of getting a 2, 25% chance of getting a 3 and again 0% chance of getting 4.
If we instead remov the double 1's we would get (1,2), (2,1),(2,2) and then the odds would suddenly be 66.67% probability of getting a 3 and a 33.33% probability to get a 4.

summa sumarum: none of it makes sense. I will try and ask the author if he can deploy that big brain of his. He is after all the expert.

Lorcryst
29-07-2012, 19:20
The iframe is afaik not iPad or Apple related, but I have heard about troubles with IE and iframes not reloading properly. I will make it open in a new tab instead. Should work on all browsers (more or less) :D

Ok, the problem was on my end, got it to work finally, and it indeed opens a new browser window to show the results on AnyDice.

I simply had a game playing in "full screen" mode alt-tabbed out ... that blocked the opening of new windows from my browser :p

ElBeaver
29-07-2012, 19:28
Ok, the problem was on my end, got it to work finally, and it indeed opens a new browser window to show the results on AnyDice.

I simply had a game playing in "full screen" mode alt-tabbed out ... that blocked the opening of new windows from my browser :p

cheers!! I believe the math is sound now in regards to critical failure as well.

Lord Dan
29-07-2012, 20:20
I don't think probability works that way. For instance, with 2d6+1 there is a 83.33% probability that one will roll atleast a total of 6. Besides what AnyDice is working on is collections of dice, which one operates on, and then it outputs the sum of all combinations along with the probability, ie. 2d2: (1,1),(1,2), (2,1),(2,2) would give you 2 with 25% probability, 3 with 50% probability and 4 with 25% probability.
What you suggest is that we substract 25% (chance of double 1's) which would yield 0% chance of getting a 2, 25% chance of getting a 3 and again 0% chance of getting 4.
If we instead remov the double 1's we would get (1,2), (2,1),(2,2) and then the odds would suddenly be 66.67% probability of getting a 3 and a 33.33% probability to get a 4.

summa sumarum: none of it makes sense. I will try and ask the author if he can deploy that big brain of his. He is after all the expert.

Sorry, I explained myself rather poorly. I only meant that you need to subtract the critical failure from the odds of those spells that could be cast on the roll of a 1 or 2, were it not for the rule stating otherwise. The easiest way to do this is to have the generator automatically convert scores of 100% on one dice to 77%, and scores of 100% on two dice to 97.2%. Let me show you what I mean:

1D6, in the case of a Lv. 2.

3+ - 77% (Success on roll of 3, 4, 5, or 6) <-- Needs to be modified from 100%
4+ - 77% (Success on roll of 3, 4, 5, or 6) <-- Needs to be modified from 83%
5+ - 77% (Success on roll of 3, 4, 5, or 6)
6+ - 50% (Success on roll of 4, 5, or 6)

On 2D6 for Lv. 2:

3+ - 97.2% (Success on roll of 3+) <-- Needs to be Modified from 100%
4+ - 97.2% (Success on roll of 3+) <--Needs to be modified from 100%
5+ - 97.2% (Success on roll of 3+)
6+ - 94.4% (Success on roll of 4+)

I hope this clears things up a bit.

ElBeaver
29-07-2012, 20:35
Sorry, I explained myself rather poorly. I only meant that you need to subtract the critical failure from the odds of those spells that could be cast on the roll of a 1 or 2, were it not for the rule stating otherwise. The easiest way to do this is to have the generator automatically convert scores of 100% on one dice to 77%, and scores of 100% on two dice to 97.2%. Let me show you what I mean:

1D6, in the case of a Lv. 2.

3+ - 77% (Success on roll of 3, 4, 5, or 6) <-- Needs to be modified from 100%
4+ - 77% (Success on roll of 3, 4, 5, or 6) <-- Needs to be modified from 83%
5+ - 77% (Success on roll of 3, 4, 5, or 6)
6+ - 50% (Success on roll of 4, 5, or 6)

On 2D6 for Lv. 2:

3+ - 97.2% (Success on roll of 3+) <-- Needs to be Modified from 100%
4+ - 97.2% (Success on roll of 3+) <--Needs to be modified from 100%
5+ - 97.2% (Success on roll of 3+)
6+ - 94.4% (Success on roll of 4+)

I hope this clears things up a bit.

That should work now. Thx for pointing it out in the first place.

ElBeaver
30-07-2012, 21:44
I have split the programs into 4 different parts, each with a short explanation. Hope someone finds them useful :D