Simple Disable "-" Turn Button

OK, it’s possible I don’t fully understand what you mean. Care to walk me through it?

I just grepped “flags” in the RefMan. There were zero hits. So, I assume you are talking about setting a global to test for automation execution…so, how to set the global flag to let me know we are going backwards?

OK, switched from phone so I can be less terse.

GP or DP, doesn’t matter. The most basic kind is one that triggers once and is then done. Starts at 0, when triggered goes to 1 and does whatever you want doing. When the flag is 1, and the trigger is activated again, the trigger does nothing.

Simple example, every turn something new is triggered:
Going forwards (you always go forwards from turn 1, right?) from turn 1 to turn 2, you trigger something new and its corresponding flag goes to 1. Going from turn 2 to turn 3, another trigger and another flag. Going backwards to turn 2 again, the turn 2 trigger won’t activate because its flag has already been set to value 1. You don’t need to know whether the turn track is going forwards or backwards, because each trigger can only be fired once, and the first time it is fired must be because of forward movement on the turn track - there’s no other way to get there.

Yeah, that makes perfect sense. The only problem is that you now need a GP for every permutation of Turn-phase-phase-phase if you have four tiers in your Tracker. Each tier of phase could have ten list items. You also need a unique trigger for each permutation. Am I missing something?

Well, you can probably use DP instead of GP, and looping or incrementing values, depends on your setup. You don’t need unique triggers, the whole point is patching this into an existing setup, you just need the right flagging - I only described the simplest possible solution.

Unfortunately I’m being nagged by three kids to do something more interesting, so I’m going to have to forgo more detail, sorry.

No worries. Thanks for the input. I think we are coming together on the solution set. But, my issue is “the workaround is pretty extensive” and the disable “-” button is a lot simpler…cheers.

It’s simple: Use a numeric GP, starting value 0. When the turn advances, check if GP < 100 * current turn. If not, add 100 to GP, subtract an amount equal to the number of phases, and do your automation. If so, do nothing; it’s already been triggered.
When the phase advances, check if GP < (current turn * 100) + current phase #. If not, add 1 to GP, do your automation. If so, do nothing; it’s already been triggered.

There, you only need a single GP, unless you’re likely to hit 100 total phases during a game; if so, just change the 100’s above to 1000’s.

You might need to add or subtract 1 to the turn #'s in the calculations above, depending on exactly how things are configured.

Edit: It would probably be less prone to error to use 2 GPs, one for the current turn and one for the current phase. Then you don’t need all the * 100 calculations; just reset the phase counter to 0 at the start of a new turn.

1 Like

OK, yes, this will work to freeze the automation going backwards. But, it is definitely not “simple” or elegant imho. Let’s assume I implement this. Now I need automation triggered on every single phase and turn transition just to build a “counter” to count my counter. I also still have the problem that players have the ability to go back and make a change and then go forward from there. In this case, automation is suppressed until game state catches back up. But, the change the player made will now NOT be processed by the automation, which is necessary for success. SO, what I also have to do is, in the automation, force the phase to go forward and warn him in the chat window that he can’t go back unless he uses the “rewind” button. Yes, this will all work, but hopefully we can agree that the best solution is to simply disable the “-” key on the Turn-Tracker.

In addition to disabling the “-” button on the Turn-Tracker, I guess it would be nice to have a chat warning telling the user to use the “rewind” key if it is necessary to go back…so maybe a soft-disable with warning instead of a hard-disable with no feedback.

Yeah, that sounds like an issue with the level of automation you have going on. That’s not something I took for granted.

1 Like

Another possible approach to this would be to make the Turn-Tracker properties checkbox that I am proposing cause the “-” button to actually trigger the “rewind” function instead of simply reversing the Turn-Tracker. This would make it so the “-” button wouldn’t be “disabled”. Some may consider this a bit cleaner. But, either way, the problem is solved.

Or don’t use the turn tracker.

This is always an option, but it means that you have to then build a GKC button and the player has to be trained when to press it. That will cause all kinds of issues with players forgetting to press the GKC button, pressing it late to catch up etc.

You may wonder “why have the automation function at all?”. The answer is that you have the option of using the automation or requiring each of 100 units fuel status to be tracked manually by the player with pencil and paper. In VASSAL, unlike a physical board-game, that means your opponent has no ability to observe the pencil notes and ensure accuracy. So, this kind of automation can really make possible a virtual board-game. Beyond that, it can (and does) make the game play better than the original.

I don’t think he meant “don’t use automation” when he wrote “don’t use the turn tracker”. Just don’t use the turn tracker. I didn’t even know it existed until this thread - I believe you are referring to the “Turn Counter”. One of my modules uses turns and phases but I created my own buttons to advance two GPs called “Turn” and “Phase”. There is no previous turn button - that’s what I figured the UNDO button is for. Unlike previous turn, undo will also undo the automation so you will never get out of sync or need to worry about any of this headache…

1 Like

That’s interesting.
Yes, the Turn-Counter is referred to as the Turn-Tracker often in the documentation…pick your favorite name I guess.
I agree, the “undo” button is the way to go for backing anything out if there is any automation triggered by turn advance. One of my proposed solutions was to trigger the “undo/rewind” function with the turn-counter “-” button.
So, how would you go about walking through a list of phase names with your home-spun turn-counter? My guess is that you would probably have to keep them numeric. Do the players get any insight into the state of the counter?
By the way, what module do I look at for a good example of this?

I also default to not using the packaged turn tracker. I prefer the flexibility of a button on the toolbar and a graphical display on the map itself.

Particularly in games where advancing the turn/phase is contingent on every player “committing” their actions planned on a hidden window or taken simultaneously, there’s no other option.

I’m intrigued. What graphical display, moving a text piece onto the map? Is there a module I should look at for an example?

Of mine, only Roads & Boats and Antiquity come to mind right now. Antiquity is probably the better example.

Roads & Boats has a marker that moves along a phase track in the physical game, so that is what I used. Simultaneous play is a thing, so players can indicate when they are done by clicking on their name, and when all players have done so, the phase tracker advances. It’s not an important or significant part of the UI though.

Antiquity has a hidden movement phase, so getting the phase right is actually important. Players can “force” the phase to advance by clicking the button, or can indicate they have finished the current phase by clicking another button. When the phase track is “forced” or all players have indicated they finished, the phase advances, which is indicated by a graphical text display. When the hidden movement phase starts, nearly all the pieces on their personal boards are transferred to private windows, which have commit buttons. Unlike the previous phases, the “force” button does nothing, and all players must commit to see all pieces moved back to the public windows. A player committing is also indicated by text on the main that says they have done so. (There is an emergency button on another window to override and force hidden phase advance in the case of a player dropping out, for example.)

Anyway, the short answer is just a piece on the map with half a dozen layers, layers tied to phase and depicting the phase name, and another one that does the same kind of thing for turn.

Of course, there is no way to go back other than undo.

1 Like

That sounds pretty cool. I’m going to give it a look. Thank you.

(Please note I’m not holding these up as good design examples: the Antiquity text indicators in particular I just squeezed into available space as the requirements of the module became apparent. Functionally though, they do the job.)