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

[Script, Call For Testers] Universal Chat Menus

1594412196
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
That's almost certainly the Pathfinder by Roll20 character sheet, then. You'd have to specifically choose a different one. Cool!
1594417494

Edited 1597599919
Kraynic
Pro
Sheet Author
Here is what I am currently using for the Pathfinder by Roll20 sheet. The NPC menu gives you just about everything you need except for skills.  The skills menu works for both PCs and NPCs, and filters out skills that aren't trained. NPC !chatmenu @{selected|character_id} {template:pc} {{charname=@{selected|character_name}}} {{type=ability}} {{smallname=NPC MENU}} {{showchar=[1]}} {{descflag=1}} {{desc=CHATMENU **Defense Statistics** AC @{selected|ac} |Touch @{selected|ac_touch} |Flat-Footed @{selected|ac_flatfooted} |CMD @{selected|cmd_mod} |SR @{selected|sr} }} {{shownotes=[1]}} {{notes=**- Fort:**@{selected|fortitude_notes} |**Ref:**@{selected|reflex_notes} |**Will:**@{selected|will_notes} |**AC:**@{selected|ac_notes} |**CMD:**@{selected|cmd_notes} |**SR:**@{selected|sr_notes}|**Defensive Abilities:**@{selected|defensive_abilities}|**DR:**@{selected|npc_dr}}} --title:Melee Attacks --separator:~ --repeating_npcatk-melee|atkname|attack --title:Ranged Attacks --repeating_npcatk-ranged|atkname|attack --title:Special Attacks --repeating_npcatk-special|atkname|attack --title:Spell Like and Items --separator:~ --repeating_spell-like|spelldisplay|spell --title:Cantrips and Orisons --separator:~ --repeating_spell-0|spelldisplay|spell --title:Level 1 --repeating_spell-1|spelldisplay|spell --title:Level 2 --repeating_spell-2|spelldisplay|spell --title:Level 3 --repeating_spell-3|spelldisplay|spell --title:Level 4 --repeating_spell-4|spelldisplay|spell --title:Level 5 --repeating_spell-5|spelldisplay|spell --title:Level 6 --repeating_spell-6|spelldisplay|spell --title:Level 7 --repeating_spell-7|spelldisplay|spell --title:Level 8 --repeating_spell-8|spelldisplay|spell --title:Level 9 --repeating_spell-9|spelldisplay|spell --title:Saves --Fort(@{selected|fortitude}),fortitude --Ref(@{selected|reflex}),reflex --Will(@{selected|will}),will Skills !chatmenu @{selected|character_id} {template:pc}{{charname=@{selected|character_name}}} {{type=ability}} {{smallname=SKILLS}} {{showchar=[1]}} {{descflag=1}} {{desc=CHATMENU}} --title:Athletic Skills --Acrobatics,acrobatics|Climb,climb|Fly,fly|Swim,swim --title:Sneaky Skills --Disable Device,disabledevice,disable_device_ranks|Escape Artist,escapeartist|Disguise,disguise|Sleight of Hand,sleightofhand,sleight_of_hand_ranks|Stealth,stealth --title:Social Skills --Bluff,bluff|Diplomacy,diplomacy|Intimidate,intimidate|Sense Motive,sensemotive --title:Utility Skills --Appraise,appraise|Handle Animal,handleanimal,handle_animal_ranks|Heal,heal|Linguistics,linguistics,linguistics_ranks|Perception,perception|Ride,ride|Spellcraft,spellcraft,spellcraft_ranks|Survival,survival|Use Magic Device,usemagicdevice,use_magic_device_ranks --title:Knowledge Skills --Knowledge (Arcana),knowledgearcana,knowledge_arcana_ranks|Knowledge (Dungeoneering),knowledgedungeoneering,knowledge_dungeoneering_ranks|Knowledge (Local),knowledgelocal,knowledge_local_ranks|Knowledge (Nature),knowledgenature,knowledge_nature_ranks|Knowledge (Planes),knowledgeplanes,knowledge_planes_ranks|Knowledge (Religion),knowledgereligion,knowledge_religion_ranks|Knowledge (Engineering),knowledgeengineering,knowledge_engineering_ranks|Knowledge (Geography),knowledgegeography,knowledge_geography_ranks|Knowledge (History),knowledgehistory,knowledge_history_ranks|Knowledge (Nobility),knowledgenobility,knowledge_nobility_ranks --title:Craft Skills --@{selected|craft_name},craft,craft_ranks --repeating_skillcraft|name|skill --title:Perform Skills --@{selected|perform_name},perform,perform_ranks --repeating_skillperform|name|skill --title:Profession Skills --@{selected|profession_name},profession,profession_ranks --repeating_skillprofession|name|skill --separator:~ Attacks !chatmenu @{selected|character_id} {template:pc} {{charname=@{selected|character_name}}} {{type=ability}} {{smallname=ATTACKS}} {{showchar=[1]}} {{descflag=1}} {{desc=CHATMENU}} --title:Attack Options --separator:~ --repeating_attacks|atkname|fullattack Spells (includes Spell-like) !chatmenu @{selected|character_id} {template:pc} {{charname=@{selected|character_name}}} {{type=ability}} {{smallname=MAGIC}} {{showchar=[1]}} {{descflag=1}} {{desc=CHATMENU}} --title:Cantrips and Orisons --separator:~ --repeating_spell-0|spelldisplay|spell --title:Level 1 --repeating_spell-1|spelldisplay|spell --title:Level 2 --repeating_spell-2|spelldisplay|spell --title:Level 3 --repeating_spell-3|spelldisplay|spell --title:Level 4 --repeating_spell-4|spelldisplay|spell --title:Level 5 --repeating_spell-5|spelldisplay|spell --title:Level 6 --repeating_spell-6|spelldisplay|spell --title:Level 7 --repeating_spell-7|spelldisplay|spell --title:Level 8 --repeating_spell-8|spelldisplay|spell --title:Level 9 --repeating_spell-9|spelldisplay|spell --title:Spell Like and Items --repeating_spell-like|spelldisplay|spell Feats/Traits !chatmenu @{selected|character_id} {template:pc} {{charname=@{selected|character_name}}} {{type=ability}} {{smallname=FEATS & TRAITS}} {{showchar=[1]}} {{descflag=1}} {{desc=CHATMENU}} --title:Feats --separator:~ --repeating_feats|name|feat --title:Features and Traits --repeating_abilities|name|trait Saves and Stats !chatmenu @{selected|character_id} {template:pc}{{charname=@{selected|character_name}}} {{type=}} {{smallname=Defenses}} {{showchar=[1]}} {{descflag=1}} {{desc=CHATMENU **Defense Statistics** AC @{selected|ac} |Touch @{selected|ac_touch} |Flat-Footed @{selected|ac_flatfooted} |CMD @{selected|cmd_mod} |SR @{selected|sr} }} {{shownotes=[1]}} {{notes=**- Fort:**@{selected|fortitude_notes} |**Ref:**@{selected|reflex_notes} |**Will:**@{selected|will_notes} |**AC:**@{selected|ac_notes} |**CMD:**@{selected|cmd_notes} |**SR:**@{selected|sr_notes}}} --separator:~ --title:Stats --STR(@{selected|strength}),strength|DEX(@{selected|dexterity}),dexterity|CON(@{selected|constitution}),constitution|INT(@{selected|intelligence}),intelligence|WIS(@{selected|wisdom}),wisdom|CHA(@{selected|charisma}),charisma --title:Saves --Fort(@{selected|fortitude}),fortitude --Ref(@{selected|reflex}),reflex --Will(@{selected|will}),will I haven't looked these over since setting them up quite a while ago, so some of them might be able to be condensed in some way, but hopefully that will get you going, or give you some ideas.  I think someone else posted something they used back on page 3 or 4 of the thread. Edit: Updated the npc menu to include info on damage reduction (DR).
1594452794
GiGs
Pro
Sheet Author
API Scripter
The thread was busy yesterday! Jarren K.  said: One more request: the ability to add a carriage return as the separator. It seems that it's not possible to use 
 or 
 or <br> or /r.    Looks like that would have to be something in the script itself.   A carriage return should be possible to add, but I think it'll a change to the way buttons are created. I'm planning to refactor the code, which will be a big job. I have a bunch of RL stuff going on (including house repairs and a move). I dont expect to have time to work on it till the end of the month. But Keith will be pleased to know that it will be my first programming priority for next month.  Johnny Meatshield  said: If you have time, I have a request.  Would it be possible to toggle buffs?  I know there is a Chatsetattr api already but it looks like you need to know the name or ID of the buff in order to do that.  I can use UCM to make a list of buffs but the ability to toggle is escaping me. Buffs are out of scope for this script. But adding the ability to call other scripts - like chatSetAttr which can do them - is in my plans. But it wont be for a while (see above reply). 
