Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

removing and placing tokens with api or macro commands

I am looking to make a macro to remove an enemy token when killed and replace it with a drawing of a corpse or ash, etc. based on how it was killed. Is there a way to do this without having to make a rollable table with these drawings for every enemy?
1588976247

Edited 1588976376
Dumbhuman
Pro
Marketplace Creator
Sure.  You can use TokenMod, assuming you've got the drawings you'd like to use for corpses, ash, etc. already uploaded into your user library.  You'd need to know the URLs of the images you'd like to use and then you could set up a macro along these lines which would prompt you for the image you'd like to use on a selected token: !token-mod {{ --set isdrawing#yes showname#no bar1# bar2# bar3# statusmarkers#=dead imgsrc#?{Image to use| Tiny Corpse,urlgoeshere| Small Corpse,urlgoeshere| Medium Corpse,urlgoeshere| Large Ashes,urlgoeshere| Huge Flaming Bones,urlgoeshere| Gargantuan Splatter,urlgoeshere| ...etc and close with} }} If you'd rather not have any status marker at all, change the line after bar3# to be: statusmarkers#=dead#-dead You can get the URL of any image you want to use by dragging it to the tabletop, hitting Z to see the zoomed version, and then right click to copy image URL from there.  Hope that helps. edit: Just a note that TokenMod is of course an API script that requires a game's creator to have a Pro account in order for it to be installed.
Thanks that's exactly what i needed. Our DM just got pro subscription and asked me to figure out the scripts for him