How to change ownership of a counter?

As the title poses. I want players to be able to convert a unit from “Neutral” to “PlayerSide A” or “PlayerSide B” during the game, with just the operations of that side available in/on the counter (e.g. when the counter is eliminated it goes to that PlayerSide’s elimination board)? “Restrict Access” doesn’t have a properties condition as part of its feature.
Related…is “PlayerSide” the same as “playerSide”?

You will need to use conditional expressions based on PlayerSide - typically in Trigger Action or Restricted Command traits.

Yes, PlayerSide is the same as playerSide.

Thanks marktb1961.
Am I correct in thinking that I cannot change the ownership of the counter but only restrict or limit its access.
For instance, a “Set Global Property” function on a counter that gives the player a choice of “setting” a property like “playerSide” to either “A” or “B” does nothing to the counter? At the module level there are “playerSide[s]” that are effected by restrictions and the Triggers I incorporate into the functioning of the counter, but a piece (like a map or counter) are accessible to all until a conditional property is placed onto said piece?

The only place a true concept of “ownership” kicks in is in relation to the Mask trait–if you mask a piece, you become its owner. Unless you set the module’s global options or the Mask trait settings otherwise, non-owners cannot unmask the piece–and depending on where other piece behaviors are defined in the trait order list relative to the Mask trait, they may not be able to do anything else with it either.

If you aren’t dealing with Masking or pieces flipping over and obscuring information at all, but just want to configure different outcomes based on whoever players designate as the “owner” or “controller” of the piece, use a Dynamic Property. Then for each operation that has different destinations/outcomes for each player side, use a Restrict Commands trait with a property match expression that will block the operations associated with the opponent.

Shorthanding here, but if you had created a DP called PieceOwner with possible values of Red and Blue, and the piece had pairs of traits for all operations (Blue and Red’s version of eliminate, Blue and Red’s version of marking as damaged, etc), this is along the lines of what you could do–it’s obviously generalized for illustration purposes.

I would call the Dynamic Property you create in the piece to track ownership something other than PlayerSide, which is a global property VASSAL will always evaluate against the player side of person executing the action.


Thx. Yes that makes sense. But as usual with me its the implementation. Baby steps. I’ve settled on Coalition as the Property (as a Global Property with an initial value = Neutral) with either “FICC” or “CC” as the values to choose from.

I have a Report Action msg set up to signal that the change has worked:

But I’m getting a “false” reading rather than the Coalition value.
This is just to check that the DP is working.
Does the counter need an initial value (i.e. Neutral)? Is a Set Global Property function a better choice than a DP?

A dynamic property is not a global property, and will not affect one.
The value you want to change to should be a simple string and not a beanshell expression.

You are getting “false” because Coalition does not equal FICC. “False” is the value your DP key command outputs with that beanshell expression.

1 Like

Right! Got it. Thx. I just don’t see what I don’t know to look for. That solved that part, anyways. Onto the next step. CC

1 Like