I am not sure if this is a bug, or I am doing something wrong. I haven’t been able to reference the $level1$ or $level2$ properties in anything. I tried setting up a GKC which would fire when $level1$ equals a certain value, and it wasn’t working. So I created a Report Action on a piece to display the contents of $level1$ to see if I’d made a typo somewhere. To my surprise, $level1$ didn’t have anything in it.
Since I couldn’t get the turn counter working the way the help documentation seemed like it should, I created a brand new module to test. You can see in the Below screenshot that I’ve created a very simple turn counter with a few months in a list (Jan/Feb/Mar) and a counter which goes from 1-30 and loops. The turn display functions properly and cycles as you’d expect.
However, I also created a single piece with a report function: “level1 = $level1$ and level2 = $level2$”. I believe this should be printing out “level1 = Jan and level2 = 4” but instead it prints out “level1 = and level2 =”
Can anybody explain this or should I file this as a bug?
Here’s a link to the test module shown above in case it helps: drive.google.com/file/d/1ynuLGH … sp=sharing
The $levelx$ syntax is just for use internally inside the turn counter report ‘Turn name format’. You can define multiple Turn Trackers and they all use $level1$, $level2$ to refer to their own internal levels.
To access the values of the different turn levels outside the Turn Tracker, you need to reference the ‘Property Name’ defined in config for each specific level.
If you only have the one Turn Tracker, you could name your Property names level1, level2 to get the same values being used outside the Turn Tracker.
The $levelx$ properties are only visible to the Turn Counter itself. If you want to reference the current values of a Turn Counter from another piece, you have to reference the Global Property defined in the Turn Counter’s “Property Name” field.
Hah, Brent beat me to it! LOL
My problem is that I don’t have perfectly nested turns in this game. It works like this:
—Action Round 1
—Action Round 2
—Action Round 3
—Action Round 4
—Action Round 5
—Action Round 6
After phase 6 it wraps around again to “War 2”. I can’t make phases 1 through 6 as a single [list] type because I only need action rounds 1-6 during phase 3.
All this means that Phase 1, 2, 4, 5, and 6 are are each going to have a single static value ($phase2$ will always be "Phase II: " and $phase3$ will always be "Phase III: ") because they are a list with only a single entry:
When I set it up this way the turns count correctly. Everything wraps properly, but I can’t get the Global Key commands to register only on individual turns. If I setup Phase 2 as a property “phase2”, it is always going to be equal to the only entry in the list. Which means all my key commands fire at the same time whenever the turn changes. I need to be able to reference the current turn at different levels. Is there no way to do this?
Instead of a separate, single-item, list for each Phase, why not have a single list with the following entries:* Phase 1
- Phase 2
- Phase 3 - Round 1
- Phase 3 - Round 2
- Phase 3 - Round 3
- Phase 3 - Round 4
- Phase 3 - Round 5
- Phase 3 - Round 6
- Phase 4
- Phase 5
- Phase 6
You can use Java String functions if you want to extract (for example) the Round number from the total string.
Wow, of course that’s the solution. I feel dumb for not figuring that out.
It also occurs to me that you could instead use 2 completely separate Turn Counters; the first one is defined like your existing one, but with the Phases as a single basic counter and no Round counter. The second Turn Counter would be just the Round counter, and would use a GKC to advance the main Turn Counter when it resets back to 1. Either solution should work, I think.