Create account / Log in

Moving variable numbers of cards between decks automatically

Support for existing Vassal modules. Ask here if you need help with a specific module.

Moderators: uckelman, Tim M

Moving variable numbers of cards between decks automatically

Postby b0n3r » August 7th, 2014, 12:59 am

Okay, I'm trying to do something for a game, and I'm getting a little over my head - some advice on how to approach this with vassal would be appreciated.

The game has various Trade Post locations (in the form of cards) which may or may not be revealed during the course of the game. Each Trade Post card states the number of each Cargo Type (of four varieties) are stocked at the Trade Post. I want to be able to right-click the Trade Post and select an option that will stock the appropriate Trade Post deck with the correct number of Cargo from the four appropriate decks.

For example, right clicking the card Trade Post 1 and selecting Stock would send 1 card from deck A, 2 cards from deck B, 3 cards from deck C and 4 cards from deck D ALL to deck T1.

So here's how I've started approaching it...

I created global properties A, B, C, D and T (the 4 cargo quantities needed, and the number for the active trade post) - and created a key command on the Trade Post 01 card to set these global properties to to 1, 2, 3, 4 and 1 respectively then send another global key command, lets call it CTRL X.

What I originally intended was to have the GKC Ctrl X to trigger a Deck GKC that applies to A, B, C and D pieces within the deck respectively - but I'm getting the feeling that doesn't work (DGKC don't listen for commands, they're manual only??). Is it even possible to use properties as the value of the number of pieces in the deck to apply a DGKC to? This is where I have hit a wall.

Another issue I'm having is that when telling the individual cards to go to deck T1, I need it to be variable ie "T$T$" - and the 'Return to deck trait doesn't seem to allow for this. So it looks like I'd need to specify a bunch of x,y coordinate locations based on the value of T (there will be 24 of these, T1 through T24). Would that be correct?

Thanks in advance!
Posts: 36
Joined: February 3rd, 2012, 2:35 pm

Return to Module Support

Who is online

Users browsing this forum: No registered users and 1 guest