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:
- A “marker property”, which is its brigade/regiment number.
- A trigger trait with menu text “deduct officer points” with hot-key ctrl-X
- A Set Global Property trait that sets “AffectedBrigade” when the unit receives a ctrl-X
- 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
- 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
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).