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

How to put clickable macro inside macro?

1604030233

Edited 1604030303
So you know how in dnd5e you may roll for attack and then click on the ui of that roll to roll for damage if you hit? How do you do that for custom macros? For example: <a href="https://ibb.co/fNrpBxk" rel="nofollow">https://ibb.co/fNrpBxk</a> You can click firebolt to roll for damage. How can I add that Fire Bolt button to something like this? ``` &amp;{template:dmg} {{rname=rname}} {{range=range}} {{damage=1}} {{dmg1flag=1}} {{dmg1=dmg1}} {{dmg1type=dmg1type}} {{dmg2flag=1}} {{dmg2=dmg2}} {{dmg2type=dmg2type}} {{crit=1}} {{crit1=crit1}} {{crit2=crit2}} {{save=1}} {{saveattr=saveattr}} {{savedesc=savedesc}} {{savedc=savedc}} {{desc=desc}} {{hldmg=hldmg}} {{spelllevel=spelllevel}} ammo=ammo {{charname=charname}} ```
1604030870

Edited 1604030942
Oosh
Sheet Author
API Scripter
The roll templates use API command buttons in certain fields to make those links. The simplest syntax relies on have the linked macro stored as an Ability on your character sheet. A simple attack, in this case for Alice. Alice loves clubbing: @{Alice|wtype}&amp;{template:atk} {{mod=+7}} {{rname=[Club](~alice|customClubDmg)}} {{rnamec=[Club](~alice|customClubCrit)}} {{r1=[[@{Alice|d20}cs&gt;2 + 4[WIS] + 3[PROF]]]}} @{Alice|rtype}cs&gt;2 + 4[WIS] + 3[PROF]]]}} {{range=}} {{desc=}} {{spelllevel=}} {{innate=}} {{globalattack=@{Alice|global_attack_mod}}} ammo= @{Alice|charname_output} The command button is this bit: [Club](~alice|customClubDmg) which points to a macro called customClubDmg on a character sheet called Alice (character sheet Attributes/Abilities are not case sensitive). The [squackets] contain the button label, the (parentheses ) contain the link, starting with ~ to point to a character sheet. The two fields {{rname=}} and {{rnamec=}} are built-in crit detection from the R20 5e sheet. If the attack is a crit, {{rnamec}} is displayed, otherwise {{rname}} is displayed. If you specifically want to use Firebolt directly from the sheet, you can get the macro Ability link by clicking the ability in Attacks &amp; Spellcasting, then pushing the Up Arrow on the keyboard in chat - this should pull the macro code which you can Ctrl-A, select, then Ctrl-C copy to paste it somewhere easier to edit. edit - 18 seconds too late, Keith! :)
1604030888
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
The thing you are looking for is an API command button (which doesn't actually use the API, but is called that for other reasons). This link should give you the basics: Chat Menu
Thanks!
Any idea why my api macro is pink/red/purple? <a href="https://ibb.co/T8cNW5g" rel="nofollow">https://ibb.co/T8cNW5g</a>
1604036803
GiGs
Pro
Sheet Author
API Scripter
Thats likely the default styling for roll20 buttons. To be able to change that, you need to be making a custom sheet, and modify the code in the CSS, or use a rolltemplate from a character sheet that already has styling applied to the buttons (like the styling on 5e buttons).