Custom code feature - board magnification - anybody using?

VASL uses a modified board picker class (ASLBoardPicker) in which one can load boards at default (1.0 x) or “deluxe” (3.0 x) magnification, with the method Board.setMagnification(), using code introduced to VASSAL in 2008 (What is board magnification for?). This is separate from the zoom level, as this only affects the size of the board, not the counters, and is intended for situations with very high counter density.

I’m curious if anyone else is using this in their modules? I’ve searched the forum and found fleeting references but nothing concrete.

I think VASL is using it for some of the HASL maps to show large hexes without enlarging the pieces… but that’s just on the basis of some vague memory I have, not something you should rely on.

Thanks Joel, I’m playing with an extension in which I can change the board magnification on the fly rather than at game start, and trying to work through the implications / what this would break. I know it’s not like zooming, both players would need to be set at the same magnification level for any piece moves to be correctly passed from one player to the other, so if one player changed it, the other would need to sync to them (or possibly just change their magnification level to the same value, I haven’t tested this).

Right now it seems to work ok*, based on the code in ASLBoardPicker to record and reset counter positions. Is there any way to update another player’s board magnification settings remotely, to avoid the potential mismatch, other than just sending them a chat message?

*It seems to work ok as long as the magnification is >= 1.0, but introduces some funky graphics glitches if I use magnification < 1.0 (exactly why I would want to do this is another story, very niche and no loss if it can’t be done), I can’t immediately see in the code why this should be.

Please feel free to react with horror with what I’m trying, it’s somewhat of a hack to implement a function to zoom the board independent of the counters that I thought I would give a try when I discovered the board magnification feature :slight_smile:

I am not optimistic about making what you’re proposing to do work correctly in V3.

You could create a command which adjusts magnification, but my suspicion is that you’ll run into problems elsewhere which will be difficult to work through.