Changing the size ratio between counters and the map?

Robin Reeve

The Swiss Moron
Staff member
Moderator
Joined
Jul 26, 2003
Messages
19,636
Reaction score
5,613
Location
St-Légier
First name
Robin
Country
llSwitzerland
Hi all,
I know nothing about the coding of VASL, so my question could be unreasonable.
One frequent problem in VASL - compared with the physical game - is that the size of the counters in relation to the size of hexes is larger.
Quite often, the counters cover most of the hex's terrain and you need to hover over the stacks to see what it is.
There is an option to turn normal hexes in "Deluxe" ones, but that often is too large when the overall battlefield is more than one board large.

Si I am wondering if there could be an option, comparable with the zoom one, where the ratio of size between counters and hexes could be tweaked?

As said, it may be something too complex or altogether impossible to do.
But I thought that it costs nothing to ask.
I would like to take the opportunity to thank heartedly all the people who work on VASL, which already is a superb tool for players like me, who are isolated from nearby opponents.
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
590
Reaction score
298
Location
A maze of twisty little passages, all alike
Country
llAustralia
I posted a feature request for this years ago, but incorrectly sent it to the VASL guys instead of VASSAL. Someone else asked the same thing the other day, so I finally spat the dummy and went to open a VASSAL ticket for it, but saw that @DougRim had already done it. @Tuomo also has one here, as well.

I don't know who Benkyo is, but he said "no, it can't be done", but he seems to be talking about a second zoomed-in map window, which is not quite the same thing.

One thing I noticed when I was messing around with this years ago is that you can enable/disable deluxe-size hexes on the fly, and the position of the counters within a hex is remembered, so it seems that the key infrastructure in the code is there already, and the change might be more of a rendering issue...
 

Robin Reeve

The Swiss Moron
Staff member
Moderator
Joined
Jul 26, 2003
Messages
19,636
Reaction score
5,613
Location
St-Légier
First name
Robin
Country
llSwitzerland
Thanks, Pacman Ghost.
It seems that I was far from the first one to have that question.
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
590
Reaction score
298
Location
A maze of twisty little passages, all alike
Country
llAustralia
Another thought: maybe a quick hack might be to make it quick and easy to switch between normal- and deluxe-sized hexes. The process is currently pretty clunky (you have to go through "Pick new boards for this scenario"), and it seems to be a bit finicky, but if we had a hotkey to switch between the two modes, that might give something useable for relatively little effort... 💡
 

Robin Reeve

The Swiss Moron
Staff member
Moderator
Joined
Jul 26, 2003
Messages
19,636
Reaction score
5,613
Location
St-Légier
First name
Robin
Country
llSwitzerland
My problem is that I would like to see at a glance the terrain of the hex without switching to the oversized Deluxe format.
One already can see it by hovering with the mouse over the stack.
But I occasionally have been tricked into thinking that a unit was in a building rather than open ground or the contrary.
Slightly changing the ratio between hexes and counters would do it.
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
590
Reaction score
298
Location
A maze of twisty little passages, all alike
Country
llAustralia
Slightly changing the ratio between hexes and counters would do it.
When I originally posted my FR, I had in mind an adjustable ratio e.g. the same way you can currently press F3/F4 to increase/decrease the size of map, pressing Ctrl-F3/F4 would adjust the size of only the map. At some point, the counters would switch from being in a single stack to separated out (see screenshots below).

This might be a bit of work, so a quick-and-easy way of doing this might be to have a hotkey that switches between normal- and deluxe-size hexes.

This is what a crowded hex looks like now:
20154

And when you hover over it:
20155

Definitely helpful, but imagine if you could press (say) Ctrl-Z, and it switches to this:
20156

where you can arrange the counters as you please. Then press Ctrl-Z to go back again to the normal view.

Now, imagine this happening for every hex in a situation like this:
20157
Hovering over a stack to see what's there is useful, but you can only hover over one stack at a time.

Being able to incrementally adjust the map size (without affecting the counter size) would be really cool, but maybe difficult to do. Switching between normal- and deluxe-size hexes might be easier, because I suspect the hard stuff in the code might be already there...
 

apbills

Elder Member
Joined
Jan 28, 2003
Messages
3,422
Reaction score
953
Location
Pewaukee, WI
Country
llUnited States
My friend when playing RB games is that button on the menu bar that hides the pieces. I am always flipping back and forth with that so I can see the terrain.
 

Robin Reeve

