Adding a dice button to a private window

I was playtesting Mons 1914 on the weekend with my new module. There are some private windows that are used for army status. Players need to roll for things to happen on that board. To keep those rolls private, someone said to me that dice rollers can be added to the private window and will not report to the main text log. I have looked but can’t see where in Private Window or below that I could do that. Is it possible?

Cheers
Geoff

PS I kept trying to search for “add dice button” or similar but my search terms were “too common” for the refined sensibilities of this forum :smiley:

What you would want to do is create a button in the private window and have it trigger a die via a Global Hotkey. In fact, you could make the button look like a die and, when it’s clicked, have it display the layer that corresponds to the die roll.

You would probably want to create a die for each private window to prevent the die result accidentally used somewhere else if someone else was rolling dice at the same time.

Need some help with that, I could make a sample.

Thanks, I’ll try that tonight. If I get stuck I will ask you for your an example
G

Okay, I am stuck. I can’t use an Action Button in a private window, only at the module level. A global key command does not feel right.

I did however define Hotkeys for the dice buttons.

An action button will work anywhere. I’m assuming you created an At-Start Stack for your button. Check the stack properties to insure “Belongs to Map” is set to the private window map or it won’t work.

Global key command is not what you want. You want to use a Global Hotkey trait with the Keyboard Command to accept the button is firing when clicked and the Global Hotkey is the Hotkey commend you have on the die roll.

I’ll make a sample and post sometime today.

Here’s a sample. Just change the .zip to .vmod and it’s ready to go. I’m using Vassal 3.4.8.

Here’s what I did:

Created two player sides: Player 1 & Player 2

Created a private window for each

Created 2 dice called P1 and P2 …each rolling a D6 on a Hotkey of RollP1 & RollP2 respectively

Placed an At-Start Stack in each private window with a main graphic being a blank PNG 50x50.

Created a Layer trait with 6 layers representing the dice faces.

Set the whole 50x50 area as an action button.

Clicking it fires a Trigger Action which does the following:

Plays a dice sound (this tells you that the die rolled even if the results don’t change, i.e., same result as previous roll).

Triggers a Global Hotkey to roll the die for that window.

Sets the die roll result as a Dynamic Property called DiceFace1 or DiceFace2, depending on the window.

Set the layer to display the dice face equal to the Dynamic Property value.

Thank you very much, I will have time on Friday to go through this.
Next playtest of Mons 1914 is this Saturday, online on Vassal. Hopefully I will be able to incorporate these changes

Cheers
Geoff