ironmonk88 / monks-active-tiles

GNU General Public License v3.0
50 stars 31 forks source link

[BUG] "Request Roll" Action can't take Entity Handlebar Expressions when used in Loop Through Entities #835

Open HorvathAP opened 2 months ago

HorvathAP commented 2 months ago

Describe the bug When setting up a "Request Roll" action inside a "Loop through Entities" loop, the normal method for accessing the entities via Handlebar Expressions does not work for either DC or Flavor fields.

To Reproduce Steps to reproduce the behavior:

  1. Create a Tile on the canvas, then place two actors inside the bounds of the tile.
  2. Open the Tile config, go to Triggers. Set "When" to "Manually Activate"
  3. Go to "Actions" and Add a "Loop through Entities" action with "Select Entity" as "Use entities within triggering tile and "Landing Name" as "loop".
  4. Add a Landing named "loop"
  5. Add a "Request Roll" action with "Select Entity" as "Use actions current collection"
  6. Set the DC to any number and the Flavor Text to {{entity.name}}
  7. Once all three actions are added, click "Update Tile"
  8. Right-click the Tile and click the Manually Trigger Actions button
  9. When the Request Roll dialog appears, observe that the "Flavor" field is blank

Expected behavior The "Request Roll" action should used the handlebar expression to access the current token's name and display it in the "Flavor" field.

Screenshots image

image

Please complete as much of the following information as possible:

Additional context

HorvathAP commented 2 months ago

Actually did some further testing and looks like the problem might specifically be with using "Current tokens" selection in the Request Roll. Thus, this issue can also be reproduced with just a Filter of actors followed by the Request Roll.

Crowguard commented 2 months ago

@HorvathAP Not a bug, just incorrect handlebars; unfortunately I cannot cover every single use case on the wiki. Correct ones here would be {{value.tokens.[0].name}}.

Edit: also, I did have some incorrect info the wiki I've since fixed; token.name is the triggering token, not the current one. Also added the above to the wiki.

HorvathAP commented 2 months ago

Ah, understood. Thanks for the reply!