Dice simulator

By sigidi, in Star Wars: Legion

I have been working on yet another dice simulator. Mostly as personal learning project, but also because the other ones I know of are all made in excel and due to the nature of excel are rather slow. Also they are hard to use on mobile. So I figured I make something myself. It probably is not error free and I am still working on it, but I would love some feedback on it:

https://swlegion.space

My code is available on GitHub if you are curious.

Very nice! This is definitely easier to use on mobile than an excel spreadsheet.

A few suggestions:

Give the option to do more than 25 iterations. That's a pretty small sample size.

Put in the option for more defense options, cover, and dodge.

As for actual feedback our numbers agree so that is great!
You don't need things like Low profile or cover X because the user can just manually put in the cover they want in the cover field. (Low profile + cover 1 might as well just be entered as cover 2)

Edited by Qark
1 minute ago, Lochlan said:

Put in the option for more defense options, cover, and dodge.

Click advanced

1 minute ago, Lochlan said:

Very nice! This is definitely easier to use on mobile than an excel spreadsheet.

A few suggestions:

Give the option to do more than 25 iterations. That's a pretty small sample size.

Put in the option for more defense options, cover, and dodge.

Thanks! The simulations does actually do 100000 rolls :) it just shows the first 25 to get an idea. There are more options under the 'advanced' buttons, which I must agree are well hidden.

6 minutes ago, Qark said:

My code is available on GitHub if you are curious.

Cool I will have a look (and vice versa: https://github.com/jurriaanr/legion-dice )

3 minutes ago, Qark said:

As for actual feedback our numbers agree so that is great!
You don't need things like Low profile or cover X because the user can just manually put in the cover they want in the cover field.

Yeah I was thinking that at first as well, but I got on a 'roll'. Hope this is more natural for some people, but you are right

5 minutes ago, Qark said:

Click advanced

4 minutes ago, sigidi said:

Thanks! The simulations does actually do 100000 rolls :) it just shows the first 25 to get an idea. There are more options under the 'advanced' buttons, which I must agree are well hidden.

So I saw the advanced button for attacker mods, but I think the button for defense may not have loaded the first time I opened it? Because I looked for it and didn't see it, but maybe I'm just blind lol. It's definitely there now. Regardless, disregard! Great work!

Thanks for the work. I use @Qark Calculator all the time and now I have another option as well. And if both calculators get comparable results that is a nice verification too.

Edited by Decarior

After playing around with it a bit more, I do have a question:

For the results displayed at the bottom, in the attack dice section, is it showing results before reroll, or after them? Because I have noticed that frequently the number of defense dice shown will be greater than the number of hits/crits shown.

The results that are imediately visible are before any modifiers applied or dices rerolled. If you click on a row you can see the results after all modifications and rerolls. So yeah, it can happen that the results are showing less hits than defense dices. I have been thinking about which results makes more sense to show. I felt like this gave a more natural feel of what you would see after rolling the dice

Ok, I see that now. I think I would prefer to just see the final modified dice, with the option to see both maybe?

Also, I did notice one thing that could be added: surge tokens (for offense and defense, of course).

4 hours ago, Lochlan said:

Ok, I see that now. I think I would prefer to just see the final modified dice, with the option to see both maybe?

Also, I did notice one thing that could be added: surge tokens (for offense and defense, of course).

Yeah I can make it optional, will look at that tomorrow :) And surge tokens is on my list to add (as well as shield tokens and Danger sense)

Ok, options added (settings drop down top right) and added missing keywords and tokens. Thanks for the feedback!

So I'm not sure it's calculating multiple aim tokens correctly. I wanted to see what Bossk's average hits would be on a Lying in Wait turn with 8 aim tokens, and looking through the example rolls at the bottom, there are an awful lot of blanks in there. Just from my own quick tests with 25 sets of rolls, I got some very different results. Without fishing for crits, I averaged 4.8 hits/crits, versus the simulator's ~3.4. 80% of my rolls had 5 hits/crits, and none of them had more than 1 blank.

Also, just for fun, it would be nice to have the option to fish for crits in the simulator.

Oh wow... well you are abolutely right. This is an eye opener for me and shows that I dont play competative, but I never knew you can reroll dice more than once. So yeah, that needs to be rewritten. Good catch! But what do you mean fish for crits?

1 hour ago, sigidi said:

Oh wow... well you are abolutely right. This is an eye opener for me and shows that I dont play competative, but I never knew you can reroll dice more than once. So yeah, that needs to be rewritten. Good catch! But what do you mean fish for crits?

That means rerolling anything that isn't a crit, say if you are attacking something with armor for example, or if the defender has dodge/cover that you want to negate.

Ah, that's basically what it does when you check armor in the advanced defense options

18 hours ago, sigidi said:

Oh wow... well you are abolutely right. This is an eye opener for me and shows that I dont play competative, but I never knew you can reroll dice more than once. So yeah, that needs to be rewritten. Good catch! But what do you mean fish for crits?

Is this fixed in the latest version? Great tool btw.

46 minutes ago, Thraug said:

Is this fixed in the latest version? Great tool btw.

Thnx! Unfortunately not yet, had a certain movie to watch :) I will fix it this weekend

I lied, it should be fixed!

Edited by sigidi