The Swiss Moron
Staff member
Moderator
Joined
Jul 26, 2003
Messages
19,636
Reaction score
5,613
Location
St-Légier
First name
Robin
Country
llSwitzerland
My friend when playing RB games is that button on the menu bar that hides the pieces. I am always flipping back and forth with that so I can see the terrain.
I also use that function.
 

MTL

Member
Joined
Oct 29, 2019
Messages
84
Reaction score
125
Country
llUnited Kingdom
When I originally posted my FR, I had in mind an adjustable ratio e.g. the same way you can currently press F3/F4 to increase/decrease the size of map, pressing Ctrl-F3/F4 would adjust the size of only the map. At some point, the counters would switch from being in a single stack to separated out (see screenshots below).

This might be a bit of work, so a quick-and-easy way of doing this might be to have a hotkey that switches between normal- and deluxe-size hexes.

This is what a crowded hex looks like now:
View attachment 20154

And when you hover over it:
View attachment 20155

Definitely helpful, but imagine if you could press (say) Ctrl-Z, and it switches to this:
View attachment 20156

where you can arrange the counters as you please. Then press Ctrl-Z to go back again to the normal view.

Now, imagine this happening for every hex in a situation like this:
View attachment 20157
Hovering over a stack to see what's there is useful, but you can only hover over one stack at a time.

Being able to incrementally adjust the map size (without affecting the counter size) would be really cool, but maybe difficult to do. Switching between normal- and deluxe-size hexes might be easier, because I suspect the hard stuff in the code might be already there...
It would be a bit tricky... not just the map hex size to deal with but the overlay hex sizes too. Then, of course you'd need to rearrange the counters within the bigger hex (not much point in just showing a player the same tower of counters in a bigger hex).
 

Robin Reeve

The Swiss Moron
Staff member
Moderator
Joined
Jul 26, 2003
Messages
19,636
Reaction score
5,613
Location
St-Légier
First name
Robin
Country
llSwitzerland
It would be a bit tricky... not just the map hex size to deal with but the overlay hex sizes too.
Not if things work as per the Zoom in/out function : overlays follow the Zoom level fine.
Then, of course you'd need to rearrange the counters within the bigger hex (not much point in just showing a player the same tower of counters in a bigger hex).
I beg to differ.
My initial post adresses the fact that stacks take so much footprint in a hex, that one cannot see the terrain under them.
I wouldn't want to introduce the Deluxe option of disseminating parts of a stack in an enlarged hex. I would just like to tweak the counter to hex size ratio to have the contours of the terrain (typically a building) appear.

I would not add complications where they are not needed.
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
590
Reaction score
298
Location
A maze of twisty little passages, all alike
Country
llAustralia
It would be a bit tricky... not just the map hex size to deal with but the overlay hex sizes too. Then, of course you'd need to rearrange the counters within the bigger hex (not much point in just showing a player the same tower of counters in a bigger hex).
The screenshots I posted before, I didn't hack them up in Photoshop, they're real screenshots from VASL, and I had been switching between normal- and deluxe-size hexes on the fly.

You can reposition the counters withing the hexes, it saves properly, it syncs with a remote player, hover works as expected with the mini-stacks.
20171

So, it looks like everything works already, we just need a quick way to flip between the hex sizes. There are a few issues, but switching hex-size is not something people normally do during the course of a game, so it's hardly surprising there might be a few bugs, but it looks like the hard stuff is already done.

Furthermore, it looks like the scaling ratio is under VASL's control [*], so it should be possible for it to have ratios of everything between 1.0 and 3.0 in increments of, say 0.5, instead of just the two end-points.

[*] This might be the wrong line of code (it could be referring to the boards in the picker dialog), but there are a few calls to setMagnification() elsewhere in the code. I haven't looked at it all closely, but the point still stands: I'm guessing the zoom factor seems to be (or could be) under VASL's control.
 

MTL

Member
Joined
Oct 29, 2019
Messages
84
Reaction score
125
Country
llUnited Kingdom
The screenshots I posted before, I didn't hack them up in Photoshop, they're real screenshots from VASL, and I had been switching between normal- and deluxe-size hexes on the fly.

You can reposition the counters withing the hexes, it saves properly, it syncs with a remote player, hover works as expected with the mini-stacks.
View attachment 20171

So, it looks like everything works already, we just need a quick way to flip between the hex sizes. There are a few issues, but switching hex-size is not something people normally do during the course of a game, so it's hardly surprising there might be a few bugs, but it looks like the hard stuff is already done.

