Create account / Log in

Symbolic Dice - RFE:1860950

Suggestions for additional features for the module editor and Vassal engine.

Moderators: uckelman, Tim M

Symbolic Dice - RFE:1860950

Postby tbyrne » December 12th, 2007, 2:26 am

Moving this discussion to the forums

I just started on a module that needs symbolic dice. In addition, I
need the ability to throw various combinations of dice.

Currently, the options for showing the dice visually are either on a
button, or in a window.

The button option doesn't work well when you have multiple dice
options as the buttons for each combo all look the same and take up
lots of button real-estate.

The window option also doesn't work well, as each combo always shows
it is own separate window.

I was thinking of making one of the following changes:

A. Change to have dice drawn in the same window if the name of the
window is the same of one that already exists. This prevents
multiple windows popping up everywhere.

B. Create an option to draw the symbolic dice in the message
window. Just as you can see text descriptions of the dice today.

C. Create an option to specify a rectangle on a map where the dice
are to be drawn (which would also remove any previously drawn
dice on that map). Then a spot can be reserved on a map for
dice to appear, and they'd remain until a new throw of the dice.

I think Option A may be the simplest change to make. Option B seems
like an abuse of the message window. Option C is the solution I'd
most prefer, but I'm not sure how difficult it might be to implement.
I'm wonder what other thoughts you guys might have on this type of
change, and if you have any advice on where I might start (as I'm not
really familiar with all of the VASSAL classes, and not primarily a
java developer).

Thanks for any input.

-Tim
User avatar
tbyrne
 
Posts: 79
Joined: December 10th, 2007, 1:57 pm
Location: Chicago, IL

Re: Symbolic Dice

Postby tbyrne » December 12th, 2007, 2:32 am

Tim M wrote:Are your dice combinations based on a previous result?

I've been playing around with symbolic dice for awhile now too for scenario
generation. Before, the methodology was very linear so I could roll all the
dice at once and have an accurate result with one button/window.

Now however, the methodology is not linear and the dice that get rolled are
based upon the result of an earlier rolled dice, and I am having a hard time
trying to come up with a method where I can still show this with symbolic
dice in one window and have the right result show with just one button to
push to generate it. I hate to have 100's of dice buttons just to achieve a
proper result and all sorts of windows popping up - not very pretty :) So in
this case I agree with Tim on the real estate/window issue.

Is it possible to have the symbolic dice tied to the spreadsheet trait and
then drive the results from there somehow and condense results to 1 window.

Similar to option A I would say

My combos don't really depend on other dice rolls.

Specifically, I need to make 6 buttons; roll 1, 2, 3, 4, 5, or 6 dice. I'd like the results of any of those buttons to log text results to the message window, and also show the dice with graphic representation in the same spot each time (regardless of which button being clicked). That's the easiest way to describe what I want to accomplish.

I guess I'm looking for advice on which direction I should head for making an enhancement. Any suggestions?
User avatar
tbyrne
 
Posts: 79
Joined: December 10th, 2007, 1:57 pm
Location: Chicago, IL

Postby bsmith » December 12th, 2007, 2:34 am

I guess technically, this would be a feature request.
User avatar
bsmith
Site Admin
 
Posts: 657
Joined: October 2nd, 2007, 4:47 pm

Postby bsmith » December 12th, 2007, 2:56 am

Tim do you mind if I move this to Feature Requests? It a good test to make sure replies still go to the right place.

cheers.
User avatar
bsmith
Site Admin
 
Posts: 657
Joined: October 2nd, 2007, 4:47 pm

Postby Tim M » December 12th, 2007, 3:06 am

I dont mind Ben :)

Tim, from what you describe now what you want to do, I do have a alternate solution.

Instead of symbolic dice, create regular dice (youll still need 6). Whenever you roll one of these dice, pass the resultant to a global property. On your map, put a single at start stack piece with appropiate layers(values) that follow the GP.

This way you, your piece will always reflect the current rolled value be it 1 dice or 6 and only display in one place all the time

Tim
User avatar
Tim M
 
Posts: 1816
Joined: December 8th, 2007, 12:22 pm
Location: Earth

Postby tbyrne » December 12th, 2007, 4:14 am

bsmith wrote:Tim do you mind if I move this to Feature Requests? It a good test to make sure replies still go to the right place.

cheers.
You can put it wherever you want. But I wasn't requesting a feature, I was asking for comments on a feature I might add.
User avatar
tbyrne
 
Posts: 79
Joined: December 10th, 2007, 1:57 pm
Location: Chicago, IL

Postby tbyrne » December 12th, 2007, 4:30 am

Tim M wrote:I dont mind Ben :)

Tim, from what you describe now what you want to do, I do have a alternate solution.

