Update v0.1.1 -- So much changed, it's practically a different script... (Thanks Rainy)
Fixed GroupInitiative integration issue (Thanks Serpent-DM )
TokenCondition makes it easy to drop condition tokens onto your player and monster tokens. Simply create a Character with a name that starts with Condition:
, such as Condition: Charmed
. Create a Token that represents that Character and assign it to the Character as the Default Token. When you want ot assign that condition to a Token, drag the condition Character's default token on top of it. From then on, it will stick to the Token and any changes made to either one will be mirrored correctly. When you're done with the condtion, just delete the Token. You can even drag multiple condtions onto a single token.
Commands
Display this help.
Controlling Mirroring
For more fine-grained control, you can add a bracketed block to the character name and specify various |
delimited tags.
Use the mirror
tag to specify properties to mirror.
The mirror
tag takes as argument a comma delimited list of properties and can include spaces around the punctuation:
Properties can be preceded by an operation: +
, -
+
-- Add the property to the list that are mirrored. (default)-
-- Remove the property to the list that are mirrored.
In addition to the mirror
tag, you can list several adjustments tags that are applied when mirroring properties. Adjustment tags are separated from their adjustment by a :
.
rotation
width
height
left
top
Adjustment values are prefixed with one of several operations:
=
-- Always set the propery to this value if it would change.+
-- Add this value to the property when it is changed.-
-- Subtract this value from the property when it is changed.*
-- Multipy by this value when the property is changed./
-- Divide by this value when the property is changed.
For example, to have the width always 3 times larger than the target token, you could use:
Additionally, you could adjust the rotation to be 90 degrees further than the target token:
Numbers can be suffixed with u
, g
, etc just like with TokenMod.
The below
tag can be specified to cause a token to be pushed below when it is created. Note: This is a one time adjustment currently.
Here is an example where the token is placed below and remains slightly larger than the target token:
[EXPERIMENTAL] The forward
tag works just like the mirror
tag, save that any changes to the listed properties are reverted after they are mirrored forward. This is an incomplete feature which will probably get changed later, but is provided for experimentation.
Name Prefixes
In addition to the Condition
name prefix, there are several more. Prefixing with any of the following will make the character active for TokenCondition, with varying default behavior:
Condition
-- Mirrors: left, top, width, height, lastmove, controlledby, bar1_value, bar1_max, bar1_link, bar2_value, bar2_max, bar2_link, bar3_value, bar3_max, bar3_link, represents, statusmarkers, and tint_color.Decoration
-- Is below and mirrors: left, top, width, height, lastmove, and controlledby.Mount
-- Is below and mirrors: left, top, width, height, lastmove, controlledby, and rotation.
A speaking condtion that floats to the top right of a token and does not change size:
A spirit guardians decoration that is sized correctly and follows the token:
A horse mount that is 3 times longer than it is tall, and scaled for the token that rides it. Additionally, it's rotation is corrected to account for the direction the horse image faces:
TokenCondition makes it easy to drop condition tokens onto your player and monster tokens. Simply create a Character with a name that starts with Condition:
, such as Condition: Charmed
. Create a Token that represents that Character and assign it to the Character as the Default Token. When you want ot assign that condition to a Token, drag the condition Character's default token on top of it. From then on, it will stick to the Token and any changes made to either one will be mirrored correctly. When you're done with the condtion, just delete the Token. You can even drag multiple condtions onto a single token.
Commands
Display this help.
Token Conditions will automatically get scaled to the size of the token they are dropped on. Any manipulations (bar changes, status markers, move, resize, auras, etc) applied will be duplicated to the target token and any conditions.
Additionally, it does what you would expect with TokenMod and GroupInitiative.
Github: https://github.com/shdwjk/Roll20API/blob/master/TokenCondition/TokenCondition.js