1594454925

Edited 1594463536
GiGs
Pro
Sheet Author
API Scripter
Here's my current list of bugs to be fixed, and feature suggestions, for the next version of the script. (They might not all get done!) Let me know if there's anything I've overlooked. &nbsp;&nbsp;&nbsp;&nbsp;====&nbsp;BUGS&nbsp;====&nbsp; &nbsp; &nbsp; parenthesis&nbsp;in&nbsp;a&nbsp;feature&nbsp;name&nbsp;(and&nbsp;parsing&nbsp;in&nbsp;general):&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <a href="https://app.roll20.net/forum/permalink/7785967/" rel="nofollow">https://app.roll20.net/forum/permalink/7785967/</a> &nbsp;&nbsp;&nbsp;&nbsp;see&nbsp;also:&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <a href="https://app.roll20.net/forum/permalink/8045475/" rel="nofollow">https://app.roll20.net/forum/permalink/8045475/</a> &nbsp; &nbsp; This is part of a larger issue with text parsing, but its not too hard to fix (as part of a complete rewrite!). &nbsp;&nbsp;&nbsp;&nbsp;When&nbsp;filtering&nbsp;(|field!filter),&nbsp;items&nbsp;with&nbsp;empty&nbsp;fields&nbsp;get&nbsp;printed:&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <a href="https://app.roll20.net/forum/permalink/7508068/" rel="nofollow">https://app.roll20.net/forum/permalink/7508068/</a> &nbsp;&nbsp;&nbsp;&nbsp; <a href="https://app.roll20.net/forum/permalink/8162086/" rel="nofollow">https://app.roll20.net/forum/permalink/8162086/</a> &nbsp; &nbsp; The filtering module needs a complete rewrite. Its a bit kludgey, and needs more robust code. &nbsp;&nbsp;&nbsp;&nbsp;Repeating&nbsp;Section&nbsp;Sorting &nbsp;&nbsp;&nbsp;&nbsp;I&nbsp;noticed&nbsp;recently&nbsp;that&nbsp;UCM&nbsp;doesnt&nbsp;respect&nbsp;player&nbsp;ordering&nbsp;of&nbsp;repeating&nbsp;sections.&nbsp;Since&nbsp;no-one&nbsp;has&nbsp;mentioned&nbsp;it,&nbsp;this&nbsp;doesnt&nbsp;seem&nbsp;like&nbsp;that&nbsp;big&nbsp;of&nbsp;a&nbsp;problem,&nbsp;and&nbsp;so&nbsp;isnt&nbsp;a&nbsp;high&nbsp;priority&nbsp;to&nbsp;fix.&nbsp;But&nbsp;I'll&nbsp;look&nbsp;into&nbsp;it. &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;===&nbsp;SUGGESTIONS&nbsp;==== &nbsp;&nbsp;&nbsp;&nbsp;Include&nbsp;another&nbsp;label&nbsp;that&nbsp;is&nbsp;printed&nbsp;on&nbsp;the&nbsp;button&nbsp;(like&nbsp;spells&nbsp;remaining) &nbsp;&nbsp;&nbsp;&nbsp; <a href="https://app.roll20.net/forum/permalink/7764403/" rel="nofollow">https://app.roll20.net/forum/permalink/7764403/</a> &nbsp; &nbsp; This seems very feasible.&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;Allow&nbsp;buttons&nbsp;to&nbsp;have&nbsp;whisper&nbsp;options:&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <a href="https://app.roll20.net/forum/permalink/8169661/" rel="nofollow">https://app.roll20.net/forum/permalink/8169661/</a> &nbsp;&nbsp;&nbsp;&nbsp;It&nbsp;would&nbsp;be&nbsp;better&nbsp;to&nbsp;create&nbsp;a&nbsp;setting&nbsp;that&nbsp;can&nbsp;be&nbsp;passed&nbsp;by&nbsp;the&nbsp;chat&nbsp;menu&nbsp;that&nbsp;tells&nbsp;the&nbsp;function&nbsp; whether&nbsp;to&nbsp;whisper&nbsp;the&nbsp;button&nbsp;or&nbsp;not.&nbsp;And&nbsp;it&nbsp;would&nbsp;be&nbsp;better&nbsp;to&nbsp;make&nbsp;it&nbsp;more&nbsp;universal:&nbsp; some&nbsp;players&nbsp;(not&nbsp;just&nbsp;the&nbsp;GM)&nbsp;might&nbsp;want&nbsp;to&nbsp;create&nbsp;buttons&nbsp;that&nbsp;whisper&nbsp;to&nbsp;them,&nbsp;too. I expect this is doable. &nbsp;&nbsp;&nbsp;&nbsp;Pass&nbsp;unfiltered&nbsp;text&nbsp;through&nbsp;UCM: &nbsp;&nbsp;&nbsp;&nbsp; <a href="https://app.roll20.net/forum/permalink/7742257/" rel="nofollow">https://app.roll20.net/forum/permalink/7742257/</a> &nbsp;&nbsp;&nbsp;&nbsp;Basically&nbsp;pass&nbsp;strings&nbsp;that&nbsp;dont&nbsp;get&nbsp;parsed&nbsp;by&nbsp;ucm,&nbsp;and&nbsp;will&nbsp;be&nbsp;printed&nbsp;out&nbsp;naturally. &nbsp; &nbsp; This is certainly possible. Its mostly a matter of figuring out syntax for it that isnt too klunky. &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;Allow&nbsp;more&nbsp;than&nbsp;one&nbsp;attribute&nbsp;to&nbsp;be&nbsp;included&nbsp;in&nbsp;report&nbsp;(for&nbsp;buttons&nbsp;which&nbsp;print&nbsp;out&nbsp;text):&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <a href="https://app.roll20.net/forum/permalink/7657304/" rel="nofollow">https://app.roll20.net/forum/permalink/7657304/</a> &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <a href="https://app.roll20.net/forum/permalink/8929210/" rel="nofollow">https://app.roll20.net/forum/permalink/8929210/</a> &nbsp;&nbsp;&nbsp;&nbsp;This&nbsp;might&nbsp;be&nbsp;a&nbsp;bit&nbsp;beyond&nbsp;spec.&nbsp;There are design&nbsp;questions,&nbsp;and&nbsp;the&nbsp;incredible&nbsp;range&nbsp;of options&nbsp;(as&nbsp;shown&nbsp;in&nbsp;the&nbsp;two&nbsp;questions&nbsp;above)&nbsp;might&nbsp;make&nbsp;it&nbsp;hard&nbsp;to&nbsp;implement&nbsp;in&nbsp;a&nbsp;standardised&nbsp;way&nbsp;satisfactorily.&nbsp; But&nbsp;I'll&nbsp;explore&nbsp;possibilities&nbsp;(and&nbsp;see&nbsp;second New Feature&nbsp;idea&nbsp;below). &nbsp; &nbsp;&nbsp;carriage&nbsp;return&nbsp;as&nbsp;separator &nbsp;&nbsp;&nbsp;&nbsp;<a href="https://app.roll20.net/forum/permalink/8929287/" rel="nofollow">https://app.roll20.net/forum/permalink/8929287/</a> &nbsp;&nbsp;&nbsp;&nbsp;===&nbsp;POSSIBLE&nbsp;NEW&nbsp;FEATURES&nbsp;=== &nbsp;&nbsp;&nbsp;&nbsp;NATIVE&nbsp;STYLE &nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;script&nbsp;uses&nbsp;the&nbsp;default&nbsp;rolltemplate&nbsp;if&nbsp;you&nbsp;dont&nbsp;state&nbsp;a&nbsp;rolltemplate.&nbsp; I&nbsp;plan&nbsp;to&nbsp;create&nbsp;an&nbsp;inbuilt&nbsp;style&nbsp;for&nbsp;UCM&nbsp;that&nbsp;might&nbsp;be&nbsp;closer&nbsp;to&nbsp;Keith's&nbsp;stylus&nbsp;tweak&nbsp; that&nbsp;uses&nbsp;space&nbsp;better&nbsp;than&nbsp;the&nbsp;default&nbsp;rolltemplate,&nbsp;and&nbsp;give&nbsp;some&nbsp;basic&nbsp;colour&nbsp;options. &nbsp;&nbsp;&nbsp;&nbsp;ACCESS&nbsp;USER-CREATED&nbsp;ABILITIES &nbsp;&nbsp;&nbsp;&nbsp;UCM&nbsp;accesses&nbsp;character&nbsp;sheet&nbsp;buttons&nbsp;and&nbsp;attributes.&nbsp;I&nbsp;am&nbsp;considering&nbsp;the&nbsp;option&nbsp;to&nbsp;add&nbsp;user-created&nbsp;Abilities&nbsp;too,&nbsp;and&nbsp;if&nbsp;they&nbsp;follow&nbsp;name&nbsp;patterns,&nbsp;it'll&nbsp;be&nbsp;able&nbsp;to&nbsp;treat&nbsp;them&nbsp;like&nbsp;repeating&nbsp;sections&nbsp; (automatically&nbsp;build&nbsp;a&nbsp;menu&nbsp;section&nbsp;from&nbsp;abilities&nbsp;named&nbsp;in&nbsp;a&nbsp;certain&nbsp;way).&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;This&nbsp;will&nbsp;allow&nbsp;people&nbsp;to&nbsp;create&nbsp;abilities&nbsp;that&nbsp;contain&nbsp;whatever&nbsp;output&nbsp;they&nbsp;want,&nbsp;and&nbsp;integrate&nbsp;them&nbsp;into&nbsp;UCM&nbsp;output.
1594481421
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Glad to see you might be returning to this excellent script. &nbsp; &nbsp; NATIVE&nbsp;STYLE I do think the native style would be a useful addition (not everyone knows about or wants to use Stylus), however, I hope this wouldn't come at the expense of sheet templates, since those provide many options useful to the game being played, and retain uniform styling for the play experience. If you do go with a universal template, feel free to see if there is anything in Supernotes you can use, since it allows users to choose a default roll template for the script. &nbsp; &nbsp; Pass&nbsp;unfiltered&nbsp;text&nbsp;through&nbsp;UCM: If this can pass roll buttons, awesome! So many uses! &nbsp; &nbsp; Allow&nbsp;more&nbsp;than&nbsp;one&nbsp;attribute&nbsp;to&nbsp;be&nbsp;included&nbsp;in&nbsp;report&nbsp;(for&nbsp;buttons&nbsp;which&nbsp;print&nbsp;out&nbsp;text):&nbsp; I understand if this is beyond spec. It would be extremely useful for things like showing a spell without casting it, but I can see how it might be a tangle to use.
1594497826
GiGs
Pro
Sheet Author
API Scripter
keithcurtis said: Glad to see you might be returning to this excellent script. &nbsp; &nbsp; NATIVE&nbsp;STYLE I do think the native style would be a useful addition (not everyone knows about or wants to use Stylus), however, I hope this wouldn't come at the expense of sheet templates, since those provide many options useful to the game being played, and retain uniform styling for the play experience. If you do go with a universal template, feel free to see if there is anything in Supernotes you can use, since it allows users to choose a default roll template for the script. Not to worry there. I'm very happy with the script's handling of rolltemplates. This is for users who dont use rolltemplates, and just use very basic commands to generate the button menus.
1594499882
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I've thought about adding the same functionality to Supernotes.
1594518943
GiGs
Pro
Sheet Author
API Scripter
It's definitely a nice feature to have.
GiGs said: &nbsp;&nbsp;&nbsp; Repeating&nbsp;Section&nbsp;Sorting &nbsp;&nbsp;&nbsp;&nbsp;I&nbsp;noticed&nbsp;recently&nbsp;that&nbsp;UCM&nbsp;doesnt&nbsp;respect&nbsp;player&nbsp;ordering&nbsp;of&nbsp;repeating&nbsp;sections.&nbsp;Since&nbsp;no-one&nbsp;has&nbsp;mentioned&nbsp;it,&nbsp;this&nbsp;doesnt&nbsp;seem&nbsp;like&nbsp;that&nbsp;big&nbsp;of&nbsp;a&nbsp;problem,&nbsp;and&nbsp;so&nbsp;isnt&nbsp;a&nbsp;high&nbsp;priority&nbsp;to&nbsp;fix.&nbsp;But&nbsp;I'll&nbsp;look&nbsp;into&nbsp;it. I don't know why, but this—of all things—I assumed to be an innate limitation and never thought to bring it up :p Not an urgent issue of course, but if you get around to the fix that would sure be awesome!
1594535627