Instead of symbolic dice, create regular dice (youll still need 6). Whenever you roll one of these dice, pass the resultant to a global property. On your map, put a single at start stack piece with appropiate layers(values) that follow the GP.

This way you, your piece will always reflect the current rolled value be it 1 dice or 6 and only display in one place all the time

Tim

I'm not sure exactly how you mean. How can I have a "regular" dice button pass a result to a global property? If I wanted to roll more than one die at a time how does that work?

Regardless, it sounds like a difficult sort of thing to manage. Tim, I'm always amazed at what you've been able to accomplish using whats available in VASSAL. And this might be a case where it could be possible by some complicated means. But I think I would rather make an enhancement to VASSAL which would make doing what I want more straight forward (and possibly easier others who want to implement something similar).

Again, what you're describing might be simpler than it sounds, so I'm willing to learn how to do this with what's already in VASSAL.
User avatar
tbyrne
 
Posts: 79
Joined: December 10th, 2007, 1:57 pm
Location: Chicago, IL

Postby Tim M » December 12th, 2007, 5:17 am

Hi Tim,

It was even simpler than I thought :) Dice result is already stored as a GP.
I just setup my at start piece to grab the result in the dynamic property (with a reset) and have the layer follow the DP.

I used GKC's to fire the dice and tie them in with the display piece (no other way)

Ive put together a little test mod with 2 dice - 1d6 and 2d6. Will send it to your email.
Take a look, its pretty simple :)

Tim
User avatar
Tim M
 
Posts: 1816
Joined: December 8th, 2007, 12:22 pm
Location: Earth

Symbolic Dice

Postby tbyrne » December 12th, 2007, 5:59 am

On Dec 11, 2007, at 11:17 PM, "Tim M"
<messages@forums.vassalengine.org> wrote:

Hi Tim,

It was even simpler than I thought :) Dice result is already stored
as a GP.
I just setup my at start piece to grab the result in the dynamic
property (with a reset) and have the layer follow the DP.

I used GKC's to fire the dice and tie them in with the display piece
(no other way)

Ive put together a little test mod with 2 dice - 1d6 and 2d6. Will
send it to your email.
Take a look, its pretty simple :)

Tim







_______________________________________________
Messages mailing list
Messages@forums.vassalengine.org
http://forums.vassalengine.org/mailman/ ... engine.org

Thanks Tim. I will be able to check out your example mod in the
morning. I'm anxious to see what you made, but I must get some sleep
(I'm fighting a cold)


_______________________________________________
Messages mailing list
Messages@forums.vassalengine.org
http://forums.vassalengine.org/mailman/ ... engine.org

Post generated using Mail2Forum (http://www.mail2forum.com)
User avatar
tbyrne
 
Posts: 79
Joined: December 10th, 2007, 1:57 pm
Location: Chicago, IL

Postby tbyrne » December 12th, 2007, 11:39 am

Tim M wrote:Hi Tim,

It was even simpler than I thought :) Dice result is already stored as a GP.
I just setup my at start piece to grab the result in the dynamic property (with a reset) and have the layer follow the DP.

I used GKC's to fire the dice and tie them in with the display piece (no other way)

Ive put together a little test mod with 2 dice - 1d6 and 2d6. Will send it to your email.
Take a look, its pretty simple :)

Tim


I got a chance to look at your example mod this morning. I think I probably wasn't clear enough when I explained my end goal.

Your example as a graphic version of the sum of the dice tossed. What I want to do is graphically display all the individual dice results.

So pushing 1d will report in the window "one" and graphically show the face of 1 die. pushing 4d will report in the window, "one, four, one, five" and graphically show 4 die faces.

Another way to think of it would be coins. Pushing a button that was called "4 coins" would report in the window, "heads, heads, tails, heads" and graphically show 4 coin faces that matched the result. Essentially, I want what pops up in the window that can already be displayed, but have the results of different dice buttons show up in one spot.

I'll look into using global properties (I didn't know dice did that, perhaps symbolic dice do that too). Maybe that road will get me where I need to go before doing any java coding.
User avatar
tbyrne
 
Posts: 79
Joined: December 10th, 2007, 1:57 pm
Location: Chicago, IL

Postby Tim M » December 12th, 2007, 12:15 pm

No problem, yes I did a result total - misunderstood.

Because you want the individual dice shown, I think you can still do it and have to use hidden symbolic dice instead of hidden regular dice but it requires an extra step of passing each dice result ($result1$, $result2$ etc) to a GP as I dont think these are GP's by themselves, then have your at start stack have a layer for each die which reads the value of the appropiate GP to display correct number/die side.

Ill put another test mod together today to verify if its possible (I'll still use numbers instead of die faces but the basic idea is same)

Tim
User avatar
Tim M
 
Posts: 1816
Joined: December 8th, 2007, 12:22 pm
Location: Earth

Postby Tim M » December 12th, 2007, 10:53 pm

Ok, its very possible.
Does exactly what you want and still quite simple
It demonstrates up to 3 dice - with faces :)

