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
In the above example, you can see which tokens are the CTC
at the various steps.
- 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
.
- All of the PCs besides Quinn are inside the tile; they are filtered down and become the
- 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.
- Amiri's HP is 0, and thus she doesn't meet the filter requirements and is left behind. The other three tokens are the
- 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.
- (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
- Filter Current tokens with condition "blinded"
- Merisiel currently can see, but Kyra is blinded, and is the only
CTC
that continues past this filter.
- Merisiel currently can see, but Kyra is blinded, and is the only
Now let's look at an incorrect version of the same setup.
Incorrect Action Targets
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
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
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
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.
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