Create account / Log in

Saved player decks: default properties?

Talk about module design ideas and techniques.

Moderators: Tim M, uckelman

Saved player decks: default properties?

Postby Flaney » May 21st, 2011, 10:22 am

Hello Vassal folks,

Flane here;

When a player loads a previously saved a deck, does the deck acquire the playerSide property value of the loading player?

I'd like to use this property to check against duplicates loaded by other players. For that matter, what does the complete deck use to determine ownership before any side picks a card, e.g., playerSide = null? I can't determine the value without selecting the card, which changes the ownership to me....

Essentially, I want to remove cards from the community deck that the players have already selected for their own starting hand.

thanks
Flaney
 
Posts: 106
Joined: March 18th, 2011, 9:11 am

Re: Saved player decks: default properties?

Postby DrNostromo » May 21st, 2011, 2:02 pm

I think the easiest way to do that would be to have the player's hand window set a trigger that goes off whenever a piece is moved to it.

Here's an example:

The player's hand has a setting for "Key command to apply to all units ending movement on this map". Set that to CTRL 1

The cards have a Trigger Action that triggers on CTRL 1 and sends a CTRL 2. This fires when the card is sent to or moved into the player's hand

The card also has a Global Key Command that triggers on a CTRL 2 and sends a CTRL 3 to the Community Deck. Property filter would be something like:

CurrentMap = (map the community deck is on) && DeckName = (name of community deck) && BasicName = $BasicName$
All Pieces

The cards in the community deck would have a Delete trait that triggers on a CTRL 3. When the deck receives the CTRL 3, it will delete the card that has the same BasicName as the card just placed in the player's hand.

If you have it set up to where the hand is already built, the cards traits would be the same. The only difference would be to set up a button that sends a CTRL 1 to all cards in the player's hand and then you can have the button delete itself.
User avatar
DrNostromo
 
Posts: 1036
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 0 guests

cron