>>I want to inspect the number of remaining cards in a deck.
>>
>
> No, there isn't a way to do that yet.
>

I have devised a way (in standard vassal) to create a label that shows the
number of items in a deck.  A demonstration will be seen in my upcoming
"Carcassonne:The Castle" module.

Here's the basics (obviously any names and key combos can be changed to
your preferences)

1. All your maps must send a key command to all units ending movement on
the map (for the sake of example, lets say CTRL-M)

2. Create a counter with a Dynamic Property (lets call it CountOfCards)
which is numeric.

3. That CountOfCards should have 2 key commands:
   a. "Increment" CTRL-1  Increments by 1
   b. "Set2 Zero" CTRL-0  Set value directly to 0

4. Create a TextLabel on that counter with the value $CountOfCards$ (this
makes your property display as text)

5. Mark this counter using a Marker called mydeckCount, with value true
(so we'll be able to target it later)

6. Place this counter near your deck using an At-Start Stack (you can
prevent people from moving it by putting a RestrictAccess trait just below
the Basic Piece trait or by using the DoesNotStack trait)

7. Create a prototype for all your counted items to inherit (lets call it
"mydeckCountable")

8. Within the prototype add the following:

   a. Marker
        mydeckCountable = true

   b. Trigger Action
        triggered by CTRL-M (movement on any of the maps)
        performs these actions
          1. ALT-SHIFT-Z (This is going to zero out the CountOfCards)
          2. ALT-SHIFT-X (This is going to tell all countable items to
update CountOfCards)

   c. GKC  (This zero's out the CountOfCards)
        keyboard command: ALT-SHIFT-Z
          global key cmd: CTRL-0
      matching properties: mydeckCount = true

   d. GKC  (This triggers all countable items to fire off their own
ALT-SHIFT-C which will update CountOfCards)
        keyboard command: ALT-SHIFT-X
          global key cmd: ALT-SHIFT-C
      matching properties: mydeckCountable = true && LocationName = mydeck

   e. GKC  (This triggers all countable items to fire off their own
ALT-SHIFT-C which will update CountOfCards)
        keyboard command: ALT-SHIFT-C
          global key cmd: CTRL-1
      matching properties: mydeckCount = true

ThatÂ’s the basics.  You can expand this concept to do some other cool
things, like have separate counts of different types of items in the deck.
 And of course it can be applied to multiple decks or even just locations,
or zones, or maps, or basically anything that can be  determined by
matching properties.

Cheers

-Tim


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/vassalengine/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/vassalengine/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to