Create account / Log in

Drawing specific cards in random order

Talk about module design ideas and techniques.

Moderators: uckelman, Tim M

Drawing specific cards in random order

Postby Luthor85 » September 17th, 2014, 10:38 pm

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!
Luthor85
 
Posts: 4
Joined: September 17th, 2014, 10:23 pm

Re: Drawing specific cards in random order

Postby brian448 » September 18th, 2014, 4:28 am

Check the "always shuffle" property for the deck.
brian448
 
Posts: 78
Joined: May 23rd, 2008, 1:35 am

Re: Drawing specific cards in random order

Postby Luthor85 » September 18th, 2014, 11:51 am

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?
Luthor85
 
Posts: 4
Joined: September 17th, 2014, 10:23 pm

Re: Drawing specific cards in random order

Postby Tim M » September 18th, 2014, 1:26 pm

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
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: Drawing specific cards in random order

Postby Luthor85 » September 18th, 2014, 1:39 pm

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!
Luthor85
 
Posts: 4
Joined: September 17th, 2014, 10:23 pm

Re: Drawing specific cards in random order

Postby Tim M » September 18th, 2014, 2:07 pm

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
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: Drawing specific cards in random order

Postby Luthor85 » September 18th, 2014, 5:02 pm

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!
Luthor85
 
Posts: 4
Joined: September 17th, 2014, 10:23 pm


Return to Module Design

Who is online

Users browsing this forum: No registered users and 3 guests