Edited 1594535666
GiGs
Pro
Sheet Author
API Scripter
keithcurtis said: Pass&nbsp;unfiltered&nbsp;text&nbsp;through&nbsp;UCM: If this can pass roll buttons, awesome! So many uses! There's a problem here in that roll20 parses anything parsable before the script ever sees the input. So some things wont be able to be passed to UCM without using html entities, and then might require internal processing to stop them triggering automatically again when the script sends the menu to chat. So there are definitely somethings that would be tricky. API buttons that use the ~selected|name syntax are probably okay, but the two formats that use html entities might be too much to commit to. Persephone said: GiGs said: &nbsp;&nbsp;&nbsp; Repeating&nbsp;Section&nbsp;Sorting &nbsp;&nbsp;&nbsp;&nbsp;I&nbsp;noticed&nbsp;recently&nbsp;that&nbsp;UCM&nbsp;doesnt&nbsp;respect&nbsp;player&nbsp;ordering&nbsp;of&nbsp;repeating&nbsp;sections.&nbsp;Since&nbsp;no-one&nbsp;has&nbsp;mentioned&nbsp;it,&nbsp;this&nbsp;doesnt&nbsp;seem&nbsp;like&nbsp;that&nbsp;big&nbsp;of&nbsp;a&nbsp;problem,&nbsp;and&nbsp;so&nbsp;isnt&nbsp;a&nbsp;high&nbsp;priority&nbsp;to&nbsp;fix.&nbsp;But&nbsp;I'll&nbsp;look&nbsp;into&nbsp;it. I don't know why, but this—of all things—I assumed to be an innate limitation and never thought to bring it up :p Not an urgent issue of course, but if you get around to the fix that would sure be awesome! It is doable but definitely adds complexity.
First, I've been using this for a few months as a spellbook macro on the 2e simple sheet, and it's great. Finally sat down today to do the same for the weapons and I am hitting some sheet limitations. I've messaged the current sheet author, but what would solve my problem (I think) is if I can call up a system or character sheet macro. This works, but the hit1 button on the sheet is not sufficient for our needs: !chatmenu @{selected|character_id} @{selected|character_name}'s Attack Options&nbsp; --title:Weapon Attacks --repeating_weapons|weaponname|hit1 This is what I would like it to pull: !chatmenu @{selected|character_id} @{selected|character_name}'s Attack Options&nbsp; --title:Weapon Attacks --repeating_weapons|weaponname| systemmacro Where systemmacro is ATTACK1 is the macro in question. I can put this on an ATTACK sheet, or even on each character sheet if necessary. (gonna try these now, as typing this made me think of this!) Can this script do this? If not, I'll live with the solution I have in place with a selection macro, this is just so much slicker!
1594603516
GiGs
Pro
Sheet Author
API Scripter
I'm not really sure what youre asking here. This code --repeating_weapons|bla|bla Can only call attributes or roll buttons that exist within that repeating section on the character sheet. It cant call external macros, or abilities from anywhere thats not inside that repeating section.
Hi everyone, Working with the 5e OGL sheet. Trying to use the Menu macro template that KeithCurtis laid out . Here's the macro code: !chatmenu @{selected|character_id} {template:npcaction}{{rname=@{selected|character_name}}}{{description=CHATMENU}} --separator: |&amp;nbsp; --title:Ability Rolls --**Str @{selected|strength}** *(@{selected|strength_mod})* ,strength|**Dex @{selected|dexterity}** *(@{selected|dexterity_mod})*,dexterity|**Con @{selected|constitution}** *(@{selected|constitution_mod})* ,constitution|**Int @{selected|intelligence}** *(@{selected|intelligence_mod})* ,intelligence|**Wis @{selected|wisdom}** *(@{selected|wisdom_mod})*,wisdom|**Cha @{selected|charisma}** *(@{selected|charisma_mod})*,charisma --title:Saving Throws --Str,npc_str_save|Dex,npc_dex_save|Con,npc_con_save|Int,npc_int_save|Wis,npc_wis_save|Cha,npc_cha_save --title:Skills --Acrobatics,npc_Acrobatics|Arcana,npc_Arcana|Athletics,npc_Athletics|Deception,npc_Deception|History,npc_History|Intimidation,npc_Intimidation|Investigation,npc_Investigation|Medicine,npc_Medicine|Nature,npc_Nature|Perception,npc_Perception|Persuasion,npc_Persuasion|Sleight of Hand,npc_Sleight_of_Hand|Survival,npc_survival --title:Traits --repeating_npctrait|name|description --title:Actions --repeating_npcaction|name|npc_action --title:Traits --repeating_traits|name|output --title:Attacks --repeating_attack|atkname|attack --title:Cantrips --repeating_spell-cantrip|spellname|spell --title:Lvl-1 *(@{selected|lvl1_slots_expended}/@{selected|lvl1_slots_total})* --repeating_spell-1|spellname|spell --title:Lvl 2 *(@{selected|lvl2_slots_expended}/@{selected|lvl2_slots_total})* --repeating_spell-2|spellname|spell --title:Lvl 3 *(@{selected|lvl3_slots_expended}/@{selected|lvl3_slots_total})* --repeating_spell-3|spellname|spell --title:Lvl 4 *(@{selected|lvl4_slots_expended}/@{selected|lvl4_slots_total})* --repeating_spell-4|spellname|spell --title:Lvl 5 *(@{selected|lvl5_slots_expended}/@{selected|lvl5_slots_total})* --repeating_spell-5|spellname|spell --title:Lvl 6 *(@{selected|lvl6_slots_expended}/@{selected|lvl6_slots_total})* --repeating_spell-6|spellname|spell --title:Lvl 7 *(@{selected|lvl7_slots_expended}/@{selected|lvl7_slots_total})* --repeating_spell-7|spellname|spell --title:Lvl 8 *(@{selected|lvl8_slots_expended}/@{selected|lvl8_slots_total})* --repeating_spell-8|spellname|spell --title:Lvl 9 *(@{selected|lvl9_slots_expended}/@{selected|lvl9_slots_total})* --repeating_spell-9|spellname|spell Getting this result when trying to click the NPC trait buttons: If you change the `%` to the `@` symbol it works. Not sure if I'm doing something wrong or that's a missed feature for the OGL NPC traits.&nbsp; Any help is greatly appreciated!
1594690590
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Just checking, when you say "working with the OGL sheet", do you mean the one you select with the dropdown: "D&amp;D 5th Edition by Roll20 Sheet", or the legacy ogl sheet or one of the many clones? The sheet recently underwent some breaking changes, and the actual code should be something like: %{Abigail Potts|repeating_npctrait_-LsB---wrwM0AIq4zGL-_-npc_roll_output} The sheet is very non-standard on this. The code for the statblock was updated to match earlier this year, and has been tweaked occasionally over the last year to keep up with other changes and to correct errors. Make sure you have the latest version if using the official sheet.
I was referring to the "D&amp;D 5th Edition by Roll20 Sheet". That fixed it! Thanks again keithcurtis!
Hey Everyone, I think I am just being a moron but I installed this API and none of it's commands seem to be responding. I disabled all the other APIs to see if that changed anything and it didn't. I don't get any error messages except when I haven't got a token selected. I'm pretty sure I have missed a step somewhere but if anyone could point me in the right direction that would be great. I'm using the d&amp;d 5e roll20 sheet. &nbsp;&nbsp;&nbsp;&nbsp;
1595354723

