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

Call Macro from Spell description?

Greetings Adventurers,  I'm looking for a way to call a Macro when casting a spell.  Like more specifically, one of My players wants to play a Wild Magi sorcerer.  now I have my Table called: WildMagic and I have a Macro called WildMagicSurge this macro contains the following: /w gm [[ [[1d20=1]]t[Wildmagic] ]] which gives me a whisper if she has a Wild Magic Surge and I can then describe to the party what happens.  I don't want it to be spoiled by it posting into the chat for everybody, hence the Macro.  Now to my question. if I don't use the Macro, and only want to roll from the Table if the D20=1 after the players casts a spell, it's enough to simply add the line [[ [[1d20=1]]t[Wildmagic] ]] into the Spell description. but as I want that part to be whispered to me, I thought I'd do said macro. But is it possible to call a Macro from a Spell description? #WildMagicSurge does not work.  Or is there another way for the player to whisper that part to me automatically when casting a spell? Thanks
1651164833
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Jerome! You can make it a clickable button in a spell description: [Wild Magic Surge?](!
#WildMagicSurge) Assuming this is a macro in the collections. The extra characters in front do some trickery: !  = fools the chat into thinking an API command is coming. This makes the button work a a button. 
  = the HTML code for a new line. This puts the rest of the command on a new line, but doesn't break the button by putting an actual return in. #WildMagicSurge  = the name of the macro you want to run, now that the chat is expecting a command. But without the API, I don't think you can trigger the actual macro without requiring this sort of user input.
Wow thanks! this is beautifull and exactly what I wanted. I don't mind the user input in form of a click. thanks to the button beeing in the description, the player will be reminded to push it every time. and if this is the best that can be done without the API then this is more than enough. :-)
keithcurtis said: Hi Jerome! You can make it a clickable button in a spell description: [Wild Magic Surge?](!
#WildMagicSurge) Assuming this is a macro in the collections. The extra characters in front do some trickery: !  = fools the chat into thinking an API command is coming. This makes the button work a a button. 
  = the HTML code for a new line. This puts the rest of the command on a new line, but doesn't break the button by putting an actual return in. #WildMagicSurge  = the name of the macro you want to run, now that the chat is expecting a command. But without the API, I don't think you can trigger the actual macro without requiring this sort of user input. Wow Keith, that is awesome. I have been trying to figure out a simple way for my players in 5e to use spell effects without having to dig through the journal and drag them out. I've just used your macro to add a button for a bunch of my spawn API macros and it works great! Thanks Keith!
1651199413
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
:) It's also great to add a Sneak Attack or Divine Smite "rider" to attack descriptions.