Vassal property minus one question

Vassal property minus one question

I have set it up to have the “Reset to Level” go to $HullAmount$. The picture shows the Layer commands and this works perfectly. The player can manually set the $HullAmount$ to say 18 and it will go to Level 18. (The player sets HullAmount through a Dynamic Property which then triggers the Reset to Level command).

[attachment=0]Vassal question.png[/attachment]

But how do I set it up to have the “Reset to Level” go to $HullAmount$ minus one? I want Vassal to go to Level 17 when the player enters 18 for $Hull Amount$. It seems simple to me but

I have tried everything with and without the GetProperty command and everything comes up error non-numeral result.

Thanks for any help.

Hi, I think your $HullAmount$ can’t be interactively set from the layout window.
You need to set a DynamicProperty as another trait for your piece, asking for the player to enter the value. This will give you both a Menu Command, and a Key Command.
Then a trigger will watch for that Key Command to send your sethull Key command.
If it’s on 1 piece the menu and the layer applies, the traits belong to the same piece.
If you need something more global, then a GKC with a menu/option button would work, but that time with a Global Property.

You can do this automatically with a Calculated Property, as I described to the OP when he asked on Consimworld as well: talk.consimworld.com/WebX?14@@.ee6f15c/9268

I’m surprised at the answers you got.
It the “reset to level” field, enter this: {HullAmount-1}
or better still (because it will verify what you enter), click on the calculator icon to the right and enter: HullAmount-1
You don’t need a dynamic property.

I’m surprised at the need to toss in a superfluous, patronizing jab at those who attempted to help.

Didn’t remember that the “calculator” icon there (which wasn’t always present) implies that BeanShell can be evaluated on the fly in this spot. If it works better than what was suggested, great!