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

[Label](~) this works?

Ability Command Buttons Ability Command Buttons can be used to call  Abilities  (or sheet button rolls) from a clickable button in the Text Chat. They are very closely related to  API Command Buttons .  Their syntax is as follows: [Label](~<keyword>|<ability name>) As with  Attribute  and  Ability  calls, the  keyword  is your choice of  selected ,  target  or a character_name. You can also use a character_id as a keyword.  If you have an Ability Command Button saved somewhere within one of the tabs of the  Character Window , you can choose to omit a keyword: [Label](~<ability name>) Continuing the example from  Abilities , Bob the Slayer might insert  [Swing Axe!!](~Massive Axe)  into another one of his other Abilities so that he could more-accessibly fillet his foes. ***the second option no longer works ???***...    or am I missing something and another question is there a way to substitute | by another command that accepts roll20? to use the first option but in a question macro  ?{question?
1625116844
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
[Label](~Ability) works if the button is produced from an ability on the same character sheet. Otherwise you have to specify the sheet being used. The text above is not clear on that. More info from  Chat Menus . To make a Chat Menu, use a Roll Template. Because the formatting of Roll Templates, the appearance of a Chat Menu can vary widely from game to game. In general, though, the code is remarkably similar: [command name](#macro to call) Default button syntax to reference a Macro in the collections tab—You probably don't need to use this for a Chat Menu. Use one of the versions below. If you use the macro character tip posted above, the format is: [command name](~macro to call) Button syntax to reference an Ability on the same sheet ... with "macro to call" being another ability on the same sheet. By keeping your macros on a sheet along with the Chat Menu macro itself, you not only gain the advantage of transportability to new campaigns, you also ensure that nothing breaks once you transport it. The macro it's calling comes right along with it. If you want to reference a macro that is on a character sheet (an "Ability"), but you are not writing the macro on the same sheet, you can reference the ability with this format (Assuming that your referenced sheet is called "Macros"): [command name](~Macros|macro to call) Button syntax to reference an Ability on  another  character sheet, such as a Macro Character Sheet. If your macro is a loose, global macro, the code is a little more arcane, since you need to use HTM replacements: [command name](!
#macro to call) Button syntax to reference a Macro in the collections tab. Try to use only in Abilities, not Macros, since Macros will revert the HTML replacement if you need to edit. Note also, that you can embed a Roll Command into the API button instead of a macro, if you simply have a bit of code you use over and over, but a better practice (at least I have found) is to keep as much code in macros as possible, so that if you use the same command in different places, you only have to edit the original if you later decide to change how something works. If it's just an API call (a script call, beginning with "!"), it's pretty safe to pop in as-is.
Thx man, everything works perfectly for me. Less this I do not know why it does not work for me and I have tried it in all possible ways, I think If you use the macro character tip posted above, the format is: [command name](~macro to call) Button syntax to reference an Ability on the same sheet
1625234753
Kraynic
Pro
Sheet Author
Yeah, with a macro character, the example might be better as: [command name](~macro sheet name|macro to call)
1625235174
Andreas J.
Forum Champion
Sheet Author
Translator
Arlekin D. said: Thx man,&nbsp;everything works perfectly for me. Less this I do not know why it does not work for me and I have tried it in all possible ways, I think If you use the macro character tip posted above, the format is: [command name](~macro to call) Button syntax to reference an&nbsp;Ability on the same sheet It's spelt out in the linked wiki page: <a href="https://wiki.roll20.net/Chat_Menus#Roll_Button.2FCharacter_Ability" rel="nofollow">https://wiki.roll20.net/Chat_Menus#Roll_Button.2FCharacter_Ability</a> : If you want to reference a macro that is on a character sheet (an "Ability"), but you are not writing the macro on the same sheet, you can reference the ability with this format (Assuming that your referenced a sheet named "Alice"). normally it would be referenced with %{Alice|ability-name} : [command name](~Alice|ability-name) Keith's reply gave the [command name](~Macros|macro to call) as an example, with "Macros" being the name of the character. It's always good to look at the other real examples to get more ideas of the syntax in usage: <a href="https://wiki.roll20.net/Chat_Menus#Examples" rel="nofollow">https://wiki.roll20.net/Chat_Menus#Examples</a>
If you use the macro character tip posted above, the format is: [command name](~macro to call) Button syntax to reference an&nbsp;Ability on the same sheet ***This command has a Bug because it works the first time and then stops working. or is there something I don't know ...***
1625261079
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Are both the referring action and the called action closed (saved)? A call can fail on an action that is in edit mode. Also just double checking: The ability you are running (the one that creates the button) and the one you are calling are both on the same sheet? The process itself is not bugged, because it is a workhorse technique used throughout Roll20. So it is likely there is a procedural error somewhere.
Thanks Keithcurtis. I already saw what my mistake was, I know how it works, but what a way to complicate it .... ok thanks everyone for everything.