EDIT - Not sure why my "normal" font is so huge, but the post was too long to change it :) Version Update - 0.14 ( manual install only for now) Mook Correction! Corrected --mook behavior. The script was previously removing the "represents" property of the spawned token for mooks, which is obviously incorrect. This update corrects the behavior to remove the bar links to the spawned token's character sheet. Animated Resizing or Deletion of Selected and/or Target token(s) This one was pretty fun. It arose from a discussion with Brandon B regarding a shapechanger application he was working on where he wanted to automatically delete the selected token. I was thinking it could potentially create some neat polymorphing or teleporting effects if resizing animations were added New commands: --deleteSource| < yes/true/1/no/false/0 > //DEFAULT = false. Deletes the selected token(s) upon spawn --deleteTarget| < yes/true/1/no/false/0 > //DEFAULT = false. Deletes the target token(s) upon spawn --resizeSource| < #,# <optional #frames, #delay> > //DEFAULT = n/a. Animates the selected token(s) during spawn. //#,#: the new size of the selected token(s). If any dimension is set to 0, it will delete the token after animation //#frames: DEFAULT = 20. how many frames the animation will use. //delay: DEFAULT = 50. how many milliseconds between triggering each frame? Anything less than 30 may appear instant --resizeTarget| < #,# <optional #frames, #delay> > //DEFAULT = n/a. Animates the target token(s) during spawn. //#,#: the new size of the target token(s). If any dimension is set to 0, it will delete the token after animation //#frames: DEFAULT = 20. how many frames the animation will use. //delay: DEFAULT = 50. how many milliseconds between triggering each frame? Anything less than 30 may appear instant Note that the resize iterations and frame delays are optional, as they will default to 20,50 if omitted. Also, if either of the --delete commands are used, the script will ignore any --resize commands. Some examples - Click to play animated gifs A treasure chest turns into a Mimic! !Spawn {{
--name|Mimic
--offset|0,0
--expand|20,50
--size|1,1
--resizeSource|0,0,20,50
}}
A Black Pudding is hit with slashing weapons, so splits into two smaller puddings. One is spawned while the original is resized. Also overrides bar value to half hp and also uses token-mod to change the hp of the selected token to match, per 5e rules. !Spawn {{
--name|Black Pudding
--offset|0,0
--expand|20,50
--size|1,1
--force|true
--resizeSource|1,1
--bar1| [[floor(@{selected|bar1}/2)]] / [[floor(@{selected|bar1}/2)]]
}}
!token-mod --set bar1|[[floor(@{selected|bar1}/2)]] A chaos-infused imp randomly teleports around the map. (uses a rollable table called Offsets which stores potential offset parameters from -2,-2 to 2,2) !Spawn {{
--name|imp
--offset|[[1t[Offsets]]]
--expand|20,50
--resizeSource|0,0
}} Here's the same chaos-imp random teleport, but with no animations. Note the token is not moving (sliding from a to b). It is being destroyed and respawned simultaneously. Not as much wow factor, but shows the --deleteSource in action. !Spawn {{
--name|imp
--offset|[[1t[Offsets]]]
--deleteSource|true
}} Hope you have fun with it, and let me know if you run into any issues!