Having a Layer Property Follow Map Property

I’m making a game where each of the map zones has a Global Property called wealth (numeric).

I have game markers to show which side controls the zone. The control markers have a Layer called tax, which I have set to follow the property called wealth so they can display the tax rate on the marker.

However, when the control marker is in the map zone, the layer doesn’t change to reflect the map property.

Is something else needed?

You need to have a trigger of some kind to update the value. Try this…

Change the variable name on the layer to something like ZoneWealth.

Include a Dynamic Property trait on the control marker to set the variable ZoneWealth to equal the variable Wealth in the Named Zone $CurrentZone$. Set it to trigger on a key command.

Then set some way for this key command to trigger when the control marker in placed in the zone.

When the trigger is set off, the ZoneWealth will be updated to equal the Wealth of the Current Zone and the layer will display the new value.

I just did this off the top of my head without testing it but I think it should work.

Thanks, Doc

None of the suggestions Dr. Nostromo suggested worked. It made no difference whether I made ZoneWealth a DP or a GP. It made no difference whether I made ZoneWealth = Wealth or $Wealth$. ZoneWealth read the variable $Wealth$ as text input.

However, I did discover the solution. Quite simple. Add a Text Label to the counter and put $Wealth$ in the Text box. My Control Counter instantly displays each zones GP of Wealth on the face of the counter.

Why can’t we use numeric variables for setting the value of a DP or GP?

That would be the “Is numeric” checkbox for those traits.

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of bugstomper
Sent: Monday, July 26, 2010 8:33 PM
To: messages@vassalengine.org
Subject: [messages] [Module Design] Re: Having a Layer Property Follow Map
Property

None of the suggestions Dr. Nostromo suggested worked. It made no
difference whether I made ZoneWealth a DP or a GP. It made no
difference whether I made ZoneWealth = Wealth or $Wealth$. ZoneWealth
read the variable $Wealth$ as text input.

However, I did discover the solution. Quite simple. Add a Text Label
to the counter and put $Wealth$ in the Text box. My Control Counter
instantly displays each zones GP of Wealth on the face of the counter.

Why can’t we use numeric variables for setting the value of a DP or GP?


Read this topic online here:
https://forum.vassalengine.org/t/having-a-layer-property-follow-map-property/3118/4

The numeric box is checked in all instances.

Has to be how it’s set up then. Would have to see it to work out but the
Text Label is a good solution also

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of bugstomper
Sent: Monday, July 26, 2010 8:53 PM
To: messages@vassalengine.org
Subject: [messages] [Module Design] Re: Having a Layer Property Follow Map
Property

The numeric box is checked in all instances.


Read this topic online here:
https://forum.vassalengine.org/t/having-a-layer-property-follow-map-property/3118/6

Setup -

In the mapboard section under multi-zoned grid I have a numeric GP named Wealth for each zone, and the value for Wealth is a number.

In the Game Piece Pallette, I have a marker named Control with a layer named Tax set to follow a property. I then tried setting a numeric DP named Tax to the value $Wealth$. When that didn’t work I tried it with a numeric GP named Tax. I added a Global Hot Key to trigger the operation. I tried with the layer above and below the property setting.

When I triggered the hot key, I always got a message stating that the value of Tax was non-numeric; Tax = Wealth.
I got the same message when the DP/GP variable was entered as Wealth or $Wealth$.

I really need to see it. It is difficult to troubleshoot descriptions. The
GP under the Map Zones doesn’t sound right somehow though.

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of bugstomper
Sent: Monday, July 26, 2010 9:17 PM
To: messages@vassalengine.org
Subject: [messages] [Module Design] Re: Having a Layer Property Follow Map
Property

Setup -

In the mapboard section under multi-zoned grid I have a numeric GP named
Wealth for each zone, and the value for Wealth is a number.

In the Game Piece Pallette, I have a marker named Control with a layer
named Tax set to follow a property. I then tried setting a numeric DP
named Tax to the value $Wealth$. When that didn’t work I tried it with
a numeric GP named Tax. I added a Global Hot Key to trigger the
operation. I tried with the layer above and below the property setting.

When I triggered the hot key, I always got a message stating that the
value of Tax was non-numeric; Tax = Wealth.
I got the same message when the DP/GP variable was entered as Wealth or
$Wealth$.


Read this topic online here:
https://forum.vassalengine.org/t/having-a-layer-property-follow-map-property/3118/8

One thing I should point out is that the Dynamic Property trait must reside above the Layer trait. I don’t know why it works that way but it does. That may be the reason my original suggestion didn’t work.

I tried the DP in both positions, above the Layer and below it.

What’s the best way to let you see it.

You can email me the module if its less than 10mb or host it somewhere on a
file sharing site like www.mediafire.com and send a d/l link

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of bugstomper
Sent: Tuesday, July 27, 2010 5:24 AM
To: messages@vassalengine.org
Subject: [messages] [Module Design] Re: Having a Layer Property Follow Map
Property

What’s the best way to let you see it.


Read this topic online here:
https://forum.vassalengine.org/t/having-a-layer-property-follow-map-property/3118/12

OK. I got the variables working within the Layer and following the $Wealth$ property. It doesn’t seem that I did anything different. I am able to either increment or set values directly using the variable property name. Perhaps it had to do with case sensitive property names that I had wrong by mistake.

Now I have to work thru how to make each Control counter actually update from the wealth property for the zone they are located in. They presently use the $Wealth$ property from the zone where the last counter was selected.

Thanks for the encouragement to keep me plugging away 'til I got it. This is so like writing computer programs, only harder.

Properties are case/type sensitive.

Continuing your problem, sounds like you will need to use trigger sets
differentiated by the CurrentZone property in the PME field to update
accordingly

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of bugstomper
Sent: Tuesday, July 27, 2010 9:23 PM
To: messages@vassalengine.org
Subject: [messages] [Module Design] Re: Having a Layer Property Follow
MapProperty

OK. I got the variables working within the Layer and following the
$Wealth$ property. It doesn’t seem that I did anything different. I am
able to either increment or set values directly using the variable
property name. Perhaps it had to do with case sensitive property names
that I had wrong by mistake.

Now I have to work thru how to make each Control counter actually update
from the wealth property for the zone they are located in. They
presently use the $Wealth$ property from the zone where the last counter
was selected.

Thanks for the encouragement to keep me plugging away 'til I got it.
This is so like writing computer programs, only harder.


Read this topic online here:
https://forum.vassalengine.org/t/having-a-layer-property-follow-map-property/3118/14

One thing you can do to set off a trigger is in the Map Window properties.

Down at the bottom, you have the option:

Key command to apply to all units ending movement on this map.

Set up a key command here and then set up your trigger with that key command on the Control Markers. Every time one of the markers is place or moved on the map, it will automatically update.