Remove All Markers Not Working

Unabashedly copying other’s work, I have attempted to add markers to unit counters in a VASSAL module. The markers add fine and each can be removed by itself, but the Remove All Markers selection does not work.

Image A shows the Common Properties window in which four “Layers” are shown as the current traits. The properties of one of Layers, Allocated Rail, is shown as a sample. The other three are similar.

Image B shows a Trigger Action in the Common Properties to Remove All Markers.

Image C shows a Global Key Command to remove the sample Allocated Rail Markers.

Image D shows a Global Key Command to Remove All Markers.

Image E shows a Tool Bar menu listing to Remove Markers.

Can anyone tell me what I have done wrong and how to correct it? I am really stupid working with this system, so please be as exacting as you can be. Thanks.

Maybe I should load the pictures rather than put them in an zip file.

Image B

Image C:

Image D:

And finally, Image E:

Image D, which I understand to be the “Remove All Markers” part that isn’t working, shows me that you are sending the Alt-X keystroke to all pieces with a property named Type that has a value of Unit.

Images A and B are the only ones that offer a glimpse of the full set of traits assigned in your prototype, and I see a Marker trait with a name of Type and a value of Pieces.

My diagnosis is that your Remove All Markers bit isn’t working because it’s not finding any pieces with a Type property set to Unit–they all have the correctly named property, but the value is currently set to Pieces. Thus, the property match expression is finding no matches, and the Alt-X keystroke isn’t being applied to anything.

This is all based on the assumption that individual game pieces are set to use this “Common Properties” prototype.

I have read what you wrote, but I simple do not understand what I must do to get the Remove All Markers selection to work. Each remove marker works on its own, but the Remove All Markers does not work.

I just don’t understand what a “property” or a Marker Trait or Type or Piece or Unit actually mean to VASSAL. I have my own understanding of those words, but I don’t know what VASSAL understands by those works.

What should the “Type” property be set to?

Do you need some more information?

Image A was just a sample of four markers, all similar. Each removes OK by itself, but the Remove All doesn’t work.

Do you have any idea on how to fix the module?

A Marker trait is how you assign a generic property to a piece. The name of the property and its value are chosen by you. This is described in detail on page 52 of the Module Designer’s Guide (and even pictured). If you wanted to add a new Marker trait, you would scroll down the lefthand box depicted in Image A named “Available Traits”, highlight Marker, and hit Add.

In this case, you probably need to edit the Marker trait that already exists. You can see that your Common Properties prototype definition currently has a Marker trait in Image A–look for the text “Marker - Type = Pieces”.

Double-click that item. A small dialog box should appear that currently displays:

Property name: Type
Property value: Pieces

I am proposing that you change that to look like this:

Property name: Type
Property value: Unit

As I understand what I see in Image D, your “Remove All Markers” feature will only work if you make this edit. Currently, that feature is trying to apply Alt-X to all pieces it can find with a property named Type containing a value of Unit. It is finding none–your pieces have a property named Type (so far, so good), but a value of Pieces.

I am nearing the limit of how exhaustively I can explain this…sorry. Trying my best.

OK, you did it. Actually, changing Pieces to Units didn’t work, but changing Units to Pieces did work.

Thanks so much Joel.

I promise to never try to make or alter another VASSAL module. It is far too difficult for me to do.

However, if you ever need an ADC2 module, I can make one for you.

OK, you did it. Actually, changing Pieces to Units didn’t work, but changing Units to Pieces did work.

Thanks so much Joel.

I promise to never try to make or alter another VASSAL module. It is far too difficult for me to do.

However, if you ever need an ADC2 module, I can make one for you.

Thus spake Charles McLellan:

I promise to never try to make or alter another VASSAL module. It is far
too difficult for me to do.

When we start posting the specs for VASSAL 4, everyone will be
starting fresh. I encourage you to start reading and commenting on the
documentation as it’s released, as that will both help you understand
VASSAL 4 and help us understand what’s not being explained well.


J.