Updated Token Action (markdown)
@@ -92,11 +92,11 @@ With the 'Stats' dropdown menu, you can select what to display on the button.
|
|||||||
The stats that are available will depend on the game system, and will usually include the most important stats of that system. Other stats that are not available can be added using the 'Custom' option.
|
The stats that are available will depend on the game system, and will usually include the most important stats of that system. Other stats that are not available can be added using the 'Custom' option.
|
||||||
|
|
||||||
<h4>Custom Stats</h4>
|
<h4>Custom Stats</h4>
|
||||||
By selecting 'Custom', you can enter a formula to get any stat from a token by filling in the path the the desired stat (from the token object).<br>
|
By selecting 'Custom', you can enter a formula to get any stat from a token by filling in the path the the desired stat (from the token or actor object).<br>
|
||||||
For example, to get the strength modifier in dnd5e, you'd use the path:
|
For example, to get the strength modifier in dnd5e, you'd use the path:
|
||||||
|
|
||||||
`actor.system.abilities.str.mod`
|
`actor.system.abilities.str.mod`
|
||||||
<br> Any stat you want to display nee4ds to be prefixed by '@', and surrounded by square brackets '[' and ']'.<br>
|
<br> Any stat you want to display needs to be prefixed by '@', and surrounded by square brackets '[' and ']'.<br>
|
||||||
<br>
|
<br>
|
||||||
So for the strength modifier, you'd fill in:
|
So for the strength modifier, you'd fill in:
|
||||||
`[@actor.system.abilities.str.mod]`.<br>
|
`[@actor.system.abilities.str.mod]`.<br>
|
||||||
@@ -104,6 +104,18 @@ You can add text around it:
|
|||||||
`STR: [@actor.system.abilities.str.mod]`<br>
|
`STR: [@actor.system.abilities.str.mod]`<br>
|
||||||
And use multiple stats:
|
And use multiple stats:
|
||||||
`STR: [@actor.system.abilities.str.mod] DEX: [@actor.system.abilities.dex.mod]`<br>
|
`STR: [@actor.system.abilities.str.mod] DEX: [@actor.system.abilities.dex.mod]`<br>
|
||||||
|
Besides actor data you can also get token data, for example the token name:
|
||||||
|
`[@token.name]`<br>
|
||||||
|
Or the token's sight:
|
||||||
|
`[@token.document.sight.range] Ft.`
|
||||||
|
|
||||||
|
<br>
|
||||||
|
You can also perform a simple 'if' comparison. For example, if you want the Stream Deck to display 'Token is strong' when a token has a strength modifier of 3 or higher and 'Token is weak' for lower than 3, you could use the following formula:<br>
|
||||||
|
`Token is [if(@actor.system.abilities.str.mod >= 3) then(strong) else(weak)]`<br>
|
||||||
|
Or to display the highest value of either the wisdom or intelligence:<br>
|
||||||
|
`[if(@actor.system.abilities.wis.mod > @actor.system.abilities.int.mod) then(@actor.system.abilities.wis.mod) else(@actor.system.abilities.int.mod)]`<br>
|
||||||
|
You can use the following comparison operators: `==`, `<`, `>`, `<=`, `>=`<br>
|
||||||
|
'if then' statements and nested if statements are not supported.
|
||||||
|
|
||||||
<h3>On Click</h3>
|
<h3>On Click</h3>
|
||||||
Using 'On Click', you can perform something by pressing the button.<br>
|
Using 'On Click', you can perform something by pressing the button.<br>
|
||||||
|
|||||||
Reference in New Issue
Block a user