I’m working on a trigger action that will automatically ship a piece off to the graveyard when it fails it’s dodge roll. The Snit’s have a dynamic property, speed, that get’s initialized at the start of the game, and the dodge is a 2d6 roll called SnitDodge.
So if I set the trigger action like this: ‘SnitDodge_result > speed’, it always fails no matter what the speed or the die roll… huh?
If I set it like this: ‘speed <SnitDodge_result> 13’, then when the die roll is greater than 13 it succeeds otherwise it fails - as I would expect!
If I set it like this: ‘speed > 10’, then again it fails whether the Snit’s speed is > 10 - as I would expect!!!
So when the properties are by themselves they work, but when they are together in the same action they fail.
Can someone suggest a way around this? Thanks! jas…
I think what you need to do is…
SnitDodge_result > $speed$
Otherwise, it’s always going to compare the value to a string with a value of “speed”.
I’m a bit confused about when I need to use $speed$ and when I can just use plain old ‘speed’… Clearly in message formats I need $speed$, but in the Trigger Actions, I thought ‘speed’ was sufficient.
Anyhow I tested all the combos:
$SnitDodge_result$ > 13 … works
SnitDodge_result > 13 … works
$speed$ > 10 … works
speed > 10 … works
$SnitDodge_result$ > $speed$ … fails
$SnitDodge_result$ > speed … fails
SnitDodge_result > $speed$ … fails
SnitDodge_result > speed … fails
So it seems… that it is only confused when both the properties appear in one expression…
They have another property, ‘lifeForce’… If I try this:
speed < lifeForce … fails
but if I try this:
speed < 10 && lifeForce < 3 … works!!!
So it seems that there is some problem I am having when both sides of a binary conditional operator are a dynamic property - it seems that one side needs to be a constant. This seems silly to me. Either this is a bug or I have a serious lack of understanding…
ok so I found this thread:
which explains why I can’t do math in the trigger action…
speed < (lifeForce + 5) … fails
And this big topic which explains the bug that is keeping the comparison of two DP’s to work in vassal 3.0:
vassalengine.org/forums/view … =2121#2121
It seems that it should work in 3.1… I will give it a try.
OK… So I upgraded to 3.1.4 and this fixed the problem.
speed < $SnitDodge_result$ … works!!!
I still don’t understand why I have to use the ‘$’ on the die roll, and why they don’t work if I use them on the counter property, speed:
$speed$ < SnitDodge_result … fails
$speed$ < $SnitDodge_result$ … fails
speed < SnitDodge_result … fails
Illumination would be most helpful! jas…
Geez… I seem to be answering all my own posts here - sorry.
The explanation for how property expressions work by Brent is located here:
This is a must read for module devs… Cheers, jas…