Show map hex beneath counters in stack viewer

I know there is a way to display the hex beneath the counters in the mouse over stack viewer as the VASL module does it, but I can’t figure how it’s done. Can somebody give me a quick rundown of how to add that feature to the stack viewer in a Vassal module?

The only way I know that this can be done in standard Vassal is if the terrain hex is actually a piece itself. VASL may have custom code, of course.

Thank you. I was hoping it wasn’t something that required custom code or at least something I could copy and use. It would be a nice feature to have so that you don’t have to hide all the pieces to see exactly what is under the counters.

1 Like

There is a map-level component function to hide/show the counters on the map via a toolbar button.

Yes there is, and I have included that in the module I am working on but, as I said, it would be nice to not have to use the show/hide function to see what terrain is under the counters if you could just see it when moussing over a stack.
Without that function, if you want to see what stacked units are in a hex and also want to see the terrain, it takes two more keystrokes than it would need if the stack viewer would just show the terrain under the counters.

That feature in VASL is custom code. There is no standard feature that allows this.

1 Like

To do it without custom code you’d need to make a “piece” for every space you want to be able to show, use a Does Not Stack trait to make it never select/move, align it over its location with an At Start stack, and then use e.g. the DrawingMouseoverIndex property in the Layer level-follows-expression box to have them only drawn when showing the rollover box. I did that in my Almoravid module but it’s more of a “zone movement” game with a relatively low number of locations. It might be a fair amount of work for a hex game with lots of spaces.

It would be kind of cool if we had that as a future feature though, because it’s a fairly universal need.

3 Likes