WIP Current Action Collection - ironmonk88/monks-module-wiki GitHub Wiki

Current Action Collection

Arguably the hardest thing in MATT to define.

This page is not intended to cover every situation; it's just intended to include some common examples of a few logic & filter actions.

While Current Tokens will be being used from now on in examples, this same logic applies to other filterable entity types as well.

Each type of entity has it's own Current Collection, and (most types) remain there until their collection is overwritten again, their action thread ends, the tile finishes running, or filters or a Set Active Tiles Current Collection is used to remove them.

The various collection types include

Not all of these types can be filtered; check the various filter action pages for valid targets for each filter.

In general, you use whatever targeting you need to add entities to the Current Collection with the first action in your action thread, and then use Current Collection as the target until you need to modify/overwrite the Current Collection again.

Current Token Collection will be abbreviated as CTC from now on.

Filters and Current Action Collection

https://github.com/ironmonk88/monks-module-wiki/blob/b11adb0d36be791b291357def65dda584a549d02/MATT/Current_Action_Collection_Guide/Filter_Sequence_Example_01_Correct.gif

In the above example, you can see which tokens are the CTC at the various steps.

  1. Filter Player Tokens by Distance inside tile
    • All of the PCs besides Quinn are inside the tile; they are filtered down and become the CTC.
  2. Filter Current Tokens with attributes.hp.value "> 0"
    • Amiri's HP is 0, and thus she doesn't meet the filter requirements and is left behind. The other three tokens are the CTC and continue on.
  3. Filter Current Tokens with item "> 0"
    • (Not pictured) Kyra has healing potions, and Merisiel has one she stole from Kyra. Ezren has no potions, and is rejected by the filter. Merisiel and Kyra are the CTC and continue on.
  4. Filter Current tokens with condition "blinded"
    • Merisiel currently can see, but Kyra is blinded, and is the only CTC that continues past this filter.

Now let's look at an incorrect version of the same setup.

Incorrect Action Targets

https://github.com/ironmonk88/monks-module-wiki/blob/2ab9596b70a66cfb52495d929619b3da598a576e/MATT/Current_Action_Collection_Guide/Filter_Sequence_Example_01_Incorrect_Actions.gif

Because the Move actions are incorrectly targeting the Player Tokens every time, the filters here are basically being ignored. The tokens get filtered out from the last action that added Player Tokens, but then the CTC is immediately overwritten with Player Tokens again.

This applies to using multiple filters in sequence as well, shown below.

Incorrect Filters in Sequence

https://github.com/ironmonk88/monks-module-wiki/blob/72bd96ff384f6a04a51015e5ffe51ed6056a27ac/MATT/Current_Action_Collection_Guide/Filter_Sequence_Example_01_Incorrect_Filters.gif

Because each filter is adding Player Tokens back into the CTC, the first filter here is doing nothing here; Merisiel and Quinn are both part of the CTC being defined by the second filter adding all player tokens back into the CTC and then filtering them from there.

Correct Filters in Sequence

https://github.com/ironmonk88/monks-module-wiki/blob/72bd96ff384f6a04a51015e5ffe51ed6056a27ac/MATT/Current_Action_Collection_Guide/Filter_Sequence_Example_01_Correct_Filters.gif

Each filter in the sequence should be looking at the CTC to narrow down the collection more. Here, Ezren is the only token who exists between the two elevation filters and is added to the CTC.

Triggering Token vs Current Token

When Either Works

https://github.com/ironmonk88/monks-module-wiki/blob/4c4007108566954526f23d2bc6db8928c6a8cc2d/MATT/Current_Action_Collection_Guide/Triggering_Token_vs_Current_Token_01.png

In this example, either target will work. The CTC includes the Triggering Token, so CTC works for the initial action; however, it is a good habit to just use Triggering Token if that is what you intend.

https://github.com/ironmonk88/monks-module-wiki/blob/7cec2ac261403f30ccead52f3b9b771faf41cbb9/MATT/Current_Action_Collection_Guide/Current_Token_Collection_Dont_Do_This.png

This above setup works, but please do not do this.

Set Active Tiles Current Collection

WIP

Loop Through Entities

WIP

Page Last Updated

  • MATT 11.21