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

Chat Menu (with Macro character) help

1614567224

Edited 1614567691
Evening. Edit: Just realized I posted this in the wrong forum. Sorry I have the basics of chat menu's down, the basics of a macro character understood. I am trying to figure out the syntax needed for the following situation (code below) This is my chat menu macro (err...ability) on the macro character. (I put it on new lines for ease of reading) The text for the '5 ft Radius' button executable works in this situation and typed in like this. I was wondering if it could work the way I have typed in for the other Radius buttons. (that ability is below also) &{template:pf_generic} @{toggle_rounded_flag} {{font=@{selected|apply_specfont_chat}@{selected|use_specfont}}} {{scroll_desc=@{selected|scroll-desc}}} {{color=@{selected|rolltemplate_color}}} {{subtitle=*Area of Effect*}} {{name=**Spell Templates**}} {{Circles:}} {{[5 ft Radius](!Spawn {{ --name| Circle 5 ft radius --size| 2,2 --offset| -1.5,.5 --order | toBack --expand| 20,40 --fx| explode-magic }}) [7.5 ft Radius](~.Spell_Circle7ft) [10 ft Radius](~.Spell_Circle10ft) [15 ft Radius](~.Spell_Circle15ft) [20 ft Radius](~.Spell_Circle20ft) [30 ft Radius](~.Spell_Circle30ft)}} Below is the ability (.Spell_Circle7ft) as typed in on the macro character !Spawn {{ --name| Circle 7 ft radius --size| 3,3 --offset| -2,0 --order | toBack --expand| 20,40 --fx| explode-magic }} Can this actually be done with the first ability calling the second ability and the second ability call an api script? I am trying to keep readability there as I will be adding another 35 buttons. Thanks.
1614625816
David M.
Pro
API Scripter
I'm no expert on chat menu buttons, but the following seems to work by adding the html replacements for a carriage return and %, then referencing the ability explicitly by character name, as described  here . So, on a character named Trix, this works: [7 ft Radius](!
%{Trix|.Spell_Circle7ft}) There's probably a way to avoid the explicit character identifier, but I don't do these very often. Someone else may chime in and illuminate us both :)
Thank you. Strangely I found the answer out (and forgot to post it).  I was still testing the macro (from the character ability). The chat menu showed up correctly, but the subsequent functions did not. When I set it as a token ability, and used the button created from the token macro bar, everything worked perfectly without changing a thing. Have no idea why it happened like that.
1614650979
Oosh
Sheet Author
API Scripter
When referring to a character's Ability macros from within that character's own Ability macros, you can leave the name/ID off the reference. However this doesn't work from the 'test' button - you need to save the macro and run it properly. Not really sure why - the only workaround is to either not use the 'test' button, or just use the full reference with the character name.
1614653005
David M.
Pro
API Scripter
Ah, thanks Oosh. That was really bugging me. 
1614655260
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
It should work with the test button, but only after you have closed and re-opened the referenced ability. Or rather, the last time it was closed it what is referenced.
keithcurtis said: It should work with the test button, but only after you have closed and re-opened the referenced ability. Or rather, the last time it was closed it what is referenced. Strangely, from the 'test' button, the chat menu displays correctly (the first code I posted), but the buttons in the chat menu do not work (the second code I posted). Yes, I closed and reopened the edit window (to 'save' the edits). If I run from the token macro bar, everything works correctly (with the exact same code as I tried in the test button).  I don't understand it, but now that I know...