Recording casualties on a track

My game (Gallipoli 1915) has an officer point track for each brigade/regiment. Roughly speaking, every time a unit in that brigade/regiment takes a step loss, the Officer Point counters moves down one on that track (but never below zero). It can also be moved by other events, although these movements could be restricted to only be by key commands.

Are there example games that use casualty tracks or other “global counting” tracks? Programming-by-example is always great, i based my step-loss counters system on the La Bataille modules.

I will probably implement this in the next version of the module.

This is my thoughts on how to implement a global Officer Point track.

Each unit has:

  1. A “marker property”, which is its brigade/regiment number.
  2. A trigger trait with menu text “deduct officer points” with hot-key ctrl-X
  3. A Set Global Property trait that sets “AffectedBrigade” when the unit receives a ctrl-X
  4. Global Key Command that converts crtl-x to ctrl-alt-shift-X, it has a restricting property to limit it to the Officer Point counter for that Brigade/Regiment
  5. The Officer Point counter will receive the broadcast key. Now it needs to move one “box” to the left, which is where it gets tricky. I am looking at send to Location. I think that the OP counter needs to have a property that is its current location, probably a single integer that is its box location. It would read that number, subtract one, record that again, and then use Send to Location with the advanced property that moves to an X-Y location with a multiplier (it feels like the old FORTRAN computed GOTO!). To keep the location property safe all movements of the OP counters would have to be through key commands.

At this point it feels like dropping into Java might be easier, at which point I feel I am writing a computer game :frowning:

I should also tie this into the step loss maker system, which means that theeach unit should have a value tracking its current number of strength points (that might be readable form the level in the step loss counter, but at least I need the initial number of strength points).

Okay, making progress here in Seattle. I have connected the combat unit to the Officer Point track marker.
A crl-X on the combat unit is routed to the OP marker, which moves on the track. Labels are really useful for debugging - they can display the value of a property.

Now I am thinking about how to also integrate the step-loss markers into this. In the physical game they are separate markers (I had originally wanted to have a counter for every possible step value of every unit 'cos I hate stacks, but then I did the arithmetic).

I can use a layer to show different images driven by a key cmd (ctrl-X).

I have a version working.