Support totaliser in ordinary dice button component

*So long as you choose a Custom install in the Windows installer.

Most crucially, if you want to do any experimentation with a test build, MAKE A BACKUP COPY of your module work in progress. Saving a module in a 3.6.0 test build will render it unable to be opened in 3.5.8, as I recall.

The correct latest version is one of the files commencing with ’ VASSAL-3.6.0-SNAPSHOT-96daedb-10506-Dice_Results that is suitable to your hardware.

Right, Joel. Until V 3.6 has been around a while, I’d rather continue to use V 3.5.8 to complete the building of my module and then maybe save a copy under 3.6. For this experiment, I’ll install a stand alone V 3.6 running from a different drive. Brent - thanks to the team for all the work.

Great!

Thinking about this a bit more, I wonder if $results$ should continue to display the raw results (prior to the keep test being applied) or alternatively, if there should be a $raw_results$ new variable to allow for display of the raw results…

While I personally don’t care about the raw results, I know some players have a strong preference to see all the die roll results and not just the count or sum…

@Brent_Easton

Any chance we can get the ā€œlocking of fieldsā€ in the player prompt for die rolls into 3.6 before release (i.e., ability to let players choose # of dice, but module designer can lock the number of die sides, additions per die, etc.)?

Can you please try the [VASSAL-3.6.0-SNAPSHOT-2748c86-DiceLockValues (Builds of vassalengine/vassal) build.

Brent - the locking appears to be working correctly, tried a number of permutations…

Only thing I noticed is when using the keep count (i.e., keep only rolls >5), the $results$ in report is showing all of the non-kept values as zeros rather than their original raw values.

Thanks much for getting this into the build!

Vassal 3.6.0 Beta-6

When using ā€œKeep Countā€ function:
$result$ - reports ā€œ0ā€ for kept rolls and nothing for non-kept rolls
(Ideally should report raw results prior to keep test)

$result#$ - reports nothing

Additional testing…

The ā€œ0ā€ results appear when ALSO checking the ā€œSort Dice Resultsā€ box.

If the ā€œSort Dice Resultsā€ box is NOT checked, then the kept values show up correctly (i.e., not as zero).

Thanks, got it. Will look into it.

Could you please try build VASSAL-3.6.0-SNAPSHOT-bd45606-10814-DiceIssues in vassalengine.org/builds and see if this resolves the problem? This fix will be going directly into the 3.6.0 release, so I would appreciate it if you could give it a try.

I also fixed a secondary problem where the $resultn$ values in the report format where not having their old values cleared if the number of kept dice reduced between rolls.

Thanks,
Brent.

Tested w/ WIN64 version
Issues/Fixes

  1. Zeros showing up in $results$ when using Sort option
    FIXED - numbers no longer show up as zero whether sorted or unsorted

  2. $results#$ not working
    This was my error, I was misunderstanding how the parameter should be used
    Recommend including in documentation an example
    Example - $results1$ will return how many "1"s are rolled

  3. $results$ returns only post keep test value and discard original rolls that don’t meet test
    Still an issue - my lead playtester commented he really wants to able to see all the rolls, not just the kept rolls
    Recommend - $results$ should display the original results prior to the keep test OR add a new parameter to allow display of ALL results

That’s not how it was intended to work. $result1$ is the first kept result.

If you want the counts of individual results, I could add $count1$…$count6$ to return the counts of rolls kept.

I think an additional set of variables is a better option. The principle of least surprise argues that a report of the results should include the only the rolls of interest, not all the rolls that where thrown away.

I think an additional set of variables is a better option. The principle of least surprise argues that a report of the results should include the only the rolls of interest, not all the rolls that where thrown away.

I agree, although I think there will be a very common use case where someone wants to show ā€œhere is a list of all the dice that were rolled, in the order that they were rolledā€, and so there should be a fairly straightforward way to generate/display that.

Brent - I don’t intend to use the $results#$, so that was must me misinterpreting again… (also why and example would help clarify).

I was just trying to full test the capability…

Brian - your point is exactly what my lead playtester observed… he wants to see all the rolls in the order they were rolled, even if 99% of the time, all he cares about is the total # of relevant rolls… He’s an analysis geek by (retired) trade… :stuck_out_tongue:

1 Like

Current Dice report $$ variables:

  • name - name of the button
  • result - The kept total if ā€˜Report Total’ option checked, or a list of the kept rolls if not.
  • result# - The #th kept roll. smallest first if ā€˜Sort Dice’ checker, otherwise roll order
  • numericTotal - The total of kept dice. Same value as $result$ when ā€˜Report Total’ option checked.
  • nDice - Total number of dice before selecting which to keep
  • nSides - Number of sides on each die
  • plus - Modifier added to each die
  • addToTotal - Modified added to total roll
  • keepDice - Number of dice requested to keep
  • keepCount - Number of dice that where actually kept

Proposed new $$ variables

  • rawRolls - A list of the raw unmodified die rolls in roll order
  • rawCount# Count of the number of raw rolls of face #
  • count# - Count of the number of kept rolls of face #

Anything else we need?

Not from my end, looks good…

@Brent_Easton

Did the $$ variables not make it into the 3.6 build? I tried using $rawRolls$ and it didn’t return anything… Also, documentation does not mention the new $$ variables…

Sorry, forgot. I have put up a PR, it should go into 3.6.1