Page 1 of 1

Possible Dynamic Property Bug

PostPosted: February 8th, 2020, 3:52 am
by DrNostromo
I think I may have found a bug unless someone knows something I don't.

I have a card with Dynamic Properties: Power and SL (short for Smash Locks %). Both have a text display on the card.

I have up and down arrows to increase and decrease the Power value. Clicking one of these arrows sets off a Trigger Action that increases or decreases the Power and sends a command to the SL Dynamic Property to update it's value based on the change in Power.
In this case, it uses a formula of {Power*5} so that for every point of power, SL goes up another 5%.

That's all working as it should. The problem is the SL Dynamic Property has a maximum established at 90. However, if Power exceeds 18 points, SL continues to go up past 90. Isn't the maximum supposed to be a maximum amount allowed?

As a side note: Power also has a maximum and it will not let me exceed that maximum by clicking the buttons. But, it appears I can surpass the max if it's a calculated value triggered by a trigger action.

I'm using Vassal 3.2.17, btw.

Re: Possible Dynamic Property Bug

PostPosted: February 10th, 2020, 5:20 pm
by DrNostromo
Additional note: I've discovered the same thing happens on a minimum amount. Even if I have a "0" minimum, a calculated amount less than zero will still display a negative number.

Re: Possible Dynamic Property Bug

PostPosted: February 10th, 2020, 11:32 pm
by Brent Easton
The Maximum and minimum are only enforces when the 'increment' or 'prompt' Key commands are used. The 'Set Value Directly' option used by external key command is not checked to allow you to over-ride the min-max if needed.

This can't really be changed as there may be some modules that depend on this behaviour.

Re: Possible Dynamic Property Bug

PostPosted: February 11th, 2020, 12:40 am
by DrNostromo
Ok. I can understand that. I can just use a check routine to see if the value exceeds one or the other and, if so, change it.

Re: Possible Dynamic Property Bug

PostPosted: February 11th, 2020, 1:23 am
by Cattlesquat
Or you can do a quickie expression right in the Set Value field, e.g. { If(val>max,max,if(val<min,min,val)) }