Create account / Log in

Is it possible to set the Turn in a Turn Tracker directly?

Talk about module design ideas and techniques.

Moderators: Tim M, uckelman

Is it possible to set the Turn in a Turn Tracker directly?

Postby Cattlesquat » December 11th, 2019, 10:53 pm

Is it possible to set the Turn in a Turn Tracker directly to some arbitrary value? (As opposed to advancing or decrementing it a single turn using the turn tracker hotkeys)

My game has a turn marker on the map, and if the player drags the "game turn" marker to, say, Turn 13, I'd love to be able to respond to that correctly.

My master Turn tracker is named "Turn", it has a counter inside of it also named "Turn", and the counter's property field is (of course), also pointed at the global property "Turn". I've tried just manually setting the global property, but then the Turn Tracker itself doesn't seem to notice.

It's certainly conceivable that this isn't possible to do, but I thought I'd check!
Cattlesquat
 
Posts: 65
Joined: December 2nd, 2019, 4:57 pm

Re: Is it possible to set the Turn in a Turn Tracker directl

Postby JoelCFC25 » December 12th, 2019, 2:18 pm

So you want the Turn Tracker to operate normally--advancing one box at a time along your turn track if operated normally--but also to adjust to the correct value if the turn marker is manually moved several boxes ahead?

This is very complicated to explain, but it's doable. The turn track on your board needs a grid of some sort--you can do a rectangular grid or an irregular grid (my preference) with named regions corresponding to all the numbered turns, and snapping enabled. Then you configure the Turn Counter feature in your module for the right number of turns, etc. Next you need your piece for the Turn marker itself, and some method of sending it to the right region in the turn track when appropriate, presumably a Send to Location.

Now to configure getting the Turn variable in the module adjusted properly and move the counter by drag-and-drop is where it gets trickier. The piece for your Turn marker needs a Trigger on it that works in conjunction with the always-useful map-level "apply this keystroke to all pieces ending movement on this map" keystroke. Using the property match expression on the Trigger, broadly you want when CurrentZone = name-of-your-turn-track-zone-goes-here, fire a Set Global Property trait on the Turn marker piece that updates your module's Turn variable to $LocationName$ or whatever variable makes sense based on the type of grid you configured. Essentially, adopt the location of the dropped marker piece as the new value for your Turn variable.
JoelCFC25
 
Posts: 629
Joined: October 12th, 2010, 5:15 pm
Location: Minnetrista, MN

Re: Is it possible to set the Turn in a Turn Tracker directl

Postby kerkael » December 22nd, 2019, 11:24 pm

Thx Joel ! That would allow me to set Placement Bonus I never thought I could code !
This opens a wide range of possibilities in my module !!!(I hope for Cattelsquat he got it)
kerkael
 
Posts: 122
Joined: December 1st, 2017, 3:03 pm

Re: Is it possible to set the Turn in a Turn Tracker directl

Postby Cattlesquat » January 29th, 2020, 3:46 am

So I'm getting close, but I still haven't figured out how to send a value to the Turn Counter itself. The module itself has an ordinary Global Property called Turn, and I can certainly set that with a SetGlobalProperty. And I'm able to dig the turn number that the turn marker has been dragged to out of its location name, so I *know* the turn # that it's desired to set to. But if I *just* set the Global Property, then the Turn Counter itself doesn't update, and will still say "Turn 1" or whatever the turn was before the drag and drop.

Now the Turn Counter itself is (just to keep the naming as confusing as possible) also called "Turn", and it has a counter associated with it that's ALSO called "Turn". It appears that THIS counter is what I really need to be able to modify to get the turn to be officially changed as far as the turn counter is concerned. But I can't find anything in the documentation, nor any examples, of how to set the value of this counter externally from within the module. So I could update my Global Property "Turn" to be, say, 15, but the little floaty/dockable dialog at the top of the screen would still say... - Turn 1 + if you see what I mean.

Can anyone tell me how to actually set the value inside a formal Turn Counter manually?

Or again, it could turn out to be impossible. And I guess I could theoretically make my own turn-counter thing from scratch with a "minus button", a "plus button", and a "Turn 1" name string and then have those fire off various commands. Is that the only way forward if I want this functionality?
Cattlesquat
 
Posts: 65
Joined: December 2nd, 2019, 4:57 pm

Re: Is it possible to set the Turn in a Turn Tracker directl

Postby Cattlesquat » February 7th, 2020, 6:12 pm

I can confirm that (at least as of 3.2.17), it is NOT possible to send the information back into the turn tracker. One can set the *property* that the tracker is also writing to, but the tracker won't pick it up and will ignore that value if the player interacts with it.

So only workaround at present is to do without Turn Tracker -- putting turn-advancing functions directly on the map by moving the turn marker or whatever -- but one of course loses the "dockable into toolbar" feature.

Would be a nice feature for some future version if Turn tracker would notice when its global properties are written to & update itself appropriately (or could be "told to" with a GKC).
Cattlesquat
 
Posts: 65
Joined: December 2nd, 2019, 4:57 pm


Return to Module Design

Who is online

Users browsing this forum: Google [Bot], MSN [Bot] and 2 guests