Skip to content

Variable tags

Solanya edited this page Mar 9, 2020 · 5 revisions

This page is updated for Extended version 1.3.5 or later.

Usage

Text tags are placed into ${this}.

Examples: ${wow:player} or ${my_var} or ${item_id}.

Tags

The add-on will always try to resolve a tag in this order:

1. Direct replacement tags

  • ${wow:player} = Player's name, as returned by UnitName("player")
  • ${wow:target} = Target's name, as returned by UnitName("target") or "No target" if no target.
  • ${wow:player:id} = Player's id in the form of player_name-realm.
  • ${wow:target:id} = Target's id in the form of player_name-realm or "No target" if no target.
  • ${wow:player:race} = Player's race.
  • ${wow:target:race} = Target's race or "No target" if no target.
  • ${wow:player:class} = Player's class.
  • ${wow:target:class} = Target's class or "No target" if no target.
  • ${trp:player:full} = Player's TRP3 first name + last name
  • ${trp:player:first} = Player's TRP3 first name
  • ${trp:player:last} = Player's TRP3 last name
  • ${trp:target:full} = Target's TRP3 first name + last name or UnitName("target") if does not have TRP3 profile or the NPC custom name if the target is a custom NPC from the active campaign or "No target" if no target.
  • ${trp:target:first} = Player's TRP3 first name or "No target" if no target.
  • ${trp:target:last} = Player's TRP3 last name or "No target" if no target.
  • ${trp:player:race} = Player's TRP3 race.
  • ${trp:target:race} = Target's TRP3 race or "No target" if no target.
  • ${trp:player:class} = Player's TRP3 class.
  • ${trp:target:class} = Target's TRP3 class or "No target" if no target.

2. Gender resolution

  • ${gender:player:if_male:if_female} = if_male if the player is male, if_female if is female.
  • ${gender:target:if_male:if_female} = if_male if the target is male, if_female if is female. Unknown if the gender can't be determined.

3. Variable resolution

  • Event variable resolution: Available only in workflows (or any Document/Cutscene played from a workflow) triggered by a game event (campaign/quest game event links). Usage: ${event.var_index} where var_index is the index of the event argument. Example: ${event.2} for the second argument of the event.
  • Workflow variable resolution: Available only in workflows (or any Document/Cutscene played from a workflow). Sets by the "Variable operation" effect with source "workflow". Simply use the variable ID. Example: ${my_var_id}.
  • Object variable resolution: Very contextual as it is variable stored in items or campaign. So only accessible within the same item or the campaign/quests. Sets by the "Variable operation" effect with source "object". Simply use the variable ID. Example: ${my_var_id}.
  • Active campaign variable resolution : If the variable can't be found in either the workflow or the object, it will try to find it in the current active campaign.
  • Roll dices result: If you use the "Roll dices" effect in your workflow, you can use ${last.return} in the next block which will resolve to the result of the dice roll. This won't work in the subsequent blocks.

4. Object link

If the tag is a known object ID, it will create a link (like a game item link). Example: ${rifle} to show the embedded Simple rifle link.

5. Default value

You can add a default value that will be used in case the variable can't be resolved: ${the_tag::default_value}

6. Decimals count

Numeric variables have a default maximum of 2 decimal numbers. You can set a maximum number of X decimals by using the # character : ${the_tag#X}

7. The tag

if none of the solutions above can resolve the tag, the tag will be shown plainly. Example: ${unresolved_tag} will show unresolved_tag.

Where can variable tags be used?

Cutscenes

  • Step text
  • Speaker name
  • Player choices text

Item

  • Tooltip left text
  • Tooltip right text
  • Tooltip description
  • Tooltip "use" text

Document

  • Page text

Campaign

  • Quest objectives text
  • Campaign description text
  • Quest description text
  • Quest step log entry
  • Quest step log history

Workflow elements

  • Delay
    • Cast text

Workflow effects

  • Common
    • Display text
  • Speech and Emote
    • Narration
    • NPC
    • Player
  • Inventory
    • Add item
      • Amount
    • Destroy item
      • Amount
    • Damage/Repair container
      • Durability points
    • Start cooldown
      • Cooldown duration
  • Expert
    • Object variable operation
      • Variable name
      • Operation value
    • Send signal
      • Signal value