Bad behavior in activating layers in 3.2.3

Nevermind - I missed the key command field totally duh!


From: Timothy Mccarron timothy.mccarron@sbcglobal.net
To: The mailing list for VASSAL messages@vassalengine.org
Sent: Fri, April 19, 2013 8:43:15 AM
Subject: Re: [messages] [Technical Support & Bugs] Bad behavior in activating
layers in 3.2.3

Ok, I follow what you are saying but one thing does not fit (or maybe wont fit
later on)

You say to use reset to a negative to deactivate the layer / or keep it from
activating, but I seem to recall that when we went through and got layer
redesigned to work with properties you also allowed for layers to understand
negative numbers.

Although in this instance we are not following a property with -ve values, what
is going to happen to layer that follows a property with -ve values.

Hmm, trying to answer this it seems I found something else looking at the 3.2.4
layer interface. So I can follow an expression but I can also leave the layer
inactive - how would I activate it? - nowhere to enter a command to do that.
Also you cannot reset a layer that is following an expression which makes sense
then, just that the Always active? state does not

I am not sure what should be done here, compared with the past


From: Brent Easton b.easton@exemail.com.au
To: messages@vassalengine.org
Sent: Fri, April 19, 2013 5:33:33 AM
Subject: Re: [messages] [Technical Support & Bugs] Bad behavior in activating
layers in 3.2.3

Ok, I think I have finally got to the bottom of this.

The Activation command is working correctly in 3.2.4. The culprit is the
Reset command that is being issued to the counters as part of a Trigger
that activates the counters in CC:E. This is why Combat Commander
appears to be the only module affected.

It turns out that the Reset command has always been ‘broken’, up until
3.2.4 when it was ‘fixed’ as part of my changes to fix bug 3700. Try
this in 3.1:- Add a Reset to Level 1 to a counter with Layer. Do the
Reset command and the counter Activates on to layer 1. Now do an
Activate command to deactivate the layer and the Activate command has no
effect. Do it again and the layer de-activates. Sound familiar? This is
basically bug 3700 being caused by the Reset command.
Both the manual and designers guide say this of the Reset command:

Specifies a keyboard command that resets the Layer to a specified
level. This does not automatically activate the Layer.

I’m not sure where this came from, but the Reset command does, and
always has, automatically activated the layer if you sepecify a positive
level number. If you specify a negative level number, then the layer is
deactivated and set to the level number (i.e. Reset to -2 says move to
level 2 and force deactivate the layer). It is quite clear from the code
that this is how it supposed to work. So when CC:E trys to activate a
counter, it is telling it to Reset to level 1 and Activate, immediately
before issuing the Activate command which toggles the activation back
off again. In 3.1, the bug in reset caused the first activation after a
reset to be ignored, which meant that it appeared to work and masked the
bug in the module.

The solution for CC:E is to change the Reset command in the Aon Layer in
the Activate Routine prototype from Reset to layer 1 to Reset to layer
-1.

With the introduction of Named Key Strokes in 3.2, the Layer trait was
extensively re-written and if I had done it properly, CC:E would have
broken with the first 3.2 release and we would have seen this much
sooner.
I have also just about finished reworking the Refresh Counters option to
work correctly on modules containing older saved games as setups. The
problem occurs where these games where originally built before Game
Piece id’s existed and have never been allocated one, so no link exists
back to the palette slot they came from. I am adding an option to search
for a palette slot based on the counter name. This should make it
possible to then refresh these older save games (and all games started
using them) with the Refresh Counters command.

I hope that all makes sense.

Brent.


Read this topic online here:
https://forum.vassalengine.org/t/bad-behavior-in-activating-layers-in-3-2-3/5870/19

Using negative numbers when following a property only has meaning where you also use the 'Level 1 = ’ option to specify a that level 1 is greater than 1. Negative numbers in the following property will then be adjusted relative to that value. So if Level 1 = 5 and the property value is -2, then level 3 will be displayed.

If the follow property value causes the actual level to be displayed to be less than 1, then level 1 will be displayed.

I just tried a quick “fire” order and still didn’t get the green box around the firing unit when activated. There was a green line around the photo on the order card when played, but not around the unit when I activated it?

You will need a new version of the CC:E module for this to work.

I reinstalled the only available module (January 2012) to no avail. Is there going to be a corrected module for this problem, or some kind of patch?

The easy fix for now is to use Vassal 3.2.2 or lower.
The corrected module will come out with the next extension “Fall of the
West” which is in progress awaiting product release

-----Original Message-----
From: messages [mailto:messages-bounces@vassalengine.org] On Behalf Of
sithstalker
Sent: Saturday, April 20, 2013 9:46 AM
To: messages@vassalengine.org
Subject: Re: [messages] [Technical Support & Bugs] Bad behavior in
activating layers in 3.2.3

I reinstalled the only available module (January 2012) to no avail. Is there
going to be a corrected module for this problem, or some kind of patch?


Read this topic online here:
https://forum.vassalengine.org/t/bad-behavior-in-activating-layers-in-3-2-3/5870/25

Tim…thanks. I reinstalled 3.2.2 and CC:E works fine again. I appreciate your help.

Thus spake Brent Easton:

Ok, I think I have finally got to the bottom of this.

The Activation command is working correctly in 3.2.4. The culprit is the
Reset command that is being issued to the counters as part of a Trigger
that activates the counters in CC:E. This is why Combat Commander
appears to be the only module affected.

Is the upshot that there’s nothing further to do with Bug 9700, then?
I.e., we’re no longer waiting for a fix for it before releasing 3.2.5?


J.

On 24/04/2013 12:27 AM, Joel Uckelman wrote:

Thus spake Brent Easton:

Ok, I think I have finally got to the bottom of this.

The Activation command is working correctly in 3.2.4. The culprit is the
Reset command that is being issued to the counters as part of a Trigger
that activates the counters in CC:E. This is why Combat Commander
appears to be the only module affected.
Is the upshot that there’s nothing further to do with Bug 9700, then?
I.e., we’re no longer waiting for a fix for it before releasing 3.2.5?

Yes, that is correct. Just the p2p stuff.


Brent Easton
Analyst/Programmer
University of Western Sydney
Email: b.easton@exemail.com.au