[messages] [Module General Discussion] Looking for Guidance

rrvs spideratj at aol.com
Tue Apr 4 16:03:55 CEST 2017

There's different ways to achieve that, including (primarily) a layer
trait or a text label trait or both.  Use a layer if have an image to
lay over the card.  I'll detail text label. I'd use a prototype trait to
house these in, which in turn can go into your cards' default prototype
(makes for cleaner coding, and much easier tweaking later), if not

Add a Dynamic Property (I'll name it: cardselectDP) that has an initial
value of SECONDARY.  Add three different appropriate menu commands, all
'set value directly', with the three values being PRIMARY, SECONDARY,
and the last left completely blank (so this last one's menu command
would be something like "Clear card selection").

Add a Text Label trait, with text: $cardselectDP$, and all four
positions centered and rotate text set to -45.  Click okay and look at a
card and you'll see SECONDARY stamped over it.  Go back to the text
label and make any adjustments you want (text color, size, positioning,
etc).  When you got it as desired, go back to your dynamic property and
change its initial value from SECONDARY to blank (so clearing the
property value).

You can add a Report Action tied to any of the dynamic property's menu
commands ("$PlayerSide$ has selected a $cardselectDP$ card" can cover
both of the selections, and a separate report action can be used for a
clearing of the selections if wanted).

You can add more detail later, like not having all menu commands
available if unneeded, using Restrict Commands under various conditions.

So the dynamic property can now also be used by vassal to find that card
and send it to an appropriate spot.  So a main toolbar Global Key
Command (for example) might look for matching properties of:
cardselectDP=PRIMARY.  It sends a gkc to those cards.  Each card then
can be sent to a slightly different location on the main board depending
on which player board they're coming from, to space them out side by
side on the main board for example.  That gkc can also clear the dynamic
property so they're no longer displaying PRIMARY when they arrive, as
well as trigger another text label (smaller maybe) that can note the the
player side, etc.  I can detail the sending later, but it'd help to know
how your main board is set grid-wise (can they be sent to separate added
regions that are spaced out side by side, for example).... but you'd use
a Send to Location trait and maybe a Trigger Action too (to
differentiate between players).

Let me know if any of this is unclear or needs changing or whatever. 
Hope it works as is.  The designer's guide is a great reference btw, if
you don't have it yet, and the individual help buttons are excellent for
a quick check on traits, etc.

http://www.vassalengine.org/mediawiki/i ... rguide.pdf[1]

[1] http://www.vassalengine.org/mediawiki/images/b/b0/Vassal_3.1_designerguide.pdf

Read this topic online here:

More information about the messages mailing list