More control over Area of Effect trait visibility

Hi.

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

Thanks!
Javi

1 Like

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.

  1. Apply the AofE hotkey (which will toggle it off), and then
  2. Apply the send back to box command.

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.

3 Likes

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.

Hummm.
Sounds like a good idea.

I will try that.

Still, I will consider that more a workaround than something else.

Thanks!

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…

2 Likes

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”.

2 Likes

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…

Sadly, it does not work. I was under a misguided impression that it did work. How wrong was I.

A nice request to add for v3.7, should it happen. In which case, a specific “name” field might be added to the request.

2 Likes

Mark,

This would be apprecied.

Jean Phi

1 Like

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?

I believe the AoE trait needs to be below the Can Rotate trait in the trait list (I could have that backwards).

D’oh, I’m so embarrassed. The most basic of Vassal design mistakes. Or simply overlooked in this place. Thx JR.