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

Token Macro - Nested Macros From the Character Sheet

The goal is to have token macros output a table of macros and all are sourced from the pathfinder character sheet. I have successfully made the token macros from the abilities tab in the character sheet that calls on other macros. My basin scripting looks like this:  [Longbow](!
#Bjorn-Longbow)[Shortsword](!
#Bjorn-Shortsword) . I have only been able to put it macros into this line that are made under the collection tab in roll20. This makes it so I am the only one able to use my token macros. If anyone else plays my character they do not have access. Is there a way to pass macros from the character sheet into macros also in the character sheet so other can make use of them?  
1575925989
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Yes. A macro in a character sheet is called an Ability, and abilities can call abilities on the same sheet very easily. If Bjorn has an ability called "longbow", the ability command button to call that ability would be: [Longbow](~longbow) No character identifier needed. If they are both resident on the same sheet, it is assumed that the same sheet is being referenced. You can find more syntax instances for calling abilities and macros from other abilities or macros here .
Thank you! That will save me a lot of hassle. Secondary question, to populate an ability from a character sheet button is my best approach to push the button, go to the chatbox and push up, and then copy-paste the syntax into the ability? Is there a way to have the ability draw straight from the sheet so stats and buffs auto-apply to the ability?
1575937256
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
If you drag the button (i.e. the clickable area) of the sheet to the macro bar, it will place a button with the code that actually runs the macro. You could transcribe the label of the button, but the easiest way is just to click it. Then when you do the up-arrow trick, what appears in the chat log is the command to run the ability, rather than the output it produces: %{Character_Name|repeating_attack_-LqcOEFqvqpLUPGtuLqj_attack} rather than: @{Character_Name |wtype}&amp;{template:atkdmg} {{mod=+8}} {{rname=Stabitha, Shortsword +1}} {{r1=[[@{Character_Name |d20}cs&gt;20 + 2[DEX] + 5[PROF] + 1[MAGIC]]]}} @{Random|rtype}cs&gt;20 + 2[DEX] + 5[PROF] + 1[MAGIC]]]}} {{attack=1}} {{range=}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[1d6 + 2[DEX] + 1[MAGIC]]]}} {{dmg1type=Piercing}} 0 {{dmg2=[[0]]}} {{dmg2type=}} {{crit1=[[1d6[CRIT]]]}} {{crit2=[[0[CRIT]]]}} 0 {{desc=[Stabitha](<a href="https://i.imgur.com/ddr5Az8.jpg" rel="nofollow">https://i.imgur.com/ddr5Az8.jpg</a>) [Sneak Attack](~Character_Name |Sneak-Attack)}}&nbsp; &nbsp;{{spelllevel=}} {{innate=}} {{globalattack=@{Character_Name |global_attack_mod}}} {{globaldamage=[[0]]}} {{globaldamagecrit=[[0]]}} {{globaldamagetype=@{Character_Name |global_damage_mod_type}}} ammo= @{Character_Name |charname_output} After you have copied over the ability, you can drag the button off of the bar. It takes a little getting used to, but hover over the button and a drag handle will appear to the right. Drag it up and off of the bar about halfway up the screen to be sure it "takes". And yes, I named my short sword "Stabitha".