Global Key Command Complex Expressions

Is it possible to have multiple triggers in a Global Key Command?

In my module (an IGOYOUGO game) damage markers are globally removed at the end of each player’s turn. At the moment I have managed to remove them for Player 1 based on the turn record track (when it has the value ‘Player 1 End Phase’).

However, I also want the same global effect when the turn record track has the value ‘Player 2 End Phase’

The expression I am using at the moment is;

currentTurn = Player 1 End Phase

This fires off a CTRL H which resets all active damage markers to zero.

Can I add to the current expression so that it is something like this;

currentTurn = Player 1 End Phase OR Player 2 End Phase

If not, then do I simply have to define a separate Global Key Command?

Can be done like this

CurrentTurn = Player 1 End Phase || CurrentTurn = Player 2 End Phase

|| means “or”

&& means “and”

From: MikeR messages@forums.vassalengine.org
To: messages@forums.vassalengine.org
Sent: Wednesday, April 15, 2009 11:46:29 AM
Subject: [Module Design]Global Key Command Complex Expressions

Is it possible to have multiple triggers in a Global Key Command?

In my module (an IGOYOUGO game) damage markers are globally removed at the end of each player’s turn. At the moment I have managed to remove them for Player 1 based on the turn record track (when it has the value ‘Player 1 End Phase’).

However, I also want the same global effect when the turn record track has the value ‘Player 2 End Phase’

The expression I am using at the moment is;

currentTurn = Player 1 End Phase

This fires off a CTRL H which resets all active damage markers to zero.

Can I add to the current expression so that it is something like this;

currentTurn = Player 1 End Phase OR Player 2 End Phase

If not, then do I simply have to define a separate Global Key Command?


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

Post generated using Mail2Forum (mail2forum.com)

Hi Tim, thanks for that. I just implemented it and it works fine.

The Global Command places a button called ‘Clear Hits’ on the bar at the top of the Map Window. Pressing the button in either of the Player End Phases now clears the accumulated hits.

Is it possible to automate this so that as soon as the turn track meets the conditions, the hits are automatically removed without recourse to clicking the ‘Clear Hits’ button?

Interesting that the thread on automation applies directly to this kind of automation in which the player is simply saved time and effort?

And therein lies the potential problems. What happens if a player
accidentally advances the turn marker to the end triggering the marker
removal? For each player automation/trigger, there is the risk it’s
accidentally fired during a game which in some cases could be disastrous for
the game. Hitting the undo umpteen times with no way of knowing if you’ve
fully corrected the error isn’t a solution.

Personally I think some automation is good and enhances the module/game
play, but there should be alternate ways to ignore the automation if desired
and be able to easily restore/adjust mistakes.

Post generated using Mail2Forum (mail2forum.com)

cparrott wrote;

That’s a very good point that I hadn’t thought about and also illustrates how the module designer is often so familiar with the game mechanisms and the module itself that it becomes easy to forget that it will be played by people without that familiarity.

I’m a novice but your comment has made me realise that in each step of the design one should consider what the potential input errors, oversights and mistakes the player may possibly make and design accordingly.

KISS… it’s easy to forget this old maxim in one’s enthusiasm :blush:

Don’t be embarrassed at all. Trust me, I can be my own worst enemy at times
when it comes to have the module do things automagically. It’s easy to want
to go down that path, hard to step back objectively and look at your
creation and realize it’s going to be a mess to other people. I couldn’t
tell you the number of times I added a bunch of interesting triggers, global
properties and such only to strip it all out in the end.

Ultimately you want people to be able to play the game using Vassal, not
trying to figure out how to use Vassal or the module itself.

Post generated using Mail2Forum (mail2forum.com)

thats why I had a “Clear actions” as a key command triggered by the turn counter >.<

Hey Furyofaseraph that is exactly what I am searching for. I want to tie a clear actions layer GKC into my turn action button. But its a game where it will only clear the layers on the pieces belonging to the player whose turn it just became not the player who hit the turn button.