Vassal 3.2.8 Global Property numeric overwrite bug.

If you make a plain Global Property, then use a simple Set Global Property trait to increment the number, it will not go past 100.

Likewise, if you set the Global Property to numerical, and increase the max beyond 100, the previous incrementing Set Global Property trait will still not raise it past 100.

Reason: The “Is numeric?” option on the Set Global Property trait appears to overwrite any set or not set options on the Global Property, regardless of if it is checked or not.

I believe this is the same problem seen in this thread: viewtopic.php?f=3&t=6723&p=42323&hilit=global+property#p42323

Temporary Work Around: Just make sure to set every Set Global Property trait to “Is numeric?” and set the min/max there, to be safe.

I have no idea in which version this may have first appeared, only just noticed it in 3.2.8.

Thus spake reddeblu:

If you make a plain Global Property, then use a simple Set Global
Property trait to increment the number, it will not go past 100.

Likewise, if you set the Global Property to numerical, and increase the
max beyond 100, the previous incrementing Set Global Property trait will
still not raise it past 100.

Reason: The “Is numeric?” option on the Set Global Property trait
appears to overwrite any set or not set options on the Global Property,
regardless of if it is checked or not.

I believe this is the same problem seen in this thread:
viewtopic.php?f=3&t=6723&p=42323&hilit=global+property#p42323[1]

Temporary Work Around: Just make sure to set every Set Global Property
trait to “Is numeric?” and set the min/max there, to be safe.

I have no idea in which version this may have first appeared, only just
noticed it in 3.2.8.

Please find in which version the problem first appeared. The release
archive is here:

vassalengine.org/releases/

NB: There’s no need to check anything before 3.2.0.


J.

Okay, I found out what I could.

3.2.0:
Couldn’t get it to start, simply hung.

3.2.1:
Starts up, but crashes moments later.

3.2.2:
Got it to work, but problem still exist as exactly described in OP.

That’s as far as I got, hope it helps in some way.

Thus spake reddeblu:

Okay, I found out what I could.

3.2.0:
Couldn’t get it to start, simply hung.

3.2.1:
Starts up, but crashes moments later.

3.2.2:
Got it to work, but problem still exist as exactly described in OP.

That’s as far as I got, hope it helps in some way.

Ok. Please post a minimal test module demonstrating the problem.


J.

Ok, I made this in 3.2.2, not sure if that will help or hurt.

Anyway, there are two Global Properties named Test and Test2, both are set as Numeric, with a min of 0 and a max of 130 for both.

On the map there are two text label pieces showing both Global Properties, each of them has a Set Global Property trait which increments the Global Properties by 10 using the key command Ctrl I when selected.

Both traits are not checked for Is numerical.

The top text label piece will increment Test, the bottom Test 2.

Test will stop at exactly 100, Test2 will stop at 120.

Is the Set Global Property traits, I left the first one for Test alone.

But the second one for Test2, I checked Is numeric temporarily, set the max from 100 to 120, and then unchecked it.

I hope this helpfully demonstrates the problem occurring, if need be I can remake it in 3.2.8

That is the same problem I reported earlier as well as how I worked around it. Thanks.

Thus spake reddeblu:

Ok, I made this in 3.2.2, not sure if that will help or hurt.

Anyway, there are two Global Properties named Test and Test2, both are
set as Numeric, with a min of 0 and a max of 130 for both.

On the map there are two text label pieces showing both Global
Properties, each of them has a Set Global Property trait which
increments the Global Properties by 10 using the key command Ctrl I when
selected.

Both traits are not checked for Is numerical.

I’m looking at the test module now. When I look at the two Global
Properties in the editor, they both have “Is Numeric” checked. Is
that not what you intended?

The top text label piece will increment Test, the bottom Test 2.

Test will stop at exactly 100, Test2 will stop at 120.

I’m able to replicate this. I don’t see what the reason for it is yet.


J.

Thus spake reddeblu:

Ok, I made this in 3.2.2, not sure if that will help or hurt.

Anyway, there are two Global Properties named Test and Test2, both are
set as Numeric, with a min of 0 and a max of 130 for both.

On the map there are two text label pieces showing both Global
Properties, each of them has a Set Global Property trait which
increments the Global Properties by 10 using the key command Ctrl I when
selected.

Both traits are not checked for Is numerical.

The top text label piece will increment Test, the bottom Test 2.

Test will stop at exactly 100, Test2 will stop at 120.

I believe I see the reason this is happening now. This is what’s in the
buildFile for the Test1 piece:

<VASSAL.build.widget.PieceSlot entryName=“” gpid=“0” height=“0” width=“0”>+/null/setprop;Test;false,0,100,false;:73,130:I,10;;Current Zone/Current Map/Module; label;;Change Label;60;;0,0,0;t;0;c;0;b;c;$pieceName$ ($label$);Dialog;0;0;TextLabel;\ piece;;;;/ Test $Test$\ null;0;0;0</VASSAL.build.widget.PieceSlot>

This is what’s in the buildFile for the Test2 piece:

<VASSAL.build.widget.PieceSlot entryName=“” gpid=“1” height=“0” width=“0”>+/null/setprop;Test2;false,0,120,false;:73,130:I,10;;Current Zone/Current Map/Module; label;;Change Label;60;;0,0,0;t;0;c;0;b;c;$pieceName$ ($label$);Dialog;0;0;TextLabel;\ piece;;;;/ Test2 $Test2$\ null;0;0;1</VASSAL.build.widget.PieceSlot>

You can see the range of [0,100] in Test1, but [0,120] in Test2.

The ‘false,0,100,false;’ bit comes from encodeConstraints() in
SetGlobalProperty, which in turn reads the values from the minConfig and
maxConfig members…

Hmm.


J.

Thus spake Joel Uckelman:

The ‘false,0,100,false;’ bit comes from encodeConstraints() in
SetGlobalProperty, which in turn reads the values from the minConfig and
maxConfig members…

Hmm.

Apparently the problem is that the min and max values stored in
SetGlobalProperty aren’t ignored when Is Numeric is unchecked, as the
interface suggests they ought to be.

I’m going to ask Brent about this one…


J.

That is not what I intended, and I’m almost positive I didn’t save it that way. But I’m glad to hear you were able to replicate and confirm the problems existence anyway. :smiley:

It seems like such a small problem really, compared to the large amounts of others there are to look at and fix, surely those being more important and dire issues no question. But I appreciate you finding the time to look into this and address it, it means a lot to those of us who have encountered this otherwise minor issue. :slight_smile:

This issue is still present in 3.2.10, and in fact has become a major problem in my module. D: