vassalengine / vassal

VASSAL, the open-source boardgame engine
https://vassalengine.org
GNU Lesser General Public License v2.1
402 stars 96 forks source link

Location indexing failure #13408

Open riverwanderer opened 2 weeks ago

riverwanderer commented 2 weeks ago

Location indexing fails for the Liberté module (v1.0.9). This module has Location Indexing enabled (as that is the default).

image

The module incorporate a phase where a marker block is moved from 1 province (a Zone) to another, in sequence, evaluating election results based on stacks of blocks within each province. On entry to the province, the marker piece calculates how many stacks there are in the province, with how many blocks and who owns each stack.

An example game file is attached, to demonstrate the problem, key features described here:

Start position: The Bretagne province is in a correct state. Left click on the black cube to resolve the election in Bretagne and progress to the next province (4-Touraine):

esolve election

The next expected state is as shown here. This state is obtained prior to Vassal 3.7 and when Location Indexing is disabled in Vassal 3.7:

s=3 idx=1 Orange 2

However, with Location Indexing enabled, the state becomes unpredictable and depends on the order in which pieces are moved into or within the province zone. Here is a typical state for the example game file:

Pasted Graphic 2

NOTE: To demo the issue from a freshly loaded game it is necessary to move one or both stacks of the blocks within province 4 before you click on the black cube. Presumably the location indices are refreshed when the game loads.

The demo game file: bad index demo.zip Use the demo file from this test version of the module: here (icloud account needed).

I will workaround the issue by disabling indexing.