Layer images below counter

The Layer trait allows you to activate an image layered on top of your counter. There’s an option called “Underneath when highlighted”, which ensures your layered image is below the counter. Is there a way to make this the default for a given layer, regardless of its highlighted status?

No,

But if it’s always underneath, then why not place it in a layer below the main image layer?

Regards,
Brent.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

On 3/18/08, Brent Easton wrote:

Sorry, but I don’t follow Brent. The main image is contained in the
“Basic Piece” trait, and I don’t think any other trait can be above
that one. Even if it could, I want to provide access to the Layer
trait via a prototype.

-Tim


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Construct your piece with a blank/transparent basic piece. Place your main image instead on its own layer. always active.
Now you can put layers underneath the main piece

Tim Byrne sultan@locehilios.com wrote:

Post generated using Mail2Forum (mail2forum.com)

Tim,

Leave the main image in the BasicPiece empty and move it up into an always active layer. This now becomes your main image layer. Now add your ‘underneath’ layer in a new layer between this one and the empty BasicPiece where it will appear ‘underneath’ your main image when turned on.

Regards,
Brent,


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

So where each piece currently consists of BasicPiece info, plus a
prototype, it would instead become BasicPiece, Prototype (with lower
level layer in it), Layer (with counter graphic in it), Prototype
(with higher level layers). Ugh. That’s gonna make the module much
more difficult to understand and maintain. How difficult do you think
it might be to add an additional option to always draw a given layer
under the counter?


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Tim,

With questions like this it is often useful to give a detailed description of what you are trying to do and why the current setup doesn’t work for you.

For me, without detailed info, I can’t see the need for this. If a Layer was to always be drawn underneath the main BasicPiece image, then isn’t the BasicPiece image going to be always obscuring a certain portion of the underneath image? In which case, why not just cut out of the ‘underneath’ image the part of it that will be obscured by the BasicPiece image, and then lay it over the top. You won’t be able to tell that it is not underneath.

Regards,
Brent.


Brent Easton
Analyst/Programmer
University of Western Sydney
Email: b.easton@uws.edu.au


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Of course, laziness is one of the three virtues of the programmer (the
most important one) :slight_smile:

Understandable.

Here’s the specific situation. The game has has multiple armies which
are denoted in the unit graphics. Each unit also has many various
layers that might be displayed at different times. The game also has
(in certain multiple-player modes) the need to distinguish ownership
of units within the same army. In the physical game, this is done
with a token placed underneath one of the player’s units (the other
player has no tokens under their units). In VASSAL there is a good
spot on the unit to place this image, but in some instances unit
details bleed over into that area. And it is preferable to have the
detail of the units, rather than the detail of that ownership marker.
Obscuring some of the ownership marker does not effect the ability to
understand what its representing, and allows for very quick
identification.

I can’t just “cut out” the underneath image as it would be different
for all the units (the unit images actually have pictures of molded
figures so they are not the same shape).

Does this make sense?


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Brent, I have done some more testing and graphics work, and I can make
it with as is with a smaller image.

I still think this might be a useful flexibility to add in the future.
I was mostly interested in how difficult it might be to implement. I
might do that if I get time.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Aha, I wondered if that might be the case.

It would be a fairly easy change to implement, since it already does it in the ‘When selected’ case.

Regards,
Brent.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)