In a player hand window (probably, any map window), the property
CurrentMap is null.
To demonstrate: choose a GKC defined in a map window and put $CurrentMap$ in the Report field. Then press the GKC button.
This seems like a bug.
Any Global Property defined for the same map window will report just fine.
Isn’t CurrentMap a piece level property (e.g. “what piece am I on”)?
I think you might be looking for mapName?
mapName sounded interesting, I’d not heard of this property being available.
However, if it does exist, then I can’t get it to work using the report field of a map or module level GKC (even under v3.6beta5).
CurrentMap is a Gamepiece property that should return the name of the Map a the piece is currently located on. The Piece knows what CurrentMap is and you can use CurrentMap in the GKC Selection field, which is run against the pieces, but the GKC itself knows nothing about CurrentMap, it isn’t defined. In the same way, you can’t reference any Markers or Dynamic Properties on individual pieces in the HKC Report format either. Global properties are can be seen by all components, hence no problems with using those.
The Report Format of a GKC generates the report from the GKC point of view, not from the Gamepieces it affects.
If you want the CurrentMap of the Gamepieces affected by the GKC to be reported in some way, you will need to arrange for the GKC Key Command to initiate that on the affected pieces.
Thanks for the explanations. Clearly not a bug. Still, it can be useful to grab the name of the map that the map level gkc is defined on, without delegating a function into a piece on the map.
As a workaround, when I want to reference the name of the map in a map level gkc, other than using a literal, I use a map level global property. The benefit of this is when comes to cloning the map or copying individual GKCs between maps. I wonder if this is where Brian came across
mapName, as that is the name I have used for this global property. Of course, I could just have easily used