Changing background color of pieces during play?

Hi, all. I’m currently working on my first module for Vassal, a conversion of my home-brew modern warfare game. It’s going really well so far-- the genius of the Vassal engine makes up for my noobishness. :slight_smile: But, even after reading through the wiki and many posts here, I have lots of questions and hope someone can help me out.

I know there’s a way to dynamically assign ownership to pieces, but is it possible to assign a background color to a piece as well? Ideally it would be nice if the color was assigned automatically as the piece enters play, but I’ll take it any way I can get it. Similarly, is there any way for the engine to change the hue or RGB balance of a piece’s graphic?

I intended for my module to have a bunch of “generic” units that any side can use (i.e. infantry, supply trucks, construction units, etc.) in addition to faction-specific pieces. I’d like each faction to have its own color scheme for easy identification, but I’d also like to be able to have those generic units match the side that brings them into play.

I know I could simply clone those units and add them with a new color for each and every side, but that would ultimately involve over 300 separate pieces. That’s a waste of time and disk space I’d definitely want to avoid if possible. So, is there any way to dynamically assign colors?

First off, no, the engine cannot dynamically alter the color of a piece. You would have to have a graphic for each color you wish to use.

I can think of a few different ways you can do what you want using layers with transparent overlays and key commands but I don’t know specifically how you have this set up or want it done.

Drop me an E-mail if you’d like some help on it and I’ll see what I can do.

Oh, I hadn’t thought about using layers and transparencies. I can probably make do with something like that. Thanks!