MATT Handlebar Expressions - ironmonk88/monks-module-wiki GitHub Wiki

Handlebar Expressions

Handlebar expressions can be used to display or normalize data in actions.

Wherever you place the handlebars, it will instead be treated as the actual data; IE: {{user.name}} will be treated as Gamemaster if Gamemaster triggers that action.

You may need to include [0] if there is an array, such as more than one current token or more than one roll table result.

If your result includes special characters, use triple handlebars on each side: {{{value.text.[0]}}}.

  • {{actor.name}} The name of the associated actor of the current token.
  • {{darkness}} The scene's darkness level.
  • {{method}} How the tile was triggered.
  • {{scene.name}} The name of the scene the triggered tile is on.
  • {{time}} The world clock's time in minutes after midnight.
  • {{token.name}} The name of the current token.
  • {{user.name}} The name of the current user.
  • {{value.entityType.length}} The number of entities of that type returned by a Check Entity Count.
  • {{value.items.[0].name}} If used following an Add Item action, it will use the item name.
  • {{value.round}} The combat round value when triggered by the Combat Round trigger.
  • {{{value.text.[0]}}} If used following a Roll Table action, it will use the result if it was a text entry; see the Random NPC Dialog sample tile.
  • {{value.tokens.0.id}} ID of the first token in the current token collection.
  • {{value.turn}} The combat turn value when triggered by the Combat Turn Start trigger.
  • {{variable.valuename}} References a stored variable.

Handlebars can also reference an entity's attributes; {{token.skills.prc.passive}}, or {{tile.texture.src}}. Depending on the use case, entity may need to be used in place of either token or tile.

Using Handlebar Expressions

These are just examples; all actions with value or text fields accept handlebar expressions now.

  • Alter can alter an attribute by referencing a variable value; or alter a string to match a different expression.
  • Chat Message can display any of these in the chat message.
  • Jump to Landing can jump to a landing whose name matches the result of the expression.
  • Send Notification can display any of these in the notification.

Page Last Updated

  • Foundry 11.315
  • MATT 11.26