As a module developer I will like to be able to have a way to deactivate an Area of Effect trait by automation.
Currently this is not possible because all you have is Toggle Visible command, that depends on the current Area of Effect.
I propose two possibilities:
Have an Activate/Deactivate command
Have the Area of Effect to follow a Property value
This is my current use case in a TCS module:
I have an Artillery Barrage marker that is put in the table and has different Areas of Effect traits to visually show the different types of barrage and to show the different types of artillery barrage (Fire mission, Fast fire, Continuous fire)
In that artillery marker I added a command to send it back to the barrage markers box after resolution. Itâs annoying to have to do it manually. But later on, when you gran the barrage counter in the following turn, it still has the Area of Effect active, forcing the user to manually remove it.
Having a way to reset de trait visibility will allow me to include that in the move to barrage box action and will be more cleaner
You use a hot key or something similar to turn AofE on, right. You also appear to be using a command to send that barrage marker back to a box after use.
Setup an action and/or a trigger that uses the âsend back to boxâ command to do two things.
Apply the AofE hotkey (which will toggle it off), and then
Good ideas. There is no way to tell if the AoE is activated or not and the only command being Toggle means you canât force it into a known state.
The Area of Effect trait already does have the option to follow a property value - Unclick the âFixed Radiusâ checkbox and type in the name of the property you want the range to follow.
This allows for a potential work-around. Have the AoE defined as Always Visible, follow a property and set the property to 0 when you arenât using it. On a hex-grid, range 0 highlights the current hex only. On a non-hex grid, AoE does not display anything. Might work for you.
As you can only toggle the visibility status, you will activate it if was not active already.
Thatâs why I will like to have a reset or deactivate action available.
I deal with this issue all the time IRL with automation programming and remote management. If your only command is a toggle and you donât know the current state, the only way to discretely control the device is to use a counter to track every toggle starting from the last known state. We usually power cycle devices to get to that last known state. The Vassal equivalent is the first module launch. We know the AoE shading is off at that point. If you assign a DP to that Piece with an initial value of 0, increment it by one with each Toggle and it wraps between 0 and 1, youâll always know the state. Then create two seperate Triggers for the Toggle command based on a property match for DP==0 and DP==1. I know itâs a little extra work but thatâs exactly how it would be programmed if embedded with VassalâŚ
Vassal has a few ways to solve your problem. A few solutions have been proposed by those who have met the challenge. Choose your solution. What you ask for is solvable in Vassal using existing capabilities. I am happy with my way. Others are happy with their way.
Personally, using a DP, or even a a CP, is the way forward.
With World in Flames I can have an AofE that depends on the particular map a unit is on (cost 6/42/1 per hex, mult by 2 for an acft rebase, mult by 3 for a super rebase, divide by 2 for an intercept, mult by 2 for extended range). Then there is CAP (Combat Air Patrol), with house rules. A simple ârangeâ variable in the AofE has an associated rather large beanshell expression associated with it to get a final number. Nested âifsâ to the grand wahzoo here.
One final thing. You can use the AofE Description to ascertain the state of the AofE on a game piece. For ex, for my AofE to show aircraft ranges on the map I used the name ranges for my AofE description field. During the end of turn phase I use a conditional GKC to turn off any active AofE. How, just use the name you used in description like this - ranges_Active==âtrueâ.
Thatâs brilliant! That means AoEs are essentially a type of Layer trait. It also means that no DP is needed to track whether it is active. All you need is a Trigger or GKC to turn on, then one more for offâŚ
I just noticed that the AoE trait and the Can Rotate trait donât seem to work together. Basically if the piece is not in its default orientation then AoE will not work. Anyone aware of a work around for this?