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

Fx macro

I'm trying to learn how to do macros, but the wiki seems to be written more for people that have at least a bit of coding background, and I learn more by seeing, doing and dissecting. in that vein, what I want to do is come up with a macro that will allow me to press a button, have the spell populate in the chat like normal, then select the caster, and then the target, and have a beam-fire start at the caster, then fx burn-fire and fx nova fire at the target. If I can see that I should be able to get the information I need to do others.
Hi Wesley, I'm assuming you are using the D&D 5E by Roll20 character sheet.  Open up the spellcaster's character sheet.  Click on the spell under the ATTACKS & SPELLCASTING section.  Then click on the chat box and hit the up arrow key - this will show the text used to display the attack in chat.  Highlight the text and hit Ctrl-C to copy to the clipboard.  Next go to the ATTRIBUTES & ABILITIES tab and click the +Add button.  Check the box that says Show as Token Action then click on the pencil icon to edit.  Name it whatever you like (example: Fire-Bolt) and paste the text from the clipboard into the big box (Ctrl-V).  Then add the following lines after the text: /fx beam-fire @{Selected|token_id} @{target|Spell Target|token_id} /fx burst-fire @{target|Spell Target|token_id} Now when you click on the caster's token you'll see a button displayed in the upper left part of the screen - click to activate the fx.  You will be prompted to click on the target token. The effects will all go off at the same time so I am using burst instead of burn and nova for a better appearance.  If you want to have the /fx go off sequentially you'll need use some kind of script to add a delay between the /fx commands.
1718466053

Edited 1718466083
Gauss
Forum Champion
An alternative to using the template method that Ryan85202 listed, if you drag the attack or spell name to the bottom of the character sheet that will show you the unique code for that button.  Press the button, then click on the chat box, hit the up arrow, and copy it.  You may then remove the button (grab the handle on the right side of the button and pull it up and off the macro bar).  Instead of using the template in Ryan85202's example you can use the code to activate the attack or spell.  Reason this is better, the code uses the active version of the attack or spell, including any changes you have made to it. The template method is a "snapshot" of the attack or spell, and does not include any changes (without a lot of work to fix it to include changes).  After that proceed in the same was as Ryan85202's example above. 
That worked perfect. Thank you. Gauss said: An alternative to using the template method that Ryan85202 listed, if you drag the attack or spell name to the bottom of the character sheet that will show you the unique code for that button.  Press the button, then click on the chat box, hit the up arrow, and copy it.  You may then remove the button (grab the handle on the right side of the button and pull it up and off the macro bar).  Instead of using the template in Ryan85202's example you can use the code to activate the attack or spell.  Reason this is better, the code uses the active version of the attack or spell, including any changes you have made to it. The template method is a "snapshot" of the attack or spell, and does not include any changes (without a lot of work to fix it to include changes).  After that proceed in the same was as Ryan85202's example above. 
The first part worked, but unfortunately the 2nd part didn't. It would just keep the message at the top saying to select the target. I appreciate the response and the help. Ryan85202 said: Hi Wesley, I'm assuming you are using the D&D 5E by Roll20 character sheet.  Open up the spellcaster's character sheet.  Click on the spell under the ATTACKS & SPELLCASTING section.  Then click on the chat box and hit the up arrow key - this will show the text used to display the attack in chat.  Highlight the text and hit Ctrl-C to copy to the clipboard.  Next go to the ATTRIBUTES & ABILITIES tab and click the +Add button.  Check the box that says Show as Token Action then click on the pencil icon to edit.  Name it whatever you like (example: Fire-Bolt) and paste the text from the clipboard into the big box (Ctrl-V).  Then add the following lines after the text: /fx beam-fire @{Selected|token_id} @{target|Spell Target|token_id} /fx burst-fire @{target|Spell Target|token_id} Now when you click on the caster's token you'll see a button displayed in the upper left part of the screen - click to activate the fx.  You will be prompted to click on the target token. The effects will all go off at the same time so I am using burst instead of burn and nova for a better appearance.  If you want to have the /fx go off sequentially you'll need use some kind of script to add a delay between the /fx commands.
I've tested this and it works for me.  Do you have each command on it's own line?  Using Gauss's method you should have 3 lines: %{TestChar|repeating_attack_-O-R7weHgLjC8ySo0usq_attack} /fx beam-fire @{selected|token_id} @{target|Spell Target|token_id} /fx burst-fire @{target|Spell Target|token_id} Your 1st line will be different since it will refer to your character name and the attack ID for the spell but the other 2 lines should be as listed.