GKC Enhancement - Feature Request

The GKC is very powerful, but I find it has one significant limitation…

In many cases, there are game activities that can only be done a limited number of times. It would be incredibly helpful if the GKC had the ability to limit how many times in games it can be called.

Additionally, I have read reports about people finding the STARTUP GKC to be problematic, because they expect it to run once, but it runs every time on load. I believe, if what I’m suggesting here were implemented also for STARTUP GKC, it could address that issue also…

Add field for “GKC limit” (associated properties $GKCLimit$ and $GKCCurrent$).
Allowable values: -1 (null is equivalent), 0, any positive integer

Add report field for when GKC Limit is reached.

Desired Behavior:
When GKC is activated, it increments $GKCCurrent$ by 1. IF $GKCCurrent$ >= $GKCLimit$ THEN

  1. Do not perform GKC action
  2. Gray out GKC button text
  3. Call GKC Limit Report field

Example Report: has reached their maximum number of Mulligans (3)! No more are available!

Sorry, I left out the meaning of allowable values for “GKC limit”

-1 / null = no limit (i.e., how it currently works - this will ensure no compatibility issues for existing modules)
0 = cannot be called (wouldn’t typically be used, except for debugging or putting future capability stubs in place.)
positive integer = how many times the GKC can be called before it is disabled

There is a way to implement that functionality yourself in the current Vassal – for your GKC that you’ve added to the map or the module or whatever, instead of having it directly “do the thing”, have it send its command first to a single piece (I usually have a special invisible piece somewhere that I call “GameEvent” or something). That piece receives the GKC in a Trigger Action trait, which is where it can then check things like the limits you describe, increment the limit counts that you keep in a global property somewhere, do any other processing you want, and then decide whether to “do the thing” by sending its own GKC out to do the main action (take the mulligan or whatever). This would likewise work for limiting the number of times a Startup Global Key Command runs.