How to report counter text label edits? - SOLVED

I’ve got editable text labels on counters representing supply points. I’d like the VASSAL window to show something somewhat close to:

PLAYER changes COUNTRY SUPPLY from XXX to YYY

?

Getting the Basic report is easy. Just create a Report Action keyed to the Key Command for the Text Label change.

The tricky part is reporting the old and new values. You will need a trigger to save the old version of the text label into a Dynamic Property before Editing, then use that in the Report Action.

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

I’ve had a look at the VASSAL docs, and while I think I understand triggers pretty well, I’m less confident about my understanding of Dynamic Properties, and really cannot grasp how to link the two as you mentioned.

May I, when you or someone else has the time, please have explicit directions?

The report action is easy, telling me the new value of the supply counter. That will do in the interim.

I’m doing this via property, so I can easily change it for all the supply tracking counters simultaneously once someone can educate me.

No rush, and thank you.

  • A

Under what contexts can you use the prefix “old” in Report Action? Is it only BasicName and Location?

  • M.

2009/6/26 Brent Easton <b.easton@exemail.com.au (b.easton@exemail.com.au)>

Post generated using Mail2Forum (mail2forum.com)

Good Point Michael.

Actually, there are two independant sets of ‘old’ variables.

  1. Whenever you do Drag and Drop movement (Or from 3.2 onwards, Send to Location, Return to Deck, Moved Fixed Distance and Pivot), the variables OldLocationName, OldMap, OldBoard, OldZone, OldX and OldY are set to the appropriate values from the counters location prior to the move.

  2. The Report Action trait has a feature where you can prefix any property name with “old” and the Report action will look up the previous value of that property from before the current KeyCommand started, so the correct Report Action format you want is something like

$PlayerId$ changes COUNTRY SUPPLY from $oldSUPPLY$ to $SUPPLY$

where you have specified ‘SUPPLY’ as the Property Name in the Text Label.

B.

*********** REPLY SEPARATOR ***********

On 26/06/2009 at 9:11 AM Michael Kiefte wrote:

Post generated using Mail2Forum (mail2forum.com)

I don’t think that’s actually documented anywhere. I looked it up, but couldn’t find it. But I’ve seen it in the code.

Thanks for clearing that up. Automatically assumed I was losing it.

  • M.

2009/6/26 Brent Easton <b.easton@exemail.com.au (b.easton@exemail.com.au)>

Post generated using Mail2Forum (mail2forum.com)

Thank you Brent, this is what I ended up going with:

$PlayerId$ ($playerSide$) changes $oldPieceName$ to $newPieceName$ on $mapName$*

Though not widely known, it is documented in the Report Action trait Reference Manual page.

B.
*********** REPLY SEPARATOR ***********

On 26/06/2009 at 10:48 AM Michael Kiefte wrote:

Post generated using Mail2Forum (mail2forum.com)