Show counter dynamc property in "Auto-report format for movement within this map" in Map Window object

Hi.

I’m trying to show a piece dynamic property (Country2) contents in the message shown when a unit is moved in the map.

I have not been able to do it :frowning:

I have tried with different formats:

  • $Country2$
  • {Country2 }
  • {GetProperty(“Country2”)}

As far as I can see only a group of fixed piece properties are available.

Is there any way to reach the piece properties from the the Map Window?

Make Country2 a global property. Use Set Global Property trait instead of a DP. You can reuse the same trigger that the DP used.

Add a new Global Property, and in the action that is triggered by the unit moving on the map, add a Set Global Property trait which copies the current value of Country2 to the new GP. Then you can display that new GP.

I see your logic. But not sure it’s going to work for my use case.

I have pieces that can be moved in a map. They have traits for moving them or they can be moved by dragging with the mouse.

The pieces have a Report Action trait for showing a message describing the movement in the log. This trait can reach the DP Country2 without any problem.

My issue is: When a piece is moved with the mouse, the Report Action trait is not called and only the
Auto-Report format for movement within that map message is shown in the map. And this one has no access to the DP Country2.

It seems that I will have to find a different way to handle that issue.

Thanks for your answers guys!!

If you’re not already using the “Command to trigger when a piece ends movement on this map” (in the Map properties), the solution is as simple as adding the trigger for your movement report action to that field (assuming all your pieces use the same command for that Report Action). If you’re already using that, you need to make sure it triggers a Trigger Action which includes the movement report command.

Edit: Either way you would probably also want to blank out the Auto-Report format for movement within this map field, to avoid a double-report.

Edit 2: It just occurred to me that this might cause the report to trigger twice when you use Send to Location, but that can be fixed by removing the manual call to the Report Action that you’re presumably triggering along with the Send to Location.

1 Like

@jrwatts Your solution fixed my need. :slight_smile:

To summarize in case someone ends here looking for the same issue.

  • I removed the message Auto-Report format for movement within this map
  • I added a key command name to Key command to apply to all units ending movement on this map
  • Added the same key command name to the Report Movement trait in my pieces

With that I manage to have access to the piece properties in the generated message.

Thanks for your help!!!

2 Likes

Just coming back round to this, there is no reason that an Auto-report format can’t see a DP in a piece and report on it. Country2 won’t appear in the drop-down, but referencing $Country2$ anywhere in the report format should show it.

Make sure that the piece you where using to test this actually had a value for the Country2 property.

Begging to differ, e.g. this Auto-Report format tests various types of normal properties. It looks like only module level GPs are reportable (in addition to the special feature-level properties):
BasicName=$BasicName$ Obscured=$Obscured$ MapGP=$handSide$ CurrentZone=$CurrentZone$ CurrentMap=$CurrentMap$ ModuleVersion=$ModuleVersion$ ModuleGP=$activeSide$

This results in the output for card moved on the map:

  • BasicName= Obscured= MapGP= CurrentZone= CurrentMap= ModuleVersion=4.3.0a04 ModuleGP=Player 2

I recall it has been discussed before and I thought concluded that map movement auto-reports couldn’t see properties from the piece’s viewpoint.

Ah yes, indeed. Had a peek at the code. The reason is that the move reports are a collective report for a group of units, so you can only report on properties that all the units share.

1 Like