Determining Strength Ratio in VASSAL

Greetings, all. Sorry if this topic has been covered six ways from Sunday; I’ll admit to being lazy on the “search the forums” front here. I’ve recently come across the Calculating Value of Cards and show in Hand thread here on the VASSAL forums and I have a similar problem with a mod I’m building (not the Star Smuggler one, if anyone’s wondering). My problem is a bit more complex.

Here’s what I’ve got: the tokens in the mod I’m building have three values: Strength, Maneuver and Hits. I’m handling Hits through a series of Prototypes that act (among other things) as a layer that puts a number of “bullet holes” on the token; when the counter has taken its maximum number of Hits, it turns into a debris cloud (the unit is destroyed at that point). Additionally, each unit has another Prototype that contains a Restricted Access property; only the player controlling the unit is allowed to manipulate it. Strength and Maneuver are being handled via Marker properties.

So here’s what I want the mod to do:

  1. When a token is moved onto the “battle board” for combat, sum up the Strength of tokens for that side, and then do the same for the Maneuver rating (I figure I can use the techniques mentioned in the Value of Cards thread for that part).
  2. Calculate the ratio of Strength values for the two sides - the game on which I’m basing my mod utilizes a CRT that’s dependent upon that ratio.
  3. Determine the difference between the Maneuver ratings for the two sides.
  4. Report the results.

Preferably, it’d have an option to give the results based upon which side is attacking and which side is defending. It’d also be nice if, when a unit was destroyed or removed from the battle board, the unit’s Strength and Maneuver were both set to zero and the mod recalculated the values.

Can anybody help me out?

Had some issues implementing the technique mentioned in the thread I linked…right now I’ve got a text report and it’s showing me what I set the property to, but adding a piece to the board on which I want to display the Strength has no effect. Trying to figure out what I did wrong. Right now I just want to make sure I’ve got the idea down and working for one of the marker properties and I’m not yet distinguishing between sides.