I Hacked Up A Die Roller

By MuttonchopMac, in Rules Questions

3 hours ago, rcuhljr said:

I built my own roller for doing outcome analysis and the only useful way I've found doing statistics is that you need to generate the data relative to a target number of successes and opportunities. At least in my play experience I'm looking for a specific outcome on both axis, like when I want to hit and crit, or charge and do damage. So you pick your kept dice based on what's the most likely combination to get to your target combination and then explode the dice and see if you made it.

Makes sense. So did you give the user criteria for how the system keeps dice? Like, "I want to minimize Strife", "I'm in Fire Stance, so Strife is fine and I just want the most net Successes", etc (obviously in more software-ish language). I hesitate to add any features like this because everyone is going to have their own strategies and gut instincts for dice that are hard to quantify, especially around a decision like, "Do I take this Success or the Explosion with a Strife and gamble on a second Success to hit the goblin when my Strife is already running high?"

On 10/16/2017 at 4:17 AM, kelpie said:

Actually, when you select the "exploding die", you then need to right click and select "explode". It could be way more cooler if it would be automatically exploded while you select it (or, dunno, maybe a double click?)
Or also: a nice button on the right with "explode" written on top; when someone click on the button, it auto-explode all the selected dice who whould explode. That could give some problem if multiple exploding dice happens, however, so you will need also a way to mark an exploding die as "already exploded" :)
Dunno how you code it, but something like a flag variable set at 0 whenever you roll it (so it's not rolled again when you hit again the button)

As for Void point you can put a simple button "add more dice". When you hit it, it roll one more die. If you need to spend more void point, just hit the button twice or more :)

As for strife feature, you can add a simple counter, that will keep track of all the strife you rolled until you hit a "reset" button. You can also put a composure box where you state your composure, and the strife counter will become red if total higher than the composure (you can also put an "outburst" button who automatically halves your strife when you do outburst)

In the far future something like an "roll option" panel could be interesting too:
in a secondary panel you can select advantage, techniques, etc from drop-down menus. That's will automatically add more dice to the roll so you need to roll your skill+trait dice and it automatically add techniques bonuses or like

Keep in mind, that are only "far future ideas"; none of those are necessary to use the roller :) and that does'nt diminish the good roller you already did :)

I guess I could see about double clicking to explode a die. The reason for Right Click -> Explode is that by the rules, you are required to commit to keeping a die before seeing how it explodes (see pg 14). After the explosion, you have to commit that that new die before exploding again. Right Click -> Explode preserves the integrity of a roll by preventing accidentally exploding a die that you're not yet sure about keeping. The moment a player sees the explosion result in an unintended fashion, this gambling mechanic is tainted. Would other people be interested in a double-click to explode a die feature?

Void points have to be spent before the roll (see pg 21). There's no reason to have a special button for this because you can never add a die via a Void point after the roll results are seen. Just grab an extra die before clicking Roll and you'll be good. ;)

Regarding Strife, Composure, and Advantage / Techniques, this is for rolling the dice - it's not a digital character sheet and I'm never going to go that far with it, even in the distant future, since I intend to play with paper, dice, and maybe some red glass beads to track Strife once actual dice are available.

That said, I could add a super simple number box for tracking Stress with a couple arrows to increase or decrease the running total. Clicking once or twice on an up arrow would be no less convenient / error prone than having a Commit button that locks your dice until a new roll and adds Strife. Would other people be interested in a minimalist Strife counter such as this on the roller?

cool

you mentioned some problem i never thought of (like "accidentally exploding a dice")... well, that's make lot more sense :)
that's the reason why i'm not a programmer... :mellow:

btw, again: good work!

22 minutes ago, kelpie said:

cool

you mentioned some problem i never thought of (like "accidentally exploding a dice")... well, that's make lot more sense :)
that's the reason why i'm not a programmer... :mellow:

btw, again: good work!

Haha, well I work in tax software, so the goal is to prevent users from making mistakes... Stuff like this is second nature to me. :rolleyes:

1 hour ago, MuttonchopMac said:

Makes sense. So did you give the user criteria for how the system keeps dice? Like, "I want to minimize Strife", "I'm in Fire Stance, so Strife is fine and I just want the most net Successes", etc (obviously in more software-ish language). I hesitate to add any features like this because everyone is going to have their own strategies and gut instincts for dice that are hard to quantify, especially around a decision like, "Do I take this Success or the Explosion with a Strife and gamble on a second Success to hit the goblin when my Strife is already running high?"

I basically just made one toggle, which either marks strife as unacceptable, or just fine. Technically with things like fire stance and Akodo I should have an option for preferring strife, but that wasn't super interesting to me. The question of which dice to keep is super tricky, and I actually used the roller itself to verify a bunch of my mental processes for how to best select which dice to keep in any given situation. The current best choice algorithm I've found is as follows, stopping when you're at your kept limit. I use a concept I call shortfall, which basically estimates how many explosions you'll need to get from where you are to where you want.

  1. Have you picked fewer dice than your shortfall and still have skill die explosion? Keep that die
  2. Have you picked fewer dice than your shortfall and still have ring die explosion? Keep that die
  3. Take any succ+op dies. (If I add an option to _really_ ignore opportunities in favor of success this step is non optimal)
  4. If you're short on opportunity still, take opportunity faces.
  5. Take any remaining explosions
  6. Take any remaining successes

I think there are still some weird edge cases possible with exceedingly high or low opportunity targets, but I haven't found a setup that performs better than this so far across a variety of inputs. This is also hampered in that I don't have years of experience with the system yet so it's hard for me to feel confident fully in the concept.

Hmmm... I feel like there are a number of people who would love it if you uploaded your program somewhere. Myself included, because I wouldn't feel obligated to recreate that algorithm. ;)

31 minutes ago, rcuhljr said:

The shame of sharing terrible hacky code will trigger Haunted I suspect. https://github.com/rcuhljr/FFG-L5R-Dice-Sim

Haha, possibly. You may not have seen my first die roller draft - it was a console application controlled by typing numbers and pressing enter. Super janky.

Ah, Ruby... Never looked into Ruby before, so I can't tell if it's hacky or not. For all I know you are the greatest Ruby coder the world has ever seen.

Looks decent.