Is there a way to manage piece relationships?

Has anyone tried to establish relationships between pieces in some way in a module? For example, you may have a HQ counter that has 3 subordinate units on the board. It would be cool to select the HQ counter and have VASSAL highlight the subordinate units somehow. Anyone dabbled in trying to get something like this to work? Is didn’t see anything out of the box that would support this.


There are I think a few mods that do that. There is a mod for a game called A Victory Lost where HQ activations activate subordinate units automatically. Not sure how it does this but I’m doing a mod right now where I gave a trait called subunit equal to the parent formation.


For this, you’d have to venture into the realm of writing custom Java classes. I’m pretty sure that’s how the A Victory Lost module does it.

My 2nd Bull Run module has a command for each unit “(name) completed movement for turn” which will highlights ALL units for a division, etc. It would be simple to change this to have a command for a HQ “Activates all subordinate units of this HQ”

My 2nd Bull Run module can be found here. Click on a unit in the vassal and choose the above command and see what it does.

This sounds like what I need, but I didn’t have any luck finding the trait you used to implement it. Any hints?

In the 2nd Bull Run vassal module, go into Game Piece Prototype Definitions and you will see “Division Shurz” , “Division Schenck” etc.

Within these Prototypes is everything you need to implement what you need.

Markers in each unit form the basis for differentiating the units according to brigade, division, or whatever. Then Global Key commands are used for highlighting the units after completing a move or for whatever you like. Note that the command for highlighting is under the Prototype named “General” , within is the “Layer: Active” which has the red highlight.

Check it out and I would the happy to answer any further questions…

Thanks man. This give me something to work with.