Edited 1595354753
Kraynic
Pro
Sheet Author
You might want to post what commands (well, one at least) you are using, so that people can spot if there are any errors there.
1595355182
GiGs
Pro
Sheet Author
API Scripter
As Kraynic says, you'll need to post your code. For reference there are very complex working examples of 5e macros in this thread (on page 3, I think).
Well, I used the same one as Keith posted above as I figured that was 5e and should work. However I got no errors or functions. I'm sorry if this formats wrong !chatmenu @{selected|character_id} {template:npcaction}{{rname=@{selected|character_name}}}{{name=@{selected|class_display} @{selected|race_display}, @{selected|background} **Jump** - Long [[(@{selected|strength}/2)]] / [[@{selected|strength}]]ft. | High [[((@{selected|strength_mod}+2)/2)]] / [[@{selected|strength_mod}+2]] ft. **HP: **@{selected|hp} / @{selected|hp|max} | ** AC: ** @{selected|ac} | **Spd: ** @{selected|speed} | **Passive: ** @{selected|passive_wisdom}}}{{description=CHATMENU }} --separator: |&nbsp;&nbsp; --title:Ability Rolls --**Str @{selected|strength}** *(@{selected|strength_mod})* ,strength|**Dex @{selected|dexterity}** *(@{selected|dexterity_mod})*,dexterity|**Con @{selected|constitution}** *(@{selected|constitution_mod})* ,constitution|**Int @{selected|intelligence}** *(@{selected|intelligence_mod})* ,intelligence|**Wis @{selected|wisdom}** *(@{selected|wisdom_mod})*,wisdom|**Cha @{selected|charisma}** *(@{selected|charisma_mod})*,charisma --title:Saving Throws --Str,strength_save|Dex,dexterity_save|Con,constitution_save|Int,intelligence_save|Wis,wisdom_save|Cha,charisma_save|Death,death_save --title:Skills --Acrobatics,Acrobatics|Animal Handling,Animal_Handling|Arcana,Arcana|Athletics,Athletics|Deception,Deception|History,History|Insight,Insight|Intimidation,Intimidation|Investigation,Investigation|Medicine,Medicine|Nature,Nature|Perception,Perception|Performance,Performance|Persuasion,Persuasion|Religion,Religion|Sleight of Hand,Sleight_of_Hand|Stealth,Stealth|Survival,survival --title:Languages --repeating_proficiencies|name|output|prof_type=Language --title:Tools --repeating_tool|toolname|tool --title:Traits --repeating_traits|name|output|name!Invocation: --title:Melee --repeating_attack|atkname|attack|atkrange&lt;1 --title:Ranged --repeating_attack|atkname|attack|atkrange --title:Eldritch Invocations --repeating_traits|name|output|name=Invocation: --title:Cantrips — *Save DC @{selected|spell_save_dc}* --repeating_spell-cantrip|spellname|spell --title:Lvl-1 *(@{selected|lvl1_slots_expended}/@{selected|lvl1_slots_total})* --repeating_spell-1|spellname|spell|spellprepared --title:Lvl 2 *(@{selected|lvl2_slots_expended}/@{selected|lvl2_slots_total})* --repeating_spell-2|spellname|spell|spellprepared --title:Lvl 3 *(@{selected|lvl3_slots_expended}/@{selected|lvl3_slots_total})* --repeating_spell-3|spellname|spell|spellprepared --title:Lvl 4 *(@{selected|lvl4_slots_expended}/@{selected|lvl4_slots_total})* --repeating_spell-4|spellname|spell|spellprepared --title:Lvl 5 *(@{selected|lvl5_slots_expended}/@{selected|lvl5_slots_total})* --repeating_spell-5|spellname|spell|spellprepared --title:Lvl 6 *(@{selected|lvl6_slots_expended}/@{selected|lvl6_slots_total})* --repeating_spell-6|spellname|spell|spellprepared --title:Lvl 7 *(@{selected|lvl7_slots_expended}/@{selected|lvl7_slots_total})* --repeating_spell-7|spellname|spell|spellprepared --title:Lvl 8 *(@{selected|lvl8_slots_expended}/@{selected|lvl8_slots_total})* --repeating_spell-8|spellname|spell|spellprepared --title:Lvl 9 *(@{selected|lvl9_slots_expended}/@{selected|lvl9_slots_total})* --repeating_spell-9|spellname|spell|spellprepared --title:Use Hit Dice --@{selected|hit_dice} Available,hit_dice|Long Rest,hit_dice --title:Resources (read-only) --@{selected|class_resource_name} *@{selected|class_resource}/@{selected|class_resource|max}|@{selected|other_resource_name} *@{selected|other_resource}/@{selected|other_resource|max}*
1595356467
Kraynic
Pro
Sheet Author
Just out of curiosity, have you tried restarting the api sandbox in one tab while logged into the game on another?&nbsp; I just copy/pasted your code into a test game (I don't actually play 5E), and it spit out a long menu.&nbsp; I only tried a couple rolls, but they seem to work.
1595356548
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
You are using it while selecting a single token that represents a PC (not an NPC)?
So I opened a new game and it worked in that one. So the code is fine, it must have been something I have done in the installation process. Thanks for your help!
keithcurtis said: You are using it while selecting a single token that represents a PC (not an NPC)? Yes
1597160481
Kraynic
Pro
Sheet Author
Is it possible to allow an attribute call to fill in a title entry?&nbsp; I was looking over my examples for my Heroes Unlimited sheet an thought that instead of using Vehicle 1 Weapons for vehicle turret attack rolls, it would be nice to have the actual vehicle names displayed instead.&nbsp; The portion of the currently used api/macro call that works is this: --title:Vehicle 1 Weapons --repeating_turretone|turretname|turret --title:Vehicle 2 Weapons --repeating_turrettwo|turretname|turret But it breaks if I do this: --title:@{vehicle1_name} --repeating_turretone|turretname|turret --title:@{vehicle2_name} --repeating_turrettwo|turretname|turret When I insert the attribute call, it just gives the "c is undefined" error. Is there a way for me to call in those names as the script is currently written, or would that require script changes?&nbsp; Obviously, it isn't an absolutely necessary thing, but just something I thought of trying.
1597161098
GiGs
Pro
Sheet Author
API Scripter
Thats odd, because attribute references are fully resolved before the macro reaches the API. Is this macro being run in a place where you need to supply the character or token name (e.g. from a button printed to chat)? Like below (replacing CHARACTER with selected or the actual character name). --title:@{CHARACTER|vehicle1_name} --repeating_turretone|turretname|turret --title:@{CHARACTER|vehicle2_name} --repeating_turrettwo|turretname|turret
1597161524
Kraynic
Pro
Sheet Author
You would think I would know better by now...&nbsp; Yeah, inserting selected| in there made it work just fine.
1597162832
GiGs
Pro
Sheet Author
API Scripter
great! :)
1597720391

