Create account / Log in

Hex-grid re-size causing stacking issue in pre-set scenarios

Issues with the Vassal engine.

Moderators: uckelman, Tim M

Hex-grid re-size causing stacking issue in pre-set scenarios

Postby marktb1961 » September 24th, 2020, 9:01 am

I'm after some pointers for a stacking problem and hex-grids. I have a workaround but wonder if there is an easier fix.

I have two types of piece that get placed on a hex-grid map ("leader" & "unit"), one stacks on the other, with a wide offset defined for the map [Stacking Options] so both can be seen when stacked together. This has been working for weeks and works in the previous version of the module that is used on Vassal.

I had a separate issue where LoS snap-to-centre function was poorly aligned to the hex grid. I tweaked the hex-grid dimensions and offsets and this much improved the LoS accuracy.

Shortly afterwards, I started noticing that, more often than not, the "leader" piece was stacking directly on top of a "unit" piece that it was moved onto. Sometimes, the same two pieces will still offset correctly when stacked, and the fault does not become immediately apparent with existing preset scenarios (when Refresh Counters is used).

I haven't changed [Stacking Options], Do Not Stack traits or the Layers in which these pieces sit, so my adjustment of the hex-grid is my prime suspect for the problem. Also, I suspect that the issue only affects pre-set scenarios, of which there are many - especially, considering the workaround...

my workaround is to select all pieces on the map and move them to an adjacent hex and back again. From then on the normal stacking behaviour seems to be restored. I can do this in one batch but it is going to be time-consuming.
Platform used:
Vassal 3.4.10
MacOS Big Sur
iMac (27", mid-2020)
User avatar
marktb1961
 
Posts: 335
Joined: October 4th, 2018, 2:36 pm
Location: Liverpool, England

Re: Hex-grid re-size causing stacking issue in pre-set scena

Postby Brent Easton » September 24th, 2020, 11:57 am

The hex-grid used in game is the grid currently defined in the module you are using, it is not saved in the save game in any way. As soon as you adjust the hex grid in a module, all pieces in existing save games and predefined setups created with the earlier version of the module are now no longer on the snap-to points of the current hexes. Units will snap to the current hex centers, not the existing stack that is slightly offset from new hex center. The only way to fix this is to manually re-snap all existing counters to the new hex centers using the method you describe.
User avatar
Brent Easton
 
Posts: 3226
Joined: December 21st, 2007, 3:06 am
Location: Berry, NSW, Australia

Re: Hex-grid re-size causing stacking issue in pre-set scena

Postby marktb1961 » September 24th, 2020, 12:30 pm

Thank you Brent for the explanation.
Platform used:
Vassal 3.4.10
MacOS Big Sur
iMac (27", mid-2020)
User avatar
marktb1961
 
Posts: 335
Joined: October 4th, 2018, 2:36 pm
Location: Liverpool, England

Re: Hex-grid re-size causing stacking issue in pre-set scena

Postby marktb1961 » October 23rd, 2020, 6:38 pm

Brent Easton wrote:The only way to fix this is to manually re-snap all existing counters to the new hex centers using the method you describe.


In case useful to someone else, here is what I did to include a fix for this issue in the scenario upgrade that I already have in the module. I developed two components:

a) A Send To Location trait in the Prototypes for each affected piece type to perform a small move (within the confines of the grid dimensions).

b) Set of GKCs to select and trigger the movement traits for pieces in the hex area, and clear movement markers afterwards.

Mark
Platform used:
Vassal 3.4.10
MacOS Big Sur
iMac (27", mid-2020)
User avatar
marktb1961
 
Posts: 335
Joined: October 4th, 2018, 2:36 pm
Location: Liverpool, England


Return to Technical Support & Bugs

Who is online

Users browsing this forum: No registered users and 3 guests