Create account / Log in

Modifying the Number of Dice Rolled

Talk about module design ideas and techniques.

Moderators: uckelman, Tim M

Modifying the Number of Dice Rolled

Postby Extralean » January 30th, 2012, 3:17 pm

Is there a way I can use only one die icon to roll the number of dice I want instead of creating a die icon for each possibility? For instance, if I want to roll 2 six sided dice instead of 1 six sided die but the die icon asks me for the number of dice I want to roll?
Extralean
 
Posts: 121
Joined: August 2nd, 2009, 4:06 am
Location: New Brunswick, Canada (GMT -4)

Re: Modifying the Number of Dice Rolled

Postby Tim M » January 30th, 2012, 3:37 pm

Extralean wrote:Is there a way I can use only one die icon to roll the number of dice I want instead of creating a die icon for each possibility? For instance, if I want to roll 2 six sided dice instead of 1 six sided die but the die icon asks me for the number of dice I want to roll?


Sure - instead of the Die Icon being the actual Die it self, change it to be a Toolbar GKC that relays to an invisible At Start Stack Piece. When activated, the Invisible piece will run a trigger that prompts the user for the number of dice they want to roll. The value is stored in a DP, then depending on the value of the DP another trigger executes the relevant GHK to roll the right set of defined dice.

This method means that all the different possible Die entries will have to be addded and they will be hidden from the tool bar but you can have the results pop up when rolled in their own result window if you want to portray things graphically
Tim,
Vassal Uber Geek/Guru

Problems? post your OS, Physical Mem, version of Vassal and Java plus the Module in question.
No developer can help with out that info, thx!
User avatar
Tim M
 
Posts: 1812
Joined: December 8th, 2007, 12:22 pm
Location: Earth

Re: Modifying the Number of Dice Rolled

Postby Extralean » January 30th, 2012, 4:34 pm

Sounds complicated. I was hoping this would have been incorporated into vassal just like "number of sides on the die prompt".
Extralean
 
Posts: 121
Joined: August 2nd, 2009, 4:06 am
Location: New Brunswick, Canada (GMT -4)

Re: Modifying the Number of Dice Rolled

Postby DrNostromo » January 30th, 2012, 4:55 pm

You can do that to. On the dice properties, check the box "Prompt for values when button pushed". Then, when the button for the die is clicked, Vassal will ask the user what they want to roll.
User avatar
DrNostromo
 
Posts: 1061
Joined: December 21st, 2007, 3:54 am
Location: Wine Country, Cal. USA


Return to Module Design

Who is online

Users browsing this forum: No registered users and 6 guests