Create account / Log in

Possible to resolve markers/properties in command menu?

Talk about module design ideas and techniques.

Moderators: Tim M, uckelman

Possible to resolve markers/properties in command menu?

Postby Bridger » February 7th, 2020, 7:26 pm

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?
Bridger
 
Posts: 12
Joined: March 19th, 2015, 10:27 pm

Re: Possible to resolve markers/properties in command menu?

Postby Cattlesquat » February 7th, 2020, 8:45 pm

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.
Cattlesquat
 
Posts: 44
Joined: December 2nd, 2019, 4:57 pm

Re: Possible to resolve markers/properties in command menu?

Postby Bridger » February 13th, 2020, 7:42 pm

That's a good thought, unfortunately, this game has 211 cards, each with a different empire. :P

Oh well, I'll just have the menu say "Play to start an empire" instead of "Play to start $empire$". No big deal.
Bridger
 
Posts: 12
Joined: March 19th, 2015, 10:27 pm

Re: Possible to resolve markers/properties in command menu?

Postby Cattlesquat » February 16th, 2020, 8:03 pm

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.
Cattlesquat
 
Posts: 44
Joined: December 2nd, 2019, 4:57 pm


Return to Module Design

Who is online

Users browsing this forum: No registered users and 0 guests