Can a Map Zone have different properties than the Map it is on?

I’m new at this and not knowledgeable about computer language so any help would be very much appreciated.

I’m trying to set up a zone on my map where Movement Trails will not be in effect. I want them on the rest of the map, but not in this zone. Specifically, I’m making an Afrika Korps module where the Turn Record Track is part of the mapboard. The units on the Turn Record Track are placed according to the turn they enter the game and I don’t need to have their movements recorded, reported or their Movement Trails enabled while they are on the TRT.

I created the main map as a multi-zoned grid with a separate zone for the hex field–the playable surface–and a separate zone for the TRT.

I have created a Menu button for the map that turns OFF all Movement Trails for all pieces on the mapboard. (And I’ve created one that turns all Movement Trails ON for all pieces on the mapboard.) But I don’t know how to set up the TRT Zone so it is independent of these buttons.

Is there a way to do that?

I also thought that it might be possible to have a property assigned to a “counter” prototype that turns off Movement Trails when the counter is on the TRT. But again, I don’t know how to do that or know if it’s even possible.

Thanks for any help.

Map traits are just that Map traits. you cannot split them.

That said.
You can have a button that turns off movement trails for all counters currently in the TRT Zone.
And a button that turns ON movement Tails for all units NOT in the TRT Zone.

Thank you Jardic for your quick response.

I suspected that I couldn’t have a zone independent from the main map properties; thank you for confirming that.

What you propose is exactly what I want to do but I don’t know how to do it.

From your pictures I’m assuming that I’m going to replace your Soviet 7-7-4 with my “Counter” prototype, and give it the Global Key Command property with the expression that you wrote out. That much I can follow, and did. The result was that Ctrl+G did shut down Movement Trails on the TRT Zone (I don’t know why.) but Ctrl+K did nothing.

Not being familiar with VASSAL’s Key Commands, I have to ask how Ctrl+G knew to look for the matching expression “Current Zone=TRT” and then turn off Movement Trails? Is that a specific command like Ctrl+D will delete a piece? I just don’t know.

At first I thought that the Ctrl+G and Ctrl+K were in your picture only because that’s how the Global Key Command property comes up. I didn’t expect Ctrl+G to do anything and was surprised when it did exactly what I wanted it to do. So was Ctrl+K supposed to do the same? The opposite? Ctrl+K did nothing.

Is there a Key Command that will cover the second half of what I want to do: Turn ON the Movement Trails only on the pieces NOT on the TRT? Your reply said it can be done and I believe you; just, I don’t know how to go about it.

I’m sorry if these questions are annoying. It’s my ignorance showing. I may not have the knowledge to even understand an explanation. I do appreciate your help Jardic. Thank you.

All pieces have inherent properties.
https://vassalengine.org/doc/latest/ReferenceManual/Properties.html

In the example the Ctrl-G sent the Ctrl-K
If you just entered the Ctrl-K with the keyboard, vassal did not know it was a global command. it would only send it to the currently selected unit.

Instead of CurrentZone==“TRT”
use “!=” does not equal {CurrentZone != “TRT”}

If you use Discord I usually hang out there. we can chat and its easier to pose examples or I can share a screen
Link to Discord

Also usually when I use a global hot Key or a Global Command Key some other piece usually triggers it.
Or in the case of this picture a “toolbar Menu” option triggers the sequence.
Since this game has multiple players there are 10 options to select from. All duplicates except the player the card is going to.
Also if you have seen a feature like what you want in another module. Download that one and open it in the editor to see how they did it. I still do that a lot!

It depends exactly what you need, but you definitely CAN define Global Properties with the same name, but different properties in a Map and in the Zones that are part of that map, and the Property Value in the Zone will over-ride the Map Property value for any units in that Zone.

So you may define a Map-level Global Property named MovementTrailsAllowed and set it to true and a Zone-level Global Property also named MovementTrailsAllowed and set it to false. Pieces will see a different value for that property depending on whether they are in the Zone or on the Map not in a Zone.

The issue then becomes, do you have the tools you need in the piece traits to change the behaviour of the pieces in the way you want.

