token.gm name: Difference between revisions
Jump to navigation
Jump to search
Verisimilar (talk | contribs) m (Macros:Special Variables:token.gm name moved to token.gm name: Moved to main namespace.) |
No edit summary |
||
(8 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
The variable ''token.gm_name'' allows programmatic querying and setting of the token's [[ | The variable ''token.gm_name'' allows programmatic querying and setting of the token's [[Introduction to Tokens|GM Name]] (the second text field in the screenshot of the Edit Token dialog). | ||
''token.gm_name'' is only a valid expression in a trusted macro. | |||
[[Image:Edittoken-name-and-label.jpg]] | [[Image:Edittoken-name-and-label.jpg]] | ||
Line 6: | Line 8: | ||
===Getting the Token GM Name=== | ===Getting the Token GM Name=== | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[h:secretName=token.gm_name] | [h:secretName=token.gm_name] | ||
GM's Name: [secretName] | GM's Name: [secretName] | ||
</ | </syntaxhighlight> | ||
Outputs the value of ''token.gm_name''. | Outputs the value of ''token.gm_name''. | ||
===Setting the Token GM Name=== | ===Setting the Token GM Name=== | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[h:token.gm_name = "Soldier"] | [h:token.gm_name = "Soldier"] | ||
</ | </syntaxhighlight> | ||
Sets the value of ''token.gm_name'' to "Soldier." | Sets the value of ''token.gm_name'' to "Soldier." | ||
Line 22: | Line 24: | ||
==Related Pages== | ==Related Pages== | ||
* [[ | * [[token.name]] | ||
* [[ | * [[token.label]] | ||
[[Category:Special Variable]] | |||
{{DISPLAYTITLE:token.gm_name}} | |||
[[Category:Macro Function]] |
Latest revision as of 23:59, 4 July 2023
The variable token.gm_name allows programmatic querying and setting of the token's GM Name (the second text field in the screenshot of the Edit Token dialog).
token.gm_name is only a valid expression in a trusted macro.
Examples
Getting the Token GM Name
[h:secretName=token.gm_name]
GM's Name: [secretName]
Outputs the value of token.gm_name.
Setting the Token GM Name
[h:token.gm_name = "Soldier"]
Sets the value of token.gm_name to "Soldier."