# Making GKC Matching Properties more generic

**URL:** <https://forum.vassalengine.org/t/making-gkc-matching-properties-more-generic/6788>\
**Category:** Development\
**Created:** [April 24, 2014, 8:32am UTC](https://forum.vassalengine.org/t/making-gkc-matching-properties-more-generic/6788 "2014-04-24T08:32:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Flaney](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/f/3be4f8/32.png) [@Flaney](https://forum.vassalengine.org/u/Flaney)\
**Post date:** [April 24, 2014, 8:32am UTC](https://forum.vassalengine.org/t/making-gkc-matching-properties-more-generic/6788/1 "2014-04-24T08:32:28Z")

</div>

Hello gang,

I am using a GKC to send g\_command to pieces on a specific map.  
Matching [{CurrentMap==“Centauri Display”}]

This works fine. However, I would like to put this GKC in a prototype that is “generic”. Something like:  
Matching [{CurrentMap==$Empire$ Display}] where Marker-Empire : Centauri This fails.

I’ve tried setting up a dynamic property MapName that is set to $Empire$ Display  
Matching [{CurrentMap==MapName}] without success.

Can someone advise on the syntax I should follow?

Thanks,  
Flaney

Edit: I am using 3.2.11

---

<div class="post-metadata">

**Author:** ![JoelCFC25](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/joelcfc25/32/2687_2.png) [@JoelCFC25](https://forum.vassalengine.org/u/JoelCFC25)\
**Post date:** [April 24, 2014, 2:15pm UTC](https://forum.vassalengine.org/t/making-gkc-matching-properties-more-generic/6788/2 "2014-04-24T14:15:40Z")

</div>

Have you tried:

[{CurrentMap==Empire + " Display"}]

I was struggling with syntax for a calculated property recently and had to use something like this. Empire should evaluate, then the + simply concatenates it with the text string " Display".

---

<div class="post-metadata">

**Author:** ![Flaney](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/f/3be4f8/32.png) [@Flaney](https://forum.vassalengine.org/u/Flaney)\
**Post date:** [April 24, 2014, 6:56pm UTC](https://forum.vassalengine.org/t/making-gkc-matching-properties-more-generic/6788/3 "2014-04-24T18:56:32Z")

</div>

Excellent! That did the trick. This needs to be stated in the reference manual somewhere.

Thanks!

flaney

---

<div class="post-metadata">

**Author:** ![Flaney](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/f/3be4f8/32.png) [@Flaney](https://forum.vassalengine.org/u/Flaney)\
**Post date:** [April 28, 2014, 8:01am UTC](https://forum.vassalengine.org/t/making-gkc-matching-properties-more-generic/6788/4 "2014-04-28T08:01:12Z")

</div>

After carefully checking the effect of the GKC matching [{CurrentMap==Empire + " Display"}]. I found that the command I issue goes out to all Empire Displays. i.e., CurrentMap == “Centauri Display” | “Narn Display”

So there is no error with this comparison but it goes farther than I expected. I noticed this when switching to a non-phasing Display and saw changes that should not have occurred.

How would I keep a GKC localized to a specific Map when using in a Prototype? My solution was to abandon the generic prototype.

flaney
