Jump to content
Sign in to follow this  
SirToastsalot

Dice Calculator Help

Recommended Posts

Hey all,

So I'm trying to work on an armada dice calculator.  X-wing has an online one and its super helpful so I've been slowly building one.  I started with just a basic enter number of dice and it will return expected damage, expected crits, expected accuracy results, chance of at least 1 crit, chance of at least 1 accuracy, and the individual chance of a crit on each color die.

My next step is accounting for brace tokens and ECM.  I'm not 100% sure how to implement this since its been a while since I've done any probabilty.
What I currently has is Expected Damage - (Expected damage/2*(1-Odds of rolling at least 1 accuracy)).  

So for example:

Expected damage from 3 red and 4 blue: 5.25

Odds of rolling at least 1 crit on 3 red and 4 blues is 78.80%

Expected damage with a brace token is 2.625

So 5.25-(2.65*(1-.7880)) = 4.69 expected damage.

Am I implementing this correctly?

Share this post


Link to post
Share on other sites

Basically trying to make more user friendly. Have a spot to input if you have brace and if you have ECM etc. Just have a single space for output. So if you have a brace token and ECM it means you'll always be able to brace the attack. This started out as a thing to determine if ECM or EWS was better against a 3 red 3 black die attack. 

 

But if it's just expected damage do you need to round up first? If the expected damage is 5.25 without a brace, then with a brace expect should be 2.63. 

Share this post


Link to post
Share on other sites

Hmm.  You’re right, simply rounding up isn’t correct.  But brace doesn’t just halve damage, which affects the math.

For instance, if your average damage is 4.5 before brace, it’s not just halved to 2.25; it’s slightly higher than that because every instance in which 3 damage occurs leads to 2 after brace, not 1.5.  Same with outcomes resulting in 5 initial damage.

So unless I’m mistaken, you need to find the chances of having even or odd damage totals, then translate them to brace that way.  This will vary by color and number of dice rolled.

Take an attack pool of 1 black die.  We know there’s a 25% chance of 2 damage, which can be braced to 1.  There’s a 25% chance of 0 damage.  And then there’s a 50% chance of 1 damage, which can’t be reduced by brace, for a total of 0.75 average damage.

This gets challenging quickly and doesn’t *necessarily* seem to scale (a pool of 2 black dice, for example, deals 1.25 avg damage after brace.) Even just a pool of 2 red dice is tricky (note the integers are the damage after bracing, multiplied by the probability):

(0.1406*0)+(0.375*1)+(0.3437*1)+(0.125*2)+(0.0156*2) = ~1 avg damage.  Halving the pool would have yielded 0.75 (which makes this a bad example, because it would happen to work plugged into the original formula.)

There is probably a pattern, but it’s 2:30AM where I am and I don’t have the mental energy to find it right now :)

Edited by The Jabbawookie

Share this post


Link to post
Share on other sites
4 hours ago, The Jabbawookie said:

Hmm.  You’re right, simply rounding up isn’t correct.  But brace doesn’t just halve damage, which affects the math.

For instance, if your average damage is 4.5 before brace, it’s not just halved to 2.25; it’s slightly higher than that because every instance in which 3 damage occurs leads to 2 after brace, not 1.5.  Same with outcomes resulting in 5 initial damage.

So unless I’m mistaken, you need to find the chances of having even or odd damage totals, then translate them to brace that way.  This will vary by color and number of dice rolled.

There is probably a pattern, but it’s 2:30AM where I am and I don’t have the mental energy to find it right now :)

Ok you're right, now I see the issue. I hadn't considered that before. So then it may be a little more complicated than I thought. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...