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

Help with using a macro on an "ability" for a character.

Hello fellow ttrpg enjoyers.

First of all, I apologize as I am very new on all the coding that takes to use macros. Also I am playing a table for dnd5e and I am using the default sheet (idk if it's the ogl, if there is a way to check please let me know.)

I am trying to create a "Companion" ability, which is a table where I want to put all the rolls/abilities/possible checks that are not commonly used, but can be used (skill checks, some abilities as my character is homebrew, etc) in order to not fill the macro bar/quick bar with so much stuff.

I created some macros for rolling skill checks (the macros are just the calculations. d20+mod), and the issue comes when I try to add them to the ability. I Used the guide of "Nesting Queries" Guide to create the table, and I am at the second level of nesting, and whenever I try to use "#Macro" for the ability to call the macro, it doesn't recognizes the macro or any macro.

I leave here what I've done so far, hope someone can help me.

Thanks in advance.
Hope you're safe!

?{Companion|

   Skill check,?{Choose skill|

      Strength,?{Look at those muscles|

         Saving Throw, #..Strsave |

         Athletics, #Atlethism 

      } |

      

      Dexterity,?{Sneaky Sneaaakyyyy|

         Label 1Bi, value1Bi |

         Label 1Bii, value1Bii

      } |


      Constitution,?{Rock Solid|

         Label 1Bi, value1Bi |

         Label 1Bii, value1Bii

      } |


      Intelligence,?{uhumm actually邏|

         Label 1Bi, value1Bi |

         Label 1Bii, value1Bii

      } |


      Wisdom,?{A wise man once said|

         Label 1Bi, value1Bi |

         Label 1Bii, value1Bii

      } |


      Charisma,?{Stand behind Braum|

         Label 1Bi, value1Bi |

         Label 1Bii, value1Bii

      }


   } |


   Label 2,?{value2|value2} 

}

Macros are expanded before queries resolve - if the macro contains any symbols that would break the query (pipe, comma, closing brace), you'll have to substitute those out in the source macro. If the macros do not resolve at all, check that you have their names written correctly in the ability. Finally, I would suggest using a chat menu instead of a nested query - it'll save you a lot of trouble.


Tuo said:

Macros are expanded before queries resolve - if the macro contains any symbols that would break the query (pipe, comma, closing brace), you'll have to substitute those out in the source macro. If the macros do not resolve at all, check that you have their names written correctly in the ability. Finally, I would suggest using a chat menu instead of a nested query - it'll save you a lot of trouble.

Thank you for the reply Tuo, even tho I managed to make it work. Something weird is it's working while my macros on the macro tap still have symbols instead of the html substitution.

So my ability looks like this:

?{Companion|

   Skill check,?{Choose skill|

      Strength,?{Look at those muscles|

         Saving Throw, #..Strsave |

         Athletics, #...Athleticscheck 

      } |

      

      Dexterity,?{Sneaky Sneaaakyyyy|

         Saving Throw, #..Dexsave |

         Acrobatics, #...Acrobaticscheck |

         Sleight of hand, #...Sleightofhandcheck |

         Stealth, #...Stealthcheck

      } |


      Constitution,?{Rock Solid|

         Saving Throw, #..Consave 

      } |


      Intelligence,?{uhumm actually邏|

         Saving Throw, #..Intsave |

         Arcana, #...Arcanacheck |

         History, #...Historycheck |

         Investigation, #...Investigationcheck |

         Nature, #...Naturecheck |

         Religion, #...Religioncheck

      } |


      Wisdom,?{A wise man once said|

         Saving Throw, #..Wissave |

         Animal Handling, #...Animalhandlingcheck |

         Insight, #...Insightcheck |

         Medicine, #...Medicinecheck |

         Perception, #...Perceptioncheck |

         Survival, #...Survivalcheck

      } |


      Charisma,?{Stand behind Braum|

         Saving Throw, #..Chasave |

         Deception, #...Deceptioncheck |

         Intimidation, #...Intimidationcheck |

         Performance, #...Performancecheck |

         Persuasion, #...Persuasioncheck

      }


   } |


   Label 2,?{value2|value2} 

}

and my macros (the checks and saves the ability is calling) are respectively written as:

[[d20+@{selected|acrobatics_bonus}]]

and

[[d20+@{selected|dexterity_save_bonus}]]

However, it doesn't breaks the query somehow. Tested all the possible options so far, and it seems to run smooth. Should I be scared of something?


No, if it works, it works - those attribute calls don't break the query because they're fully expanded out first, so those closing braces are gone by the time the query gets around to them. And yeah, an annoying quirk of the collections macros is that it resolves html substitutions when you edit a saved macro, so whenever you're writing those, it's better to avoid having to rely on the substitutions.

Oh I see, I understand now. Thank you very much for your help. As a last update, I substituted the #macros on the ability with the actuall action the macro was executing. It runs smooth and with no issues, and this way my dm can use it without creating 22 different macros. If you or anyone after this post closes wants the code, feel free to tell me here or send me a private message!