Create account / Log in

Possible Dynamic Property Bug

Issues with the Vassal engine.

Moderators: uckelman, Tim M

Possible Dynamic Property Bug

Postby DrNostromo » February 8th, 2020, 3:52 am

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.
User avatar
DrNostromo
 
Posts: 1064
Joined: December 21st, 2007, 3:54 am
Location: Wine Country, Cal. USA

Re: Possible Dynamic Property Bug

Postby DrNostromo » February 10th, 2020, 5:20 pm

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.
User avatar
DrNostromo
 
Posts: 1064
Joined: December 21st, 2007, 3:54 am
Location: Wine Country, Cal. USA

Re: Possible Dynamic Property Bug

Postby Brent Easton » February 10th, 2020, 11:32 pm

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.
User avatar
Brent Easton
 
Posts: 3169
Joined: December 21st, 2007, 3:06 am
Location: Berry, NSW, Australia

Re: Possible Dynamic Property Bug

Postby DrNostromo » February 11th, 2020, 12:40 am

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.
User avatar
DrNostromo
 
Posts: 1064
Joined: December 21st, 2007, 3:54 am
Location: Wine Country, Cal. USA

Re: Possible Dynamic Property Bug

Postby Cattlesquat » February 11th, 2020, 1:23 am

Or you can do a quickie expression right in the Set Value field, e.g. { If(val>max,max,if(val<min,min,val)) }
User avatar
Cattlesquat
 
Posts: 895
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA


Return to Technical Support & Bugs

Who is online

Users browsing this forum: No registered users and 8 guests