Furthermore, it looks like the scaling ratio is under VASL's control [*], so it should be possible for it to have ratios of everything between 1.0 and 3.0 in increments of, say 0.5, instead of just the two end-points.

[*] This might be the wrong line of code (it could be referring to the boards in the picker dialog), but there are a few calls to setMagnification() elsewhere in the code. I haven't looked at it all closely, but the point still stands: I'm guessing the zoom factor seems to be (or could be) under VASL's control.
Hi PMG.

Yep - I know that wasn't a mockup. Sadly, the 'quick' way doesn't quite yield the results one would hope for:
20174

to
20175

So it's not just a question of resizing the boards, but copying/writing/reusing/refactoring code / sending the right events (not sure which / what combo without further research) to replicate the 'pick new boards' functionality to rebuild the map, add the boards to get the clipping right, then rejigging the overlays, then moving the counters to the correct hexes. Even if using the pick new boards -> enable deluxe hexes method, overlay work will need to be done to sort out the sizing, as can be seen here:
20176

As the new style overlays are essentially counters, and get resized accordingly when you flip between 'deluxe' and 'normal' boards. Not to say it's impossible, but it is more work than you'd think to 'make the hexes bigger' in a reliable way.
 

Pacman Ghost

Senior Member
Joined
Feb 25, 2017
Messages
590
Reaction score
298
Location
A maze of twisty little passages, all alike
Country
llAustralia
So it's not just a question of resizing the boards, but copying/writing/reusing/refactoring code / sending the right events (not sure which / what combo without further research) to replicate the 'pick new boards' functionality to rebuild the map, add the boards to get the clipping right, then rejigging the overlays, then moving the counters to the correct hexes.
This is the bit I don't get. Why do we need to replicate the "pick new boards" functionality, and the other stuff. Other than overlays, isn't this stuff already working? i.e. the basic stuff, like positioning counters, saving/loading state, sync'ing with a remote player, etc. IOW, if somebody was playing a Stalingrad slugfest that was drowning in counters, but it had no overlays, would such a feature be useable? Or maybe there's an assumption that the hex size gets set once, when the scenario is set up, and then never changes...?

I wonder how many people actually use deluxe-size hexes, anyway. Maybe time to add some telemetry... :)

Not to say it's impossible, but it is more work than you'd think to 'make the hexes bigger' in a reliable way.
It seems overlays are an issue, and I noted in my original FR that labels don't seem to get handled properly, either (which would hobble vasl-templates:rolleyes: ), but there does seem to be some demand for this feature. This comes up semi-regularly (especially in recent years), so if the devs are mulling over new features to add, this could be a candidate. Maybe we could organize a few slabs of beer to facilitate the process...? 👍
 
Last edited:
Reactions: MTL

MTL

Member
Joined
Oct 29, 2019
Messages
84
Reaction score
125
Country
llUnited Kingdom
This is the bit I don't get. Why do we need to replicate the "pick new boards" functionality, and the other stuff. Other than overlays, isn't this stuff already working? i.e. the basic stuff, like positioning counters, saving/loading state, sync'ing with a remote player, etc. IOW, if somebody was playing a Stalingrad slugfest that was drowning in counters, but it had no overlays, would such a feature be useable? Or maybe there's an assumption that the hex size gets set once, when the scenario is set up, and then never changes...?

I wonder how many people actually use deluxe-size hexes, anyway. Maybe time to add some telemetry... :)


It seems overlays are an issue, and I noted in my original FR that labels don't seem to get handled properly, either (which would hobble vasl-templates:rolleyes: ), but there does seem to be some demand for this feature. This comes up semi-regularly (especially in recent years), so if the devs are mulling over new features to add, this could be a candidate. Maybe we could organize a few slabs of beer to facilitate the process...? 👍
I mean the functionality that is in the ASLBoardPicker class to do the resizing to deluxe and publish the moves, redraws, etc. to the correct decorators needs to be externalised so that it can be used by a button somewhere else. This behaviour isn't neatly encapsulated in a reusable class - it appears to be cemented into the VASL ASLBoardPicker / VASSAL BoardPicker UI code (from a cursory examination - don't @ me!) - then some work needs to be done to handle the overlay side effects. (two different streams of work, I guess - one to make the new overlays behave, and another to use the deluxe sized old overlays when needed)

Oh, if you're willing to bribe us, then that's another matter - how does next week sound? :)
 
Top