How best to implement on/off reference numbers on map?

I have a module with a large map, 180-ish locales that are not, by default, labelled with any identifying numbers. The designer did release an image of the map with reference numbers, and many players use these numbers to reference the locales during play.

So, by default, I don’t want those numbers cluttering the map. However, I do want a toggle to make those numbers visible.

My first attempt was an at-start single map-sized mostly transparent piece of all the reference numbers on a bottom layer that starts invisible and can be made visible by a global key command.

This ran into the problem that the “hide pieces” toggle also hides the reference numbers. Given that players might use the “hide pieces” toggle to try and view the reference numbers under other pieces, this isn’t ideal.

My current attempt is to make the actual map the one with the reference numbers visible, and to have another at-start piece image of the map without the reference numbers that entirely covers the map. This way the “hide pieces” toggle is all I need to fulfil both functions. The downside is that I have two 8 Mb png images in the module, which seems redundant and possibly a memory hog.

Are there issues with having such a setup? Is there any better way to do this?

Consider Game Piece Layers perhaps? I have this in my HIS/VQ modules (and maybe Wilderness War too) for the case of wanting to toggle visibility of only units but still see control markers on the map. Once you add this to your map and classify your pieces with Marker traits, you can add a control with associated toolbar buttons to toggle visibility of named layers.

I’m guessing this is Napoleon’s Triumph, so the reference map local number “overlay” would be your bottom game piece layer, then blocks above that, then…probably not much else as there aren’t really game markers to speak of unless you’re adding some.

I think your initial plan was sound. (I assume you were using map layers and understood how to control them.) Where I think you went astray is you tried using the default “hide pieces” button on the toolbar. Don’t. Disable it and make your own. If you don’t understand this, ask again.

The disk space consumption is likely not worth sweating. The memory consumption depends–what are the pixel dimensions of the map image?

If you go back to the map-sized “piece” that only has labels on it, consider making that SVG instead of PNG, which should have both RAM consumption and file size benefits.

I like the default hide pieces button for the simple reason that clicking it doesn’t count as an action in a log file. It’s also the only(?) button that changes its icon when clicked.

The map is 3960 X 3060, so yes, it is the memory use that concerns me, mostly whether or not it affects online synchronization or not.

I suppose giving up the small perks of the default hide pieces button might be the better option, it really depends on whether a 3960 X 3060 8ish Mb png piece is a bad idea.

If it were me and the number of numbered locations were manageable, I’d create the numbers as immovable pieces, and I would put them in a top layer of the main window. I would then add a button to toggle them on and off. This way they would overlay everything on the map without the need to hide anything.

I didn’t think of that. Had my mind stuck on the reference numbers as a map feature. IIRC that would make it impossible to do anything on the map while the reference numbers are displayed though, which is not intuitive and would no doubt lead to bug reports. While I prefer to keep them toggled off for the most part, I imagine there are players who prefer them always on… which leads me back to your first suggestion of giving up on the default hide pieces button. Nothing else would work for those theoretical players who want to move pieces on the map while the reference numbers are visible.

Turns out I was missing something important that solves everything - the Game Piece Layer Control sub-component of Game Piece Layers allows for players to independently activate/deactivate layers without this being logged as actions or affecting your opponent’s display. Never noticed that before - thanks JoelCFC25!

One new problem: Is there any way to have a layer (the reference numbers) start as inactive? As one possible way to do this, is there any way to have a Hotkey trigger when a module is loaded?

Thus spake Benkyo:

The map is 3960 X 3060, so yes, it is the memory use that concerns me,
mostly whether or not it affects online synchronization or not.

A map that size has about 47MB of image data, which isn’t all that much.

Image dimensions don’t affect synchronization at all, as image data isn’t
sent over the wire in network games.


J.

Good to know, thanks!

So the best solution appears to be a board with reference numbers, and a piece entirely covering the board without reference numbers. Zoom scaling issues means that a patchy piece just covering the numbers looks messy. An option to switch the piece to a blank layer provides a way to display the reference numbers throughout a PBEM game for players who prefer to do so.