Brent (and Jardic too) thank you for your reply. I haven’t been able to follow this up because I got swamped with other things. Life has a way of doing that. I apologize to Jardic for my rudeness in not getting back to him.

I have to again express my ignorance with the intricacies of Vassal’s program. I know you know what you are talking about but I’m hearing only bits and pieces; a lot–a whole lot–goes over my head.

I tried to follow your instructions and set a Global Property under Main Map (true):


Then I did the same in the TRT Zone (False):

And this is what my Counter Prototype traits have:

(Ctrl T toggles trails, Shift T turns them on everywhere, and Alt T turns them off everywhere.)

I saved the changes in the Editor, Quit and Removed the module from the Vassal library, then reopened the module in Edit mode and refreshed the Predefined Setups and Refreshed the Counters. I still had Trails on the Turn Record Track:

So I don’t know enough to know what I’m doing wrong. I assume I’m missing a trait in the counter prototype or else I’m not defining True and False somewhere. Maybe it’s something else entirely.

Ah my apologies, I should have made this clearer. The example I used with the mythical MovementTrailsAllowed property was just an example of how a piece may identify that it is in a Zone that does not allow movement trails.

Vassal has no in-built functionality to do what you want, using a property named MovemenTrailsAllowed or any other property. It may be possible to do what you want with a complex set of triggers fired off by a End of Movement on a map hotkey, I’m not really sure.

Sigh. Hopes up. Hopes dashed. I don’t have the knowledge to come up with a “complex set of triggers…” to accomplish what I want to do. And I haven’t seen–or can’t recognize–where this has been done in another module. It probably has, but I haven’t seen it.

Hi Frank,

Are you moving away from ZunTzu and into VASSAL? Great. Perhaps you want to check out How to convert to a module from other tools to VASSAL to get going with converting ZunTzu modules to VASSAL.

How about something like this:

  • On your map, set the Key Command to apply to all units ending movement on this map to a named command - say updateOnEnd
  • Define your zones
    • Add a property - say MovementTrailsEnabled to the zones
      • For zones where movement trails should be enabled, set this property to true
      • For zones where movement trails should be disabled, set this property to false (or simply do not define it)
      • Important: Neither the map or board where the zones reside, nor the module should define the property, if you leave the property undefined for some zone - otherwise, the pieces will pick up the value from higher up the hierarchy.
  • In your pieces - or preferably in a Prototype
    • Add the MovementTrailTrait
      • Set the TURN ON key command and TURN OFF key command to some named commands - say turnOnTrail and turnOffTrail
    • Define two TriggerTraits
      • In both traits, make sure that Menu Command is not set
      • In both traits, set Key command to the end-movement command defined above - e.g., updateOnEnd
      • In the first TriggerTrait:
        • set Perform these Key Commands to the command to turn on the movement trail - e.g., turnOnTrail
        • set Trigger when properties match to match when the zone property is true - e.g., {MovementTrailsEnabled==true}
      • In the second TriggerTrait:
        • set Perform these Key Commands to the command to turn off the movement trail - e.g., turnOffTrail
        • set Trigger when properties match to match when the zone property is not true - e.g., {MovementTrailsEnabled!=true}

You can of course flip the logic and define the property MovementTrailsDisabled on the zones where you do not want movement trails, and then adjust the trigger’s logic too.

I haven’t tried out the above approach, but I think the logic is sound.

Internally, the TriggerTrait is called a macro trait. That’s because it provides classic flow control capabilities such as

  • if ... then ... (the else ... part must be implemented in a second TriggerTrait as above)
  • for i in ... do ...
  • while ... do ... (or do ... while ...)

Yours,
Christian

Hi Christian,

Thank you for your help. That’s very kind of you.

I don’t see ZunTzu and VASSAL as competitors; they do things differently and I like them both for their strengths. I converted a ZunTzu D-Day, Waterloo, and now Afrika Korps, to VASSAL. I learn something new each time and it’s both fun and frustrating. Mostly fun.

It’s going to take me a while to process what you wrote. I’m 75 and slow. But I will give it a go today and let you know where I get stumped.

Again, I really appreciate your help Christian.

Thank you,
Frank