I’d like to store a variable into a global property, and have the command menu reflect that variable. So, for instance, someone plays a card which sets the “Empire” variable to “Aztec”. I’d like to setup a global key command on a right click menu for other pieces with something like “Play on $Empire$”.
I’ve tried simply using the $$ notation on the outside of the property but it doesn’t fill in within the ‘command menu’ title. Any ideas if this is possible some other way?
The answer to your specific question is no - the “Menu Command” field doesn’t seem to accept expressions/substitutions.
BUT if you have a relatively finite number of “Empires”, then it’s easy enough to have several different Trigger commands (e.g. “Play on Aztec”, “Play on Inca”, “Play on Maya”) and then use RestrictCommands traits to only show one of them at a time, based on your Empire property.
That’s a good thought, unfortunately, this game has 211 cards, each with a different empire.
Oh well, I’ll just have the menu say “Play to start an empire” instead of “Play to start $empire$”. No big deal.
You could also just put a trigger event on each individual card (e.g. “Play to start Aztec”) as the trait that creates the menu item, which then invokes the generic Global Key Command through a hidden key command (e.g. PlayStartEmpire). You’d end up typing in each of the 211 messages of course, but it wouldn’t in any way overwhelm the file size, and the logic would then funnel through your same global key command structure. Obviously a judgment call about whether the extra level of polish is worth the effort, but it’s certainly feasible.