Create account / Log in

Showing what happens to a piece in chat window?

Talk about module design ideas and techniques.

Moderators: Tim M, uckelman

Showing what happens to a piece in chat window?

Postby Cooperbrad55 » April 2nd, 2018, 11:34 pm

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
Cooperbrad55
 
Posts: 8
Joined: January 23rd, 2016, 6:56 am
Location: San Jose, CA

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

Postby DrNostromo » April 3rd, 2018, 3:08 pm

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.
User avatar
DrNostromo
 
Posts: 1036
Joined: December 21st, 2007, 3:54 am
Location: Wine Country, Cal. USA

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

Postby Cooperbrad55 » April 4th, 2018, 2:21 am

OK thanks. I will give it a try.
Cooperbrad55
 
Posts: 8
Joined: January 23rd, 2016, 6:56 am
Location: San Jose, CA


Return to Module Design

Who is online

Users browsing this forum: No registered users and 0 guests

cron