Edited 1597720430
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Here's a 5e UCM macro I wrote for warlocks. Warlocks have some very complicated spell casting, what with spells, eldritch invocations and mystic arcana. This one requires some setup. Each spell on the&nbsp;&nbsp;D&amp;D 5th Edition by Roll20 Sheet has a Class field and a Type field at the very end. The&nbsp; Class &nbsp;field has the value&nbsp; Warlock &nbsp;for every spell you get from the warlock class. The&nbsp; Type &nbsp;field can be one of 4 values: Slot &nbsp;this is a normal spell you cast with a Warlock spell slot Eldritch &nbsp; Invocation &nbsp;for Eldritch Invocations Mystic Arcanum &nbsp;for Mystic Arcana. Book &nbsp;for the Book of Shadows for Tome Pact warlocks Be sure to fill the&nbsp; Innate &nbsp;field in with&nbsp; 1/day &nbsp;on 1/long rest Eldritch Invocations. Mystic Arcana can be tracked with spell slots, as below. You can further customize the macro by placing short notes for invocations that grant you abilities (ex. Devil's Sight) in the name field of the macro. Lastly, for maximum utility, make sure your first Resource on your character sheet is "Eldritch Invocations", and edit the additional spell slots on your settings tab to grant you a spell slot for 6-9th level as you achieve Mystic Arcana at those levels. Here is an example of the output from a 16th level Tome Pact warlock: Here is the code . I welcome any improvements.
Keith that looks great! If you want the separator to have a space on both sides, remember to put a colon at the end of the separator tag, like this: --separator: | :
1597812567

