Return to deck

Hi,

I wanted to use the “return to deck” feature with a destination deck named like this:

$playerSide$ Gold

However, the interface does not let me send to a “dynamic” deck. All I can do is pick an existing deck via the interface, with its static name.

Did I miss something? Is there any workaround?

Regards.

Nicolas.

Didn’t miss a thing :slight_smile:
You can only pick a static deck right now. This would make a good feature request though

From: Damiste messages@forums.vassalengine.org
To: messages@forums.vassalengine.org
Sent: Wed, January 20, 2010 9:53:31 AM
Subject: [Module Design]Return to deck

Hi,

I wanted to use the “return to deck” feature with a destination deck named like this:

$playerSide$ Gold

However, the interface does not let me send to a “dynamic” deck. All I can do is pick an existing deck via the interface, with its static name.

Did I miss something? Is there any workaround?

Regards.

Nicolas.


Messages mailing list
Messages@forums.vassalengine.org (Messages@forums.vassalengine.org)
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Yes indeed. :slight_smile:

The work around is to use Send to Location. If you send it to the location of the deck, it will end up the deck (Tim M pointed out this very useful fact to me and I’m using it in my module!)

You can also “nest” property references in a way to make this work.

If your player sides a Red and Blue (as an example) and the decks are named Red Gold and Blue Gold…

The location of Red Gold is stored in two dynamic properties, RedGoldX and RedGoldY, similarly for Blue. Then use a send to location, send it to x value $$PlayerSide$GoldX$ and y value $$PlayerSide$GoldX$. If you are playing Red, vassal will interpret this as $RedGoldX$ or $RedGoldY$ (or similar for Blue) and then will go on to interpret the coordinates you stored in the dynamic properties.