Page 1 of 1

Showing what happens to a piece in chat window?

PostPosted: April 2nd, 2018, 11:34 pm
by Cooperbrad55
Hello,

I am modifying a module (SPQR) and want to be able to show in the chat window what happens to a piece. For example if I right click on a piece now I can add a ROUT Counter, or add/ subtract Hit points to the counter, etc. (about 6-7 different things)

I want that action to be recorded in the chat window along the lines of "piece_name" in hex xyz had "Rout_counter" added . Or "piece_name" in hex xyz had "Hits" increased. (every counter (other than markers) has a unique piece name in this module)

I figured out how to get it to show a piece movement in the chat window ("piece_name" has moved to "Hex", is what the chat window shows now), but can't seem to figure out how to get it to show these items that are right clickable.

Any help?

Thanks

Re: Showing what happens to a piece in chat window?

PostPosted: April 3rd, 2018, 3:08 pm
by DrNostromo
You would attach your right-click commands to a Trigger Action trait.

You could then have that trait send a command to perform the action and send a command to a Report Action trait that would report what's happening depending on how you set up the report.

For example: You may have a piece that has a Damage rating of 1 or 2. You could place a Dynamic Property trait on the piece to keep track of Damage and a command to adjust the damage status of, let's say, AdjustDamage.

You would also include a Report Action trait that triggers on, let's say, ReportStatus. Set up the report to say something like:

The Damage Status of $BasicName$ has been changed to $Damage$.

Then you would include a Trigger Action with a menu command of, let's say, Damage Rating. When you right-click and select Damage Rating, the Trigger Action would perform the command necessary to perform the adjustment via the AdjustDamage command and then generate a ReportStatus command to report the change.

Re: Showing what happens to a piece in chat window?

PostPosted: April 4th, 2018, 2:21 am
by Cooperbrad55
OK thanks. I will give it a try.