Edited 1597813622
Also, I just discovered a way to put hyperlinks in these chat menus—with a few limitations. You can include them in section titles, but it converts the text to all caps. So here, I made hyperlinks for macros that contain other chat menus, but I had to make sure the macro names were in all caps (I capitalized them within the macro as well just to help me remember). Clicking SECOND in the first menu brings up the second menu, and clicking SUBSEQUENT in either the first or second menu brings up the third menu. I titled the Attack Actions section in the initial macro like this --title: Attack Actions | [SECOND](`#COMBATMENU2) | [SUBSEQUENT](`#COMBATMENU3) And in the second macro it's changed to this --title: Attack Actions | [SUBSEQUENT](`#COMBATMENU3) I know I found a way a while back to show a title with an empty list below it, which would be good for dedicating a line of the menu to a button or a few, but I can't remember how I did it... Of course, links will still work in the footer parameter like --footer:[SECOND](`#COMBATMENU2) | [SUBSEQUENT](`#COMBATMENU3) but that places the text outside of the template, and I wanted the option to include links within the main body of text.
1597827340
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Nice trick! I could include a ChatSetAttr command to decrement the warlock spell slots in the line that reports those.
To make things better, after posting this I realized there IS a way to include the footer as part of the template! So you could have links in the title lines, then extra links in the footer. I have CHATMENU in the description, and added the footer as notes, but it requires putting opening double brackets before the first title line and closing double brackets in the beginning of the footer (to wrap the line break and '/w &lt;player&gt;' that the script creates; this brings the footer up into the rest of the template). !chatmenu @{selected|character_id} {template:rolls} {{charactername=@{selected|character_name}}} {{header=Spells}} {{desc=CHATMENU}} {{notes_show=[1]}} {{ --title:1st-level (@{selected|level_1_per_day}/@{selected|level_1_per_day|max}) --repeating_normalspells|name|spellroll|current_level=1|name!🔒|uses &lt;....&gt; --separator: | : --footer:}} {{notes=**SPELL DC @{selected|spell_dc} | [COUNTERACT](`#SpellCounteractRoll)**}} Underlined and emboldened the parts that make this work (I cut the bulk of the text and added line breaks for readability.) If your sheet requires a toggle to show the notes of a roll, like above, and normally uses [[1]], remember to change it to single brackets. This example ends up looking like this: Both methods of adding links are gonna be super useful! Titles can be used for macros that expend spell uses, like you suggested, keith, while the footer could include more general macros.
1597862953
GiGs
Pro
Sheet Author
API Scripter
I'm so happy that you and Keith latched on to this script. You do such great work with it.
1597867077
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Those are awesome finds, Persephone! Hades should let you out more often.
GiGs said: I'm so happy that you and Keith latched on to this script. You do such great work with it. You're the one who saw me struggling with my janky nested drop-downs and wanted to make a script to help! I'm just excited 'cause now I don't need to use two separate templates when I want both UCM and hyperlinks in a macro =D keithcurtis said: Those are awesome finds, Persephone! Hades should let you out more often. With how the weather's been lately I'm not sure winter will be claiming me any time soon :p This is gonna let me really improve my menus, tho, I can nest a lot of them this way like I did with the combat menu.
1598175869

Edited 1598176035
Hey @GiG.- I'm running on some trouble running this script from an API. After some extensive research, turns out sendChat commands from API's avoid this script's chat command to come through, since it doesn't have a "caller" variable set, which is defined in line 257 as "const caller = (getObj('player', msg.playerid)". Could it be possible that, on a 'null' caller, instead of making it 'get: () =&gt; 'API' , it could get the controlledby property corresponding to the character defined by the cid ? Nevermind, I just did that by replacing line 257 with get: () =&gt; msg.who So it uses the API's sendCall's display name instead of a player ID on a null (which is easier to work around in API's). I also added a SendChat to myself for troubleshooting purposes.
1598205505
GiGs
Pro
Sheet Author
API Scripter
There's probably a reason I didnt use msg.who, but maybe I just didnt think of the script being called by other scripts. I'll add that to the list of things to explore.
My PF2e modular menus now include hyperlinks and account for multiple attack penalty rolls, as well as some extra new stuff. See the updated post here: <a href="https://app.roll20.net/forum/permalink/8390047/" rel="nofollow">https://app.roll20.net/forum/permalink/8390047/</a>
1598345934
GiGs
Pro
Sheet Author
API Scripter
Nice work!
1601066301
Andreas J.
Forum Champion
Sheet Author
Translator
Is the latest version of this the code snippet on the first page?
1601071768
GiGs
Pro
Sheet Author
API Scripter
It should be yes. It's pending a very big rewrite.
1601393786
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Does this mean you are currently re-writing it, or that you feel it needs a big rewrite?
1601464484
David M.
Pro
API Scripter
Persephone said: My PF2e modular menus now include hyperlinks and account for multiple attack penalty rolls, as well as some extra new stuff. See the updated post here: <a href="https://app.roll20.net/forum/permalink/8390047/" rel="nofollow">https://app.roll20.net/forum/permalink/8390047/</a> Awesome stuff!