Place Marker & Using 'Define Marker'

This has probably been asked before, but for the life of me I fail to find it.

The game (WiF) has major and minor powers. A minor power can be controlled by a major power. I can get that action done easily, complete with a little flag on the minor unit of the controlling major power. Each major power can drop a small counter to indicate that it owns a hex in another country - using ‘place marker’ trait. What I want to do is that a controlled minor can do the same thing; using the flag of the controlling major power.

Minors have their own prototype that includes a layer trait named “MP Controller” (that use an expression to select that appropriate flag to display), a calc prop named MaP the gets the level name of MP Controller (why I’ve got this one I’m not sure), a DP to set the correct send to map when unit is eliminated, a DP for the player to change the unit’s controlling major and (now) a place marker trait.

I set up a ‘place marker’ trait and used the ‘define marker’ attribute. For the defined marker I used a layer trait with the little flags and selected the ‘Levels follow expression value’. The expression used being ‘MP Controller_Level’ (I did use GetProperty(“MP Controller_Level”) but it came back as just MP Controller_Level). MP Controller_Level is a layer trait that displays the controlling major power flag on the unit (which in turn is set by a dynamic property for user interaction). I use cntrl Y to activate.

Initially, cntrl y for both, no joy. Used cntrl 9 for the defined marker, still no joy. Then just left cntrl y for the place marker, still nothing.

So, I suppose the question is - how do I get the ‘place marker’ trait to activate the ‘define marker’ sub element?

The solution will also enable me to resolve another element of this module. I do look forward to this as there are some very smart users out there.

I’m not sure I understand what you mean.

A Place Marker trait defines a unit that does not exist until you invoke the Place Marker Keyboard Command, at which point the unit defined inside the ‘Define Marker’ definition is created and placed on the board, assuming you have correctly defined a visible unit in the marker. The newly created unit is then completely independent and can be interacted with using the Ketboard Commands that it defines.

Agree with you. But I want the ‘define marker’ to use a ‘Level follows expression’ as I want it to select the appropriate flag from the 10 available. Just using MPController_Level, a piece trait within the same prototype as the Place Marker trait, does not work. If I use a single graphic using only the Basic trait it works fine.

I rejigged the whole prototype to use the DP result, which I renamed to MaP. Following expression used in the ‘define marker’ to select the right level graphic.

(MaP==“chinat”?2:(MaP==“chicom”?3:(MaP==“cw”?4:(MaP==“france”?5:(MaP==“germany”?6:(MaP==“italy”?7:(MaP==“japan”?8:(MaP==“usa”?9:(MaP==“ussr”?10:1)))))))))

This throws an error:

Bad Data in Module: [Layer - mapmarker] - Numeric field contains a non-number followProperty[{(MaP==“chinat”?2:(MaP==“chicom”?3:(MaP==“cw”?4:(MaP==“france”?5:(MaP==“germany”?6:(MaP==“italy”?7:(MaP==“japan”?8:(MaP==“usa”?9:(MaP==“ussr”?10:1)))))))))}]=true

An interesting outcome, as a true result should result in a number for the Level to use. The same expression works OK to select the right flag to be displayed on the unit. Why do I guess I’ll need a GP so the place marker expression knows what what MaP is.

Bad Data errors when defining pieces don’t necessarily mean the piece won’t work properly when it finally gets place on a map.

When you are editing a piece, it’s not a real piece on a real map, does not have access to anything in its prototypes and so does not have access to valid property values to evaluate correctly.

You need to test it on a Map and create the actual marker to see how it performs ‘for real’.

Always do map testing. Using a GP just adds the flag to all minors. Still not dropping the small marker flag for hex ownership.

Is the ‘place marker’ trait ‘define marker’ able to access the DP or calc prop of the prototype the ‘place marker’ trait is in?

As I use a transparent image for the 1st level, I had not noticed that the minor units do drop a marker. But that is all they drop, even when a major power flag is active. Thus that wonderful expression equates to false, thus only the transparent image is placed. Therefore, MaP, which is defined within the same prototype as the ‘place marker’ using a DP, cannot be accessed by the ‘define marker’ subset of the ‘place marker’. That was sort of evident if I use the insert, properties of the expression builder - there are no Piece Properties available (although that is also true for the MPController Levels expression).

No, they are two different units and have no relationship to each other.

You have to devise some method to transmit the desired value from the initial counter to the placed marker. This will usually involve writing the value to a Global property, placing the Marker, then using the option to apply a key command after placing the marker to tell the marker to read the value from the Global Property.

Yes, I know, clumsy.

damn. Thanks for your help though Brent