KC to Apply to all units ending movement on this map

Hi all,
I can’t have this KC working on a card.
It looks like either the KC is not executed, or it messes with some other commands for the card.
Would you have a good example of that working fine ?

I want cards to be drawn 1 by 1 into a map, and immediately sent to discard if they don’t have a property I’m looking for.
The property is a marker I know how to check, from a trait trigger matching condition.
Any idea ?

For example, I don’t have the same behaviour if I drag the card manually on that map and if I use the sentToLocation trait. I would have thought they would both lead to execute the KC.

Howdy,

I also seem to be experiencing something similar to what has been described above. My module (written in Vassal 3.7.6) sends a card to a deck on a different map via a Return to Deck trait, but the Key Command to apply to all units ending movement on this map: did not seem to initiate the Trigger Action invoked by that Key Command. Moving the card to that deck via drag and drop did initiate the Trigger Action as expected.

I did not see any reference to any effect, or lack thereof, the Return to Deck trait may have on the behavior of the Key Command to apply to all units ending movement on this map feature of maps in the Documentation.

Can you post your work-in-progress to some form of cloud storage where it can be looked at? Include detailed instructions for where to look in the Editor and what to do to replicate the issue.

1 Like

The Apply-On-Move KeyCommand for a map should be applied to a piece moved via Return to Deck.

Looking at the code, there seem to be several pre-conditions that must be true before the apply-on-move is applied. I’m trying to tease those out.

  1. The Deck being sent to must be on a Map. Sounds reasonable
  2. The target map must have an apply-on-move-key. Ok.
  3. The piece ends up on a different Map OR in a different position from where it started. Sounds reasonable.

That should be it.

If you can provide the module and a log file showing the issue, I am happy to have a closer look.

1 Like

Thank you for your offers to help. However, as I explained in my message to you, I don’t feel at liberty to make this module available to anyone else.

I have experimented some more, and I have found that the Apply-On-Move KeyCommand for a map works fine. I added a Report Action activated by the Apply-On-Move KeyCommand for the destination map, and the report showed up in the chat when the piece was sent via the Return to Deck trait as desired.

The commands that are not happening are in a Trigger Action with a Trigger when properties match expression. I now believe the problem has to do with the setting (or not setting) of a Dynamic property in that expression.

If this continues to stump me I will try porting the routine and properties to a module I am free to share.

Thanks again.

Did you remember to give your Trigger Action the same Key Command that the map is triggering? Sometimes people forget to give their Trigger Actions a Key Command to listen for…

1 Like

That’s an excellent point, and well worth double and triple checking. I went as far as copy and paste, copying from one and pasting in the other to prevent being tripped up by typos.

The reason I’m sure it has something to do with a dynamic property in the when properties match expression is that part of the report of my report action is to report the value of that dynamic property, the value of the property was blank in the report rather than the string I had given as the initial value in the trait definition.

When I get time, probably tomorrow or Sunday, I will likely port this over to another similar module under construction to see if I can discover the problem or let y’all take a look.

Thanks.

I figured out what was happening. To recap, the problem presented itself in reports not getting into the Chat log from Report Actions which were to be performed as part of a Trigger Action initiated by a KC applied by movement to a map. The pieces got moved but the reports were not made.

I noticed that in the GKC that moved the pieces the Suppress individual reports box was checked. I unchecked the box, and the next time I tried the action, the reports came.

It was purely error on my part.