Will be sending you two test mods. The first one is just the same as the previous version reworked.
The second is a more elegant version in that it only requires 1 dice button (1 GKC) with an extra DP and user selects number of dice to roll.
I think this will appeal more for you as it also saves valuable toolbar space.

If you want to validate that the piece is displaying the rolls correctly in order just add the $result$ report to the hidden dice button in the tree and it will also echo in the chat as well as the report I built in

As you will notice I only used 1 regular die. Did this for simplicity. I do not know the merits/difference as to if the random seed for 1 dice being rolled 3 times is different from 3 dice being rolled once in vassal. Rodney would have to comment more to that aspect.

Possibilities are endless now Ive figured this out, can do pretty much anything you want :)

Tim
User avatar
Tim M
 
Posts: 1816
Joined: December 8th, 2007, 12:22 pm
Location: Earth

Postby tbyrne » December 13th, 2007, 2:56 am

Tim M wrote:Ok, its very possible.
Does exactly what you want and still quite simple
It demonstrates up to 3 dice - with faces :)

Will be sending you two test mods. The first one is just the same as the previous version reworked.
The second is a more elegant version in that it only requires 1 dice button (1 GKC) with an extra DP and user selects number of dice to roll.
I think this will appeal more for you as it also saves valuable toolbar space.

If you want to validate that the piece is displaying the rolls correctly in order just add the $result$ report to the hidden dice button in the tree and it will also echo in the chat as well as the report I built in

As you will notice I only used 1 regular die. Did this for simplicity. I do not know the merits/difference as to if the random seed for 1 dice being rolled 3 times is different from 3 dice being rolled once in vassal. Rodney would have to comment more to that aspect.

Possibilities are endless now Ive figured this out, can do pretty much anything you want :)

Tim

Tim, this is great. Its more complicated then I was hoping for, however, the complication is fairly concentrated into only one piece. Well done!

Having said that, can you find a way to support "symbolic" text for the faces of the die? I don't think symbolic dice set properties (at least its not stated in the documentation that I can find).

Basically, instead of reporting "roll: 1, 4, 5" in the message window, to report "roll: one, four, five". Or like my other example, "heads, tails, tails".
User avatar
tbyrne
 
Posts: 79
Joined: December 10th, 2007, 1:57 pm
Location: Chicago, IL

Postby Tim M » December 13th, 2007, 3:29 am

tbyrne wrote:Tim, this is great. Its more complicated then I was hoping for, however, the complication is fairly concentrated into only one piece. Well done!

Having said that, can you find a way to support "symbolic" text for the faces of the die? I don't think symbolic dice set properties (at least its not stated in the documentation that I can find).

Basically, instead of reporting "roll: 1, 4, 5" in the message window, to report "roll: one, four, five". Or like my other example, "heads, tails, tails".


Hi Tim,

The complication is the sets of trigger actions in the piece tying all the traits together in proper sequence. You can get pretty crazy with these, believe me :) :wink:

The report is simple to change. Instead of referencing the $DP property value$ in the report traits, give all the layer levels names 'one', 'two', 'three' etc.. for each layer trait and then reference the needed $<Layer>_Name$ property instead in the report traits.

BTW, which one did you prefer? the multi button or single button version?
User avatar
Tim M
 
Posts: 1816
Joined: December 8th, 2007, 12:22 pm
Location: Earth

Postby tbyrne » December 13th, 2007, 4:15 am

Tim M wrote:Hi Tim,

The complication is the sets of trigger actions in the piece tying all the traits together in proper sequence. You can get pretty crazy with these, believe me :) :wink:

I mostly agree with you. But having counted different types of cards in a deck the complicated triggers way in the past, it makes for a module that difficult to maintain. Having properties that can be simply referenced makes things easy to create, maintain, and understand later. Your solution works well for dice, and I will go in this direction (really, its a fabulous way to handle this), but I don't think it would scale well to something that has the equivalent to 100 sides! OK, that's crazy talk.

Tim M wrote:The report is simple to change. Instead of referencing the $DP property value$ in the report traits, give all the layer levels names 'one', 'two', 'three' etc.. for each layer trait and then reference the needed $<Layer>_Name$ property instead in the report traits.

Perfect. It works just as I need! This is a gem I'll be using more than once in the future! Thanks!

Tim M wrote:BTW, which one did you prefer? the multi button or single button version?

The multi-button for sure. 6 buttons doesn't take up too much room, and removes the step of selecting the number, and clicking another button. Basically it came down to efficiency of use vs efficiency of space. I like clicking once instead of 3 times.
User avatar
tbyrne
 
Posts: 79
Joined: December 10th, 2007, 1:57 pm
Location: Chicago, IL

Next

Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest