Page 1 of 1

Drawing specific cards in random order

PostPosted: September 17th, 2014, 10:38 pm
by Luthor85
Hi,
I'm new to Vassal module creation and I have a question for which I could not find info on the forums/web.

In the module I'm making, some specific cards need to be drawn from a deck, depending on the scenario, but they have to be placed ramdomly at designed spots on the map (i.e. blue and red tokens drawn facedown, all having the same backside and players place them without knowing which is which)

Since this is my first module, I'm not looking to do anything too fancy, so I created a deck with all the tokens and turned on "Allow specific cards to be drawn". I can select the tokens I want and draw them facedown and everything, but they're always drawn in the same order as they were presented in the list. Is there anyway I can do what I want?

thanks in advance!

Re: Drawing specific cards in random order

PostPosted: September 18th, 2014, 4:28 am
by brian448
Check the "always shuffle" property for the deck.

Re: Drawing specific cards in random order

PostPosted: September 18th, 2014, 11:51 am
by Luthor85
Brian, I forgot to mention it, but the "Always shuffle" property was checked already. If I draw tokens one at a time, they are indeed shuffled. The problem only arises when drawing multiple specific cards. I'm not sure if it's intended that way or not, so I'm not sure if it's a bug.

Anyway, I found a workaround for this. I made an empty deck on which I drag the specific tokens. From the second deck, cards are always shuffled and drawn face down one by one.

Is anyone aware of a more "elegant" solution?

Re: Drawing specific cards in random order

PostPosted: September 18th, 2014, 1:26 pm
by Tim M
Place simple action buttons where you need to place the tokens that make a call to draw the correct random piece out of the deck and have the button self destroy once complete

Re: Drawing specific cards in random order

PostPosted: September 18th, 2014, 1:39 pm
by Luthor85
It was probably not clear, but the subset of tokens that are needed as well as their location on the map change for each scenario. In fact, the map itself changes (map tiles are arranged depending on the scenario). That's why I wanted to draw specific cards facedown in random order so that they could be placed manually.

Anyway, because of this, I don't think this solution would be appropriate. Still, it sounds like a neat trick that might be useful elsewhere in the module!

Re: Drawing specific cards in random order

PostPosted: September 18th, 2014, 2:07 pm
by Tim M
Make the action buttons as palette components then. For each scenario file, drag out the buttons and place where needed and save the setup. Simple enough

Re: Drawing specific cards in random order

PostPosted: September 18th, 2014, 5:02 pm
by Luthor85
Ok, I'm not sure I understand everything (I haven't played at all with action buttons yet), but I'll give it a try next time I have time to work on my module.

When you're talking about scenario files, is this some sort of savefile of the initial setup (again: I'm new to Vassal)? If so, then I was not planning on doing that, since there are a lot of scenarios and new ones come up fairly regularly, but I'll see how finishing the basic module goes and reconsider then.

Thanks!