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

Help with conditions macro

December 13 (2 years ago)

I have used the TokenMod API (and copied from someone's macro) to make a macro that automatically imposes a condition marker on a selected token and fitted it to my custom markers. I also want the macro to post in the chat a description of what that condition does, but I'm not sure how to do it. I've tried reading about how to format macros but I don't understand how to combine different elements. If anybody could help it'd be much appreciated.

This is how the macro currently looks:

!token-mod ?{Status|
Blinded, --set statusmarkers#!blinded|
Charmed, --set statusmarkers#!charmed-illusion|
Deafened, --set statusmarkers#!deafened|
Frightened, --set statusmarkers#!frightened|
Grappled, --set statusmarkers#!grappled-restrained|
Invisibility, --set statusmarkers#!invisible-hidden|
Incapacitated, --set statusmarkers#!incapacitated|
Paralyzed, --set statusmarkers#!paralyzed|
Petrified, --set statusmarkers#!time|
Poisoned, --set statusmarkers#!poisoned|
Prone, --set rotation#270|
Restrained, --set statusmarkers#!grappled-restrained|
Stunned, --set statusmarkers#!stunned|
Unconscious, --set statusmarkers#!dead}
December 13 (2 years ago)

Also I'm not sure if it's possible but if anyone knows how to make a custom FX activate on the token when the condition is applied, that would be amazing.

December 13 (2 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter

You could take a look at my script, Condefinition. It scans incoming roll templates for conditions and saving throws and provides buttons to perform saving throws, assign conditions and post definitions to chat either to GM or players.

December 13 (2 years ago)
Andrew R.
Pro
Sheet Author

I don't use a Roll Query, preferring a row of buttons along the bottom of my screen, so here's an example of my Dead macro:

!token-mod {{ 
  --set 
    statusmarkers|!dead 
}} 
/em @{selected|token_name} is defeated! 

I found that following this video by Nick Olivo to be really helpful for exactly this. It was really easy to set up with his instructions and it does exactly what you're looking to do.

Jack said:

I have used the TokenMod API (and copied from someone's macro) to make a macro that automatically imposes a condition marker on a selected token and fitted it to my custom markers. I also want the macro to post in the chat a description of what that condition does, but I'm not sure how to do it. I've tried reading about how to format macros but I don't understand how to combine different elements. If anybody could help it'd be much appreciated.

This is how the macro currently looks:

!token-mod ?{Status|
Blinded, --set statusmarkers#!blinded|
Charmed, --set statusmarkers#!charmed-illusion|
Deafened, --set statusmarkers#!deafened|
Frightened, --set statusmarkers#!frightened|
Grappled, --set statusmarkers#!grappled-restrained|
Invisibility, --set statusmarkers#!invisible-hidden|
Incapacitated, --set statusmarkers#!incapacitated|
Paralyzed, --set statusmarkers#!paralyzed|
Petrified, --set statusmarkers#!time|
Poisoned, --set statusmarkers#!poisoned|
Prone, --set rotation#270|
Restrained, --set statusmarkers#!grappled-restrained|
Stunned, --set statusmarkers#!stunned|
Unconscious, --set statusmarkers#!dead}