We use Cookies to help personalize and improve Roll20. For more information on our use of non-essential Cookies, visit our Privacy Policy here.
Accept
Advertisement Create a free account

[5e OGL] How to use macros or /fx inside a spell description?

1459495820

Edited 1459495882
I would like to add a special effect in my spell description. Specifically: /fx beam-acid @{selected|token_id} @{target|A|token_id} I've tried all sorts of permutations with command calls or macros and never get a good result. Is this even possible? ETA: This is for the 5e OGL sheet, but I believe the question will be relevant to any sheet that uses roll templates.
1459508669
Coal Powered Puppet
Pro
Sheet Author
In my Iron Kingdoms sheet, I added a set of drop down menus and stuck them inside a button.  The short version is: /fx beam-acid @{selected|token_id} @{target|token_id} \\n &{template:foo} The key is the "\\n", and putting the fx command in front.
1459512888

Edited 1459513286
Kryx
Pro
Sheet Author
API Scripter
Holy crap, that's awesome!!! For shaped users they can put a line break in freeform and then put the code. /fx beam-acid @{selected|token_id} @{target|token_id} Works great for Acid Arrow! Definitely looking into making this a more supported thing for spells!
1459517270

Edited 1459517738
To the OP, I have found a way to get it to work inside the character sheet using the API buttons. This will only work when clicking on the spell from the Attacks and Spellcasting section on the front page and it requires a macro be made in the Settings tab. Do that first, make a macro called FX /fx ?{Type|Beam,beam|Bomb,bomb|Breath,breath|Bubbling,bubbling|Burn,burn|Burst,burst|Explosion,explode|Glow,glow|Missile,missile|Nova,nova|Spatter,splatter}-?{Color|Acid,acid|Blood,blood|Charm,charm|Death,death|Fire,fire|Frost,frost|Holy,holy|Magic,magic|Slime,slime|Smoke,smoke|Water,water} @{target|Source|token_id} @{target|Destination|token_id} That will cover all possible spells effects for starters. Then in your spell on the front page edit it and add a button in the Description section. Using the API button format like this. [FX](!
 #FX) Now when you cast the spell you can click on the button to activate the effect. and wow your friends!
That works like a charm!  Thanks!
1459668494

Edited 1459669046
I've been trying to make this work but no luck.. After i choose source and destination, and the effect, It just simply spams something like this in the chatbox: /fx beam-acid -KEPxh5YxHSsLSpcEuyx -KE9kgtox2OmVGks7C8t     ((This is correct format, and ID's are OK ) I'm not sure what I'm doing wrong  -- perhaps its this statement I'm not getting or applying: This will only work when clicking on the spell from the Attacks and Spellcasting section on the front page PS: I can only do this for a 'spellcard' output attack -- not for 'attack' EDIT:  ok, I see where you are getting the attacks and spellcasting section   [[NOT from the spellbook!]] I am still getting the same thing however, where the command seems to be fine, just no effect!
You could have a space in front of the #FX, I've had that problem. 
1459747623
Ed S. said: You could have a space in front of the #FX, I've had that problem.  !!!  thank you, thats what it was.  So in order to create specific effects, for say, cone of cold, and fireball, without having to choose from the list menu each time, I would have to create 2 separate macros under my settings tab and then create an FX button linking to those macros correct?   [[we need folders for macros!!!]] There's no way to say..  choose the "3rd" option from the first list (breath), and the 6th option from the second list (cold) to keep reusing the one simple 'overall' macro for everything?
1459748640

Edited 1459749641
Silvyre
Forum Champion
Marcin K. said: So in order to create specific effects, for say, cone of cold, and fireball, without having to choose from the list menu each time, I would have to create 2 separate macros under my settings tab and then create an FX button linking to those macros correct? You could just drop an API Command Button like [Fireball](!
/fx burst-fire @{selected|token_id} @{target|token_id}) or [Acid Arrow](!
/fx beam-acid -KEPxh5YxHSsLSpcEuyx -KE9kgtox2OmVGks7C8t) into wherever. It's important to note that reopening a saved Macro (under the My Settings tab of the Sidebar) causes the HTML entities within it (e.g. 
) to be converted (which would cause the Macro to break if resaved ). This behaviour is not present within macros saved as Abilities , so it may be more convenient to save macros containing HTML entities as Ability Macros (unless perhaps you store your macros on an external text document).
1459749938

Edited 1459751025
Silvyre said: Marcin K. said: So in order to create specific effects, for say, cone of cold, and fireball, without having to choose from the list menu each time, I would have to create 2 separate macros under my settings tab and then create an FX button linking to those macros correct? You could just drop an API Command Button like [Fireball](! /fx burst-fire @{selected|token_id} @{target|token_id}) or [Acid Arrow](! /fx beam-acid -KEPxh5YxHSsLSpcEuyx -KE9kgtox2OmVGks7C8t) into wherever Wooo!!  thank you Now that I'm feeling braver: This brings up the tiny bug in the original "mass" macro:   to get the fireball effect, the burst-fire only needs the target  (otherwise the above code fireballs the source).   [[unless you know about this and you click source and destination on the same target] I change the above to this: [Fireball](! /fx burst-fire @{target|token_id}) EDIT:  argh..     I've tried editing this code now, but resets the HTML entities
1459759812
This only works for spells with 1 target, right? I looked at <a href="https://wiki.roll20.net/Text_Chat#Special_Effects_" rel="nofollow">https://wiki.roll20.net/Text_Chat#Special_Effects_</a>... Spells like Bless with multiple targets or AoE spells that targets a point rather than a token you can't get the /fx command to work for, can you?
Gediablo said: This only works for spells with 1 target, right? I looked at <a href="https://wiki.roll20.net/Text_Chat#Special_Effects_" rel="nofollow">https://wiki.roll20.net/Text_Chat#Special_Effects_</a>... Spells like Bless with multiple targets or AoE spells that targets a point rather than a token you can't get the /fx command to work for, can you? You can but you have to stack fx commands. My Scorching Ray macro has&nbsp; /fx beam-fire @{target|source|token_id} @{target|Target 1|token_id}) /fx beam-fire @{target|source|token_id} @{target|Target 2|token_id}) /fx beam-fire @{target|source|token_id} @{target|Target 3|token_id}) So it fires three beams.&nbsp; I also put all of my spell FX macros on to a character sheet named FX, so they can all be in one place.&nbsp;
Thanks for all of these fantastic suggestions! Does anyone have a solution that will work in NPC ability entries?
1459915233
Will R. said: Thanks for all of these fantastic suggestions! Does anyone have a solution that will work in NPC ability entries? I tested it on a spell card description option (not attack) and it seemed to work
Oh! Nice! I'll have to try that out!