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

1559707253

Edited 1559742879
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Rollback issue was unfixable, sadly. On the plus side, I was gripped with a sudden superstition just before rolling back and saved the two menu codes externally. Things are looking really good. Only major issue I can see right now is that if a button name has parentheses in it, the parsing breaks. This is an excerpt from a lich and a demilich, one with the parentheses removed from "Legendary Resistance (3/day)": Without Parentheses: With Parentheses:
Tested it out, GiGs, and unfortunately running into the same issues. I'll provide some screenshots so you can see what all is occurring. First, gear. Here is the macro used and the menu as printed !chatmenu @{selected|character_id} {template:pc}{{charname=@{selected|character_name}}} {{type=ability}} {{smallname=Usable Items}} {{showchar=[1]}} {{descflag=1}} {{desc=CHATMENU}} --title:Consumables --repeating_gear|name|-rollShowGear|name=potion|quantity --repeating_gear|name|-rollShowGear|name=oil|quantity --repeating_gear|name|-rollShowGear|name=scroll|quantity --repeating_gear|name|-rollShowGear|special=consumable|quantity --title:Magic --repeating_gear|name|-rollShowGear|special=aura|quantity --title:Mundane --repeating_gear|name|-rollShowGear|special=usable|quantity --separator: | As you can see, the items with empty special fields are being printed in all three sections. Next, attacks. The original macro I used, which should function properly (I believe?) !chatmenu @{selected|character_id} {template:pc}{{charname=@{selected|character_name}}} {{type=ability}} {{smallname=Attacks}} {{showchar=[1]}} {{descflag=1}} {{desc=CHATMENU}} --title:Melee --repeating_attacks|atkname|fullattack|atktype=melee --title:Ranged --repeating_attacks|atkname|fullattack|atktype=ranged --title:Special --repeating_attacks|atkname|fullattack|atktype!melee|atktype!ranged --title:Basic --Melee|Ranged|Combat Maneuver,cmb --separator: | Here is the current macro, which prints the desired menu !chatmenu @{selected|character_id} {template:pc}{{charname=@{selected|character_name}}} {{type=ability}} {{smallname=Attacks}} {{showchar=[1]}} {{descflag=1}} {{desc=CHATMENU}} --title:Melee --repeating_attacks|atkname|fullattack|atktype=melee|atktype!- --repeating_attacks|atkname|fullattack|atktype=fob|atktype!- --title:Ranged --repeating_attacks|atkname|fullattack|atktype=ranged|atktype!- --title:Special --repeating_attacks|atkname|fullattack|atktype=bab|atktype!- --repeating_attacks|atkname|fullattack|atktype=- --repeating_attacks|atkname|fullattack|atktype=cmb|atktype!- --title:Basic --Melee|Ranged|Combat Maneuver,cmb --separator: |
1559726638

Edited 1559726814
GiGs
Pro
Sheet Author
API Scripter
Thanks, Seph, that gives me some specific names to test against.  Keith, I don't see your screenshot? Can you post the text for the button. I havent seen an error with parentheses: (Just noticed after posting this there's some parentheses in Seph's screenshot above, haha, could have saved myself some work.) Edit: are parenthesis only breaking on the non-button buttons, the ones that point to attributes, not buttons?
1559743010
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
That's weird. They were showing last night. I have uploaded them instead of using copy/paste. They should display now. And yes. The screenshots do show that the parsing only breaks on the non-button buttons. There are later buttons that to do show parentheses.
1559776886

Edited 1585103264
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
EDIT: I had Missed a few skills. The codes and screen shots are updated. Here are the displays now. I am so glad I saved these externally. NPC Code PC Code
I'm trying to get the number of times a spell is prepared to display but I can't figure out what to add at the end to make it work. I'm using the Roll20 for Pathfinder sheet and version 0.3.7 of the script. This is what I have so far. !chatmenu @{selected|character_id} {template:pc}{{charname=@{selected|character_name}}} {{type=}} {{smallname=Prepared Spells}} {{showchar=[1]}} {{descflag=1}} {{desc=CHATMENU}} --title:-Checks- --Concentration,caster2_concentration_roll|Caster Level,-RollCaster2Check --title:Cantrips --repeating_spell-0|spelldisplay|spell --title:Level 1 *(@{selected|caster2_spells_prepared_level_1}/@{selected|caster2_spells_total_level_1})* --repeating_spell-1|spelldisplay|spell|spellprepared --separator: | : It looks great but I can't get it to show that Magic Missle is memorized 2 times for instance. I assume that I need something after the end of this bit "--repeating_spell-1|spelldisplay|spell|spellprepared" but I can't figure it out. Has anyone figured that out? -Meldogs
1559928923
GiGs
Pro
Sheet Author
API Scripter
I'm going through one of my poor health patches right now, so havent been able to fix those bugs yet. Meldogs, I don't know if it'll be possible to show how many of each spell you have memorised. Each sheet records that differently, and that IIRC had some pretty weird things going in behind the scenes, and the code is obfuscated so its hard to figure out exactly what's going on. That said, if it's a simple number field, it should be possible, and i can see lots of situations where such a feature will be useful (like on gear lists, as well as spells prepared), so once I'm feeling better, I'll look into it. Just remember, the original purpose of the script is to provide quick and easy access to buttons to roll macros, not as a replacement for the character sheet itself. There will be some features it's just not beneficial to implement.
GiGs said: I'm going through one of my poor health patches right now, so havent been able to fix those bugs yet. Meldogs, I don't know if it'll be possible to show how many of each spell you have memorised. Each sheet records that differently, and that IIRC had some pretty weird things going in behind the scenes, and the code is obfuscated so its hard to figure out exactly what's going on. That said, if it's a simple number field, it should be possible, and i can see lots of situations where such a feature will be useful (like on gear lists, as well as spells prepared), so once I'm feeling better, I'll look into it. Just remember, the original purpose of the script is to provide quick and easy access to buttons to roll macros, not as a replacement for the character sheet itself. There will be some features it's just not beneficial to implement. Wow, somehow I managed to post that from my wife's account. Sorry about that. I understand GiGs. Thanks for the reply. Hope you get to feeling better. -Meldogs
Hope you get well soon GiGs!
1559941696
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Sorry to hear that GiGs.
1559943834
GiGs
Pro
Sheet Author
API Scripter
Thanks :)
1563947929
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
For anyone using my OGL Sheet macros, I had missed a few skills. The code and screenshots are updated.
1563951888
GiGs
Pro
Sheet Author
API Scripter
Great! I'm hoping to have some time next week to to a bit of refactoring of the code and add the remaining features requested. 
1564373965
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Here's a new one. This one was inspired by actual play, when a player character who was an ex-gladiator wanted to fight with a net. We could never remember the exact rules for a net in D&D. This is common with many items. How much does a backpack hold? What are the hit points of rope? These things are on the character sheet, but you don't always want to break immersion as the DM to ask the player. You want to sound like an authority and move the game on. This UCM produces a list of equipment on the character sheet. Each button will reveal the game notes about that piece of equipment, provided it has any. Most Compendium dropped equipment will have this information. As a bonus, it will display the weight of all equipment carried, and if your campaign uses encumbrance, will show the encumbrance level. If you don't use it, it will just leave a blank there. Note to Roll20. I spent a lot of time tearing my hair out over the Encumbrance attribute until I realized it wasn't working because the sheet spells it Encumberance with an extra "e"... Code: !chatmenu @{selected|character_id} {template:npcaction}{{rname=@{selected|character_name}}}{{name=Weight total @{selected|weighttotal} Encumbrance = @{selected|encumberance}}}{{description=CHATMENU}} --separator: |    --title:Equipment --repeating_inventory|itemname|itemcontent! Here is the output, and what it looks like if you click on a sample item, say rope. As before I am using this Stylus tweak to alter the appearance of the roll template:
1564374724
GiGs
Pro
Sheet Author
API Scripter
Nice work! and Note to Roll20. I spent a lot of time tearing my hair out over the Encumbrance attribute until I realized it wasn't working because the sheet spells it Encumberance with an extra "e"... I remember the frustration of discovering that while testing too!
1564401044

Edited 1564401126
Sr. K
Pro
Sheet Author
Thank you both, you are awesome. I'm following Keith path for the 5E OGL but using the atk template instead of the npcaction template in order to keep things small, and using several menus (in Spanglish).  
1564401388
GiGs
Pro
Sheet Author
API Scripter
That looks very nice
1564412031
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Very nice, Sr. K! I have to ask, are your Modifiers resolving properly? When I use them programatically, the flag toggles, but the actual modifiers don't happen. Could you post the code on your first chat menu?
1564416945

Edited 1564417958
Sr. K
Pro
Sheet Author
Thanks for your question, I didn't realize that, just the flags for the global damage modifiers, not the damage; but the global attack modifier seems to work properly. I was not able to create it properly with Universal Chat Menus and I used an individual menu with custom macros: !chatmenu @{selected|character_id} {template:atk}{{rname=@{selected|character_name}}}{{range=**Ataques**}}{{charname=PG: @{selected|hp}/@{selected|hp|max} · PG Temp: @{selected|hp_temp} }}{{desc=CHATMENU}} --separator: · : --title:Modifiers --@{selected|repeating_damagemod_$0attr_global_damage_name}:,Zephyr| **ON**,Mod1|**OFF**,Mod1off|@{selected|repeating_damagemod_$1attr_global_damage_name}:,marcar|**ON**,Mod2|**OFF**,Mod2off|@{selected|repeating_damagemod_$2attr_global_damage_name}: · **ON**,Mod3|**OFF**,Mod3off|@{selected|repeating_damagemod_$3attr_global_damage_name}:,Absorb| **ON**,Mod4|**OFF**,Mod4off --title:Atacks --repeating_attack|atkname|attack --title:Resources --@{selected|class_resource_name} *@{selected|class_resource}/@{selected|class_resource|max}|@{selected|other_resource_name} *@{selected|other_resource}/@{selected|other_resource|max}* The name of the mod calls the proper spell plus some other effects like Zephyr: !token-mod --set statusmarkers|!fluffy-wing /em corre como el viento y no provoca ataques de oportunidad. %{Selected|repeating_spell-1_$2_spell} ON and OFF are ChatSetAttr macros to set the flag: !setattr --silent --sel --repeating_damagemod_$0_global_damage_active_flag|1 /em concentra el viento en su arco. Edit: I found out  that the flag activation from the macro takes effect if you edit the damage modifier after, without touching the flag again. Weird but not useful since you have to reach the character sheet.
1564418019
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Thanks. That verifies that this is still a bug. sigh...
1564448040

Edited 1570260080
GiGs, have you had an opportunity to look into this issue yet? My players and I really love using the script btw! Here's the macros I have set up for use with the Pathfinder by Roll20 sheet. PC Chat Menus NPC Chat Menus Combat Traits and Abilities Not as clean as my 2E version, but condenses most of the NPC sheet into two macros: a text box with important traits and a chat menu with everything except spells. Prepared Spells ( caster1 / caster2 ) Only prints prepared spells. Spells (All) Spontaneous Spells ( caster1 / caster2 ) Ignores spells with the padlock emoji in the name. Spells (Prepared) Only prints prepared spells. Cure Spells (useful for clerics/oracles) Looks for all spells with the word 'cure' in the name; also ignores 'locked' spells with the padlock emoji in the name. Domain Spells ( caster1 / caster2 ) Looks for spells marked as Domain spells; useful for singling out spells granted by specific class features, such as a shaman's Spirit Magic. Special Actions Looks for the clapper board emoji in the notes of feats and features/traits; ignores any with the padlock emoji in the name. Skills Skills that require ranks to use will not be printed if the character has no ranks in those skills (doesn't apply to custom skills). Usable Items Consumables looks for 'oil', 'potion', and 'scroll' in the names of gear, or the word 'consumable' in the special field. Magic looks for the word 'aura' in the special field. Mundane looks for the word 'usable' in the slot field. Make sure you fill empty fields with something like 'none' otherwise the item will be printed in all three groups. Traits Barely counts as a chat menu, but some may find it useful. Also prints whatever is in the sheet's Notes field at the bottom.
1564448227
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Those are beautiful, Seph!
1564455669

Edited 1564456383
GiGs
Pro
Sheet Author
API Scripter
Seph said: GiGs, have you had an opportunity to look into this issue yet? Thanks for the reminder. If you've noticed any other bugs or feature suggestions (like Keith's about displaying attributes), now's the time to mention them :) Also, nice examples, Seph. I'm so happy people are putting this script to such great use. 
Thank you both! Thought I'd share them so other PF players who use your script can save some time and use ready-made menus :)
1564763127
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Feature request: Current behavior: If you put an ! sign on the end of button name, it wont look for a button, it will instead look for the named attribute, and create a button to display its contents.  Languages,languages!| Requested behavior: Allow more than one attribute to be included in the report.  Typical purpose: I am creating a spellbook reference macro. The OGL sheet does not display spell info well for players to examine. They either have to open character sheet, flip open their spell and read it, which makes it hard to go through many spells quickly. Or they actually caste the spell to read the full statblock, or look it up in the Compendium. Suggested Syntax: Use the & character to string together values for the report. They could be separated by carriage returns so each begins a new line. Alternatively & could string them together with the default separator for the macro, and && could put each on a new line. In this way a spell report could show school, range, area of effect, etc. The whole spell without actually casting. This same syntax could even be used in the button name, so that the Chat menu could display a button that displays name, range, concentration, etc. (within the limits of how the data is stored in the field). This could have other uses for creative button names. Here is a screenshot of my menu and output currently. It could report so much more:
1564831019
GiGs
Pro
Sheet Author
API Scripter
Interesting idea. I'll look into it when I have time (another project has eaten up all my spare time lately). I like that you have thought through to possible syntax. it does sound sensible.
1564843636
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
GiGs said: Interesting idea. I'll look into it when I have time (another project has eaten up all my spare time lately). I like that you have thought through to possible syntax. it does sound sensible. Oh, I have no end of ideas. Just limited ability to realize them. But I'm working on that. Thanks.
1567373353
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Back with another feature request (unless there's a way to do this already). Is there a way to pass a regular API command button through the code? I have a main chat menu for most common game attributes, a second for all social stuff (languages, proficiencies, bonds, etc), and a third for equipment. I'd like to have buttons for the last two to appear in the main chat menu, but trying to include one breaks the macro.
Would it be possible to support repeating items with inline rolls in the name? For example, for the spell Magic Missile, the number of missiles increases as the player levels up. I show this in the name of the spell as 'Magic Missile x3' and just manually increase it every few levels, but I don't always remember to do this. So instead I tried naming it 'Magic Missile x[[1+floor((@{caster1_level}-1)/2)]]', so my level 5 sorcerer's spell menu would ideally show 'Magic Missile x3'. But the API crashes when I try calling the spell menu. Not absolutely needed, just curious if it's doable :)
1567578883
GiGs
Pro
Sheet Author
API Scripter
Keith, I do like that suggestion. To be clear, you're asking for the ability to embed one or more buttons that call UCM, in a UCM macro? Thats an interesting idea, Seph. That might be going a bit too far, but I'll investigate it.  I have to make a major refactoring of the code to support these suggestions, but they (and keith's previous one) all relate to the same issue (the way text is parsed), so it might be possible to do them all in one swoop when i finally am able. 
1567581927

Edited 1567581964
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
GiGs said: Keith, I do like that suggestion. To be clear, you're asking for the ability to embed one or more buttons that call UCM, in a UCM macro? Actually, I meant the ability to pass any API command button through the UCM. Then it could be used to call another UCM, or execute any other command. For example, you could have a section of a UCM that can run things like !longrest (for the Roll20 Dnd 5e sheet). Perhaps an unparsed section could be passed through if surrounded by a special character or character sequence, like: <<[button name](!some api command)>> or <<[button name](~character ability)>> Such an escaped section of the code could be used for a lot of different things, like displaying an image: <<[image](image url)>> or even just text: << here is some *italic* text>> I'm using << >> for an example, but the escape codes could be anything.
1567583223
GiGs
Pro
Sheet Author
API Scripter
That's a pretty good idea.
1567605455
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
It came to me when I thought about adding long and short rest API commands to the main character UCM. I also have a UCM that handles equipment, and one for social data and proficiencies. It would be cool to provide hooks for those.
Hey GiGs, another question: Would it be possible to add a second value that, if specified, is printed on each button in parentheses? Example: A spell menu would have a section for 1st-level spells is defined as --repeating_spell-1|spelldisplay (spellprepared)|spell|spellcaster=1|spellprepared (maybe not that exact syntax) so if the spell Mage Armor is prepared for 2 castings, the button would print as
1568388059
GiGs
Pro
Sheet Author
API Scripter
Did you are someone else ask for a similar feature before? i remember saying no to something very similar, but I'm looking at at now and thinking it could be doable. It might make the parsing logic a bit more complicated than I want to deal with, but I'll look at it when i get a chance.
GiGs said: Did you are someone else ask for a similar feature before? i remember saying no to something very similar, but I'm looking at at now and thinking it could be doable. It might make the parsing logic a bit more complicated than I want to deal with, but I'll look at it when i get a chance. Thanks for giving this some of your time GiGs. Regards, Meldogs
GiGs said: Did you are someone else ask for a similar feature before? i remember saying no to something very similar, but I'm looking at at now and thinking it could be doable. It might make the parsing logic a bit more complicated than I want to deal with, but I'll look at it when i get a chance. If it's something you could do without much trouble or risk of over-complication, I would love for this to be added! But it's not a direly needed feature, so I understand if you choose to forgo it. Thanks for looking into it :)
Hey GiGs, I started getting a new error when trying to use this for Pathfinder Second Edition by Roll20 sheet. I can use the chat menu when it's an ability on a character, but it doesn't work as a global macro. It doesn't crash the API, but I get this error in chat. TypeError: Cannot read property 'substring' of undefined I'm working around by just calling the character ability in the global macro, but do you know why this could be happening? I haven't had this issue with the Pathfinder by Roll20 sheet or the Fifth Edition OGL sheet.
1568856820
GiGs
Pro
Sheet Author
API Scripter
I don't know off hand, can give the chat menu you are using (the macro version), and what button triggers it? Has the pathfinder sheet been updated this week? Could be a change in the sheet has made some chat menu buttons break. I don't really think that, since its working for the ability version, just considering all options.
!chatmenu @{selected|character_id} {template:rolls} {{charactername=@{selected|character_name}}} {{header=@{selected|npc_type} @{selected|level}}} {{subheader=}} {{info01_name=**^{traits}**}} {{info01=@{selected|alignment} @{selected|size} @{selected|traits}}} {{info02_name=Languages}} {{info02=@{selected|languages}}} {{info03_name=AC}} {{info03=@{selected|armor_class}; @{selected|armor_class_notes}}} {{info04_name=HP}} {{info04=@{selected|hit_points}/@{selected|hit_points|max}; @{selected|hit_points_notes}}} {{info05_name=Immunities}} {{info05=@{selected|immunities}}} {{info06_name=Weaknesses}} {{info06=@{selected|weaknesses}}} {{info07_name=Resistances}} {{info07=@{selected|resistances}}} {{info08_name=Speed}} {{info08=@{selected|speed} feet; @{selected|speed_notes}}} {{desc=CHATMENU}} --title:Senses --Perception @{selected|perception}; @{selected|senses},PERCEPTION --title:Skills --Acrobatics @{selected|acrobatics}; @{selected|acrobatics_notes},ACROBATICS,acrobatics|Arcana @{selected|arcana}; @{selected|arcana_notes},ARCANA,arcana|Athletics @{selected|athletics}; @{selected|athletics_notes},ATHLETICS,athletics|Crafting @{selected|crafting}; @{selected|crafting_notes},CRAFTING,crafting|Deception @{selected|deception}; @{selected|deception_notes},DECEPTION,deception|Diplomacy @{selected|diplomacy}; @{selected|diplomacy_notes},DIPLOMACY,diplomacy|Intimidation @{selected|intimidation}; @{selected|intimidation_notes},INTIMIDATION,intimidation|Medicine @{selected|medicine}; @{selected|medicine_notes},MEDICINE,medicine|Nature @{selected|nature}; @{selected|nature_notes},NATURE,nature|Occultism @{selected|occultism}; @{selected|occultism_notes},OCCULTISM,occultism|Performance @{selected|performance}; @{selected|performance_notes},PERFORMANCE,performance|Religion @{selected|religion}; @{selected|religion_notes},RELIGION,religion|Society @{selected|society}; @{selected|society_notes},SOCIETY,society|Stealth @{selected|stealth}; @{selected|stealth_notes},STEALTH,stealth|Survival @{selected|survival}; @{selected|survival_notes},SURVIVAL,survival|Thievery @{selected|thievery_notes}; @{selected|thievery_notes},THIEVERY,thievery --title:Lore --repeating_lore|lore_name|LORE|lore --title:Ability Checks --STR @{selected|strength_modifier},STR|DEX @{selected|dexterity_modifier},DEX|CON @{selected|constitution_modifier},CON|INT @{selected|intelligence_modifier},INT|WIS @{selected|wisdom_modifier},WIS|CHA @{selected|charisma_modifier},CHA --title:Items --repeating_items-worn|worn_item|action --title:Interaction Abilities --repeating_interaction-abilities|name|action --title:Saving Throws --Fort @{saving_throws_fortitude},FORT|Ref @{saving_throws_reflex},REF|Will @{saving_throws_will}; @{selected|saving_throws_notes},WILL --title:Automatic and Reactive Abilities --repeating_free-actions-reactions|name|action --title:Melee Strikes --repeating_melee-strikes|weapon|ATTACK-DAMAGE-NPC --title:Ranged Strikes --repeating_ranged-strikes|weapon|ATTACK-DAMAGE-NPC --title:Offensive or Proactive Abilities --repeating_actions-activities|name|action --separator: | I think it was updated, but this is my first time trying a global macro with this sheet, so I don't know if it might have been different before the update. I'm having the same issue with every code I've tried, but this was the first one I tested. I tried this exact code as both an ability and a global macro, but for now I've changed the macro to call the ability so it just has %{Macro|NPC-Menu}
!chatmenu @{selected|character_id} {template:rolls} {{charactername=@{selected|character_name}}} {{header=Strikes}} {{desc=CHATMENU}} --title:Melee --repeating_melee-strikes|weapon|ATTACK-DAMAGE --title:Ranged --repeating_ranged-strikes|weapon|ATTACK-DAMAGE --title: Maneuvers --repeating_actions-activities|name|action|name!🔒|traits=Attack|traits!- --separator: | One of the other chat menus I've tested with.
1568862368
GiGs
Pro
Sheet Author
API Scripter
 I've changed the macro to call the ability so it just has %{Macro|NPC-Menu} As an ability, what did the code look like? Or did you just activate it by clicking the button on the abilities frame? I cant check it tonight, I'm really struggling to think of a reason it would fail as an ability, but still work as a macro. Normally its the other way round, and require html entities. I do notice a lot of semi-colons in the first one, which would be the first thing I'd check (I'm rusty with the code), but if they are an issue, it would cause it to fail both as an ability and a macro.
1568864270

Edited 1568864427
The code for the ability and macro were exactly the same. It's the ability that works. The chat menu code doesn't work as a macro, so my workaround is making a macro that has no code except the ability call. I've made minor changes since sharing the code above, so I'll re-share it. So right now the code used in the ability called NPC-Menu on the character called Macro is !chatmenu @{selected|character_id} {template:rolls} {{charactername=@{selected|character_name}}} {{header=@{selected|npc_type} @{selected|level}}} {{subheader=@{selected|alignment} @{selected|size} @{selected|traits}}} {{info01_name=Languages}} {{info01=@{selected|languages}}} {{info02_name=AC}} {{info02=@{selected|armor_class}; @{selected|armor_class_notes}}} {{info03_name=HP}} {{info03=@{selected|hit_points}/@{selected|hit_points|max}; @{selected|hit_points_notes}}} {{info04_name=Immunities}} {{info04=@{selected|immunities}}} {{info05_name=Weaknesses}} {{info05=@{selected|weaknesses}}} {{info06_name=Resistances}} {{info06=@{selected|resistances}}} {{info07_name=Speed}} {{info07=@{selected|speed} feet; @{selected|speed_notes}}} {{desc=CHATMENU}} --title:Senses --Perception @{selected|perception}; @{selected|senses},PERCEPTION --title:Skills --Acrobatics @{selected|acrobatics}; @{selected|acrobatics_notes},ACROBATICS,acrobatics|Arcana @{selected|arcana}; @{selected|arcana_notes},ARCANA,arcana|Athletics @{selected|athletics}; @{selected|athletics_notes},ATHLETICS,athletics|Crafting @{selected|crafting}; @{selected|crafting_notes},CRAFTING,crafting|Deception @{selected|deception}; @{selected|deception_notes},DECEPTION,deception|Diplomacy @{selected|diplomacy}; @{selected|diplomacy_notes},DIPLOMACY,diplomacy|Intimidation @{selected|intimidation}; @{selected|intimidation_notes},INTIMIDATION,intimidation|Medicine @{selected|medicine}; @{selected|medicine_notes},MEDICINE,medicine|Nature @{selected|nature}; @{selected|nature_notes},NATURE,nature|Occultism @{selected|occultism}; @{selected|occultism_notes},OCCULTISM,occultism|Performance @{selected|performance}; @{selected|performance_notes},PERFORMANCE,performance|Religion @{selected|religion}; @{selected|religion_notes},RELIGION,religion|Society @{selected|society}; @{selected|society_notes},SOCIETY,society|Stealth @{selected|stealth}; @{selected|stealth_notes},STEALTH,stealth|Survival @{selected|survival}; @{selected|survival_notes},SURVIVAL,survival|Thievery @{selected|thievery_notes}; @{selected|thievery_notes},THIEVERY,thievery --title:Lore --repeating_lore|lore_name|LORE|lore --title:Ability Checks --STR @{selected|strength_modifier},STR|DEX @{selected|dexterity_modifier},DEX|CON @{selected|constitution_modifier},CON|INT @{selected|intelligence_modifier},INT|WIS @{selected|wisdom_modifier},WIS|CHA @{selected|charisma_modifier},CHA --title:Items --repeating_items-worn|worn_item|action --title:Interaction Abilities --repeating_interaction-abilities|name|action --title:Saving Throws --Fort @{saving_throws_fortitude},FORT|Ref @{saving_throws_reflex},REF|Will @{saving_throws_will}; @{selected|saving_throws_notes},WILL --title:Automatic and Reactive Abilities --repeating_free-actions-reactions|name|action --title:Melee Strikes --repeating_melee-strikes|weapon|ATTACK-DAMAGE-NPC --title:Ranged Strikes --repeating_ranged-strikes|weapon|ATTACK-DAMAGE-NPC --title:Offensive or Proactive Abilities --repeating_actions-activities|name|action --separator: | and the code for the macro called NPCMenu is %{Macro|NPC-Menu} The semicolons were added after I noticed the issue, replacing commas and parentheses that were breaking the menu's buttons. Also the error isn't always the same. Right now it's TypeError: c is undefined even though, as far as I can tell, I'm doing the same thing.
If you have time another day, PM me and I can invite you to the campaign I'm testing it in.
1568868223

Edited 1568868355
GiGs
Pro
Sheet Author
API Scripter
Sure, PM me an invite, and I'll join when i see it. Once you promote me to GM, I'll see what I can figure out. In the meantime, I'd suggest stripping out all the button sections, and adding one in at a time and testing to see which work.
1569169348
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I can't remember if this has been reported, but parentheses in a feature name break the output of the script. A feature that has (2/day) or (Recharge 1-2) will destroy the output.  The workaround is of course to delete the parentheses, but if they could be stripped out during the assembly of the menu, the character sheet could be preserved intact and be used "out of the box" more readily: Hmm. This also appears to be the case if a feature has parentheses in the description area. This may only affect items that use the Feature,feature! syntax.
1569314638
GiGs
Pro
Sheet Author
API Scripter
That's the same issue as previous points, related to text parsing. I need to incorporate one of Aaron's functions to html-ise any problematic characters in the input. I don't know when I'll be able to do it. The last couple of months have been one emergency after another here, but trust me, i love this script, and I'll get to it when i can. 
1569334214
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I love it too. :) Whenever you can spare the time. I'll keep posting suggestions and reports against that day.
1570256096

Edited 1583132692
EDIT: 1/13/20—Updated to work with the latest PF2E sheet update. I've made some updates to my menus for the Pathfinder by Roll20 sheet, and also built some menus for the new Pathfinder Second Edition by Roll20 sheet! Also, I'm making use of keith's Stylus script for making the buttons smaller :) Also GiGs, I solved that issue I was having before so you don't have to worry about checking it out. It was just an overlook on my part. The name of each file includes the emoji I use as the macro name in parentheses. For any interested in using them: Combat Prints melee strikes, ranged strikes, and actions with the Open, Stance, Rage, Flourish, Incapacitation, Press, or Attack traits. Compact NPC Sheet Prints the entire NPC sheet (minus the initiative button; see below) into chat in a compact form. Includes spells at the bottom. Items have been moved down to keep Strikes closer to the top of the menu. Avoid commas in the sheet itself , especially in Senses, as this will break part of the menu (I replace them with semicolons). Spells (Spontaneous Caster) This one only works as a character ability for some reason. Prints Innate, Focus, Cantrips, and levels 1-10. Ignores spells with the padlock emoji in the name. I'm using the default template because the current PF2E template's threshold before switching to scroll is just too restrictive for a menu that can get more than 10 lines long. You can use this for any character with Innate or Focus Spells. Menu for prepared casters coming soon. NPC Initiative Not a menu, but still relevant I think. Since PF2E allows you to use different skills for the initiative roll, a simple Initiative token action doesn't quite suffice. This prompts you with a drop-down query to select the skill being used. Unfortunately the query must be answered twice; each has a different output and I don't know of a way to consolidate them. The roll also adds the character's bonus to the relevant skill as a decimal in the case of a tie. (You can remove that part if you prefer the method of "Enemies always win ties") Defenses This uses Macros using commands for the ChatSetAttr script. They're included in the link, separated by two lines of backslash and include the name used in the associated button (the emojis above each macro). Shows armor class, hit points, shield stats, Save and Skill DCs, and resistances and immunities. The emojis represent the following: [hourglass] temp HP, [skull] Dying level (macro button) , [bandage] Wounded level (macro button ) , [shield] AC w/ shield, [hammer] shield's Hardness, [spanner] shield's Broken Threshold, [heart] shield's HP (macro button ). The Menu script is used for the Resistances, since they are repeating items on this sheet and you can leave notes in them. Saving Throws and Ability Checks Saves show the numeric proficiency, plus the actual bonus in parentheses. 2 trained | 4 expert | 6 master | 8 legendary Abilities show the ability score, with the modifier in parentheses. Skills Prints all skills, including Perception , and shows proficiency same as for Saves; groups all Lore skills separately (can't print their proficiency since they're repeating items). Actions and Activities Prints the following groups: One-Action, Two-Action, Three-Action (filter the Action field for the play, fast-forward, and skip-forward emojis, respectively; I use those since they're similar to the action icons used in the CRB) Free Action, Reaction (filter based on the checkbox ticked in the item) Exploration, Downtime (filter the Traits field for the words Exploration and Downtime, respectively) Other (looks for the names of specific activities that don't have an action type or traits relevant to the other groups; some non-basic activities may require you to add the name in this section's filter) All of these groups ignore items with the padlock emoji in the name. Filter Actions by Trait Type a trait into the query, and the menu prints all actions with that trait in the Traits field . Filter Actions by Skill Select a skill from the drop-down query, and the menu prints all actions with that skill in the Source field . Inventory Looks for the word "Usage" in item descriptions. Items with an empty description get printed to, so if nothing else just put any letter or number in the description for items you don't want getting printed. Remove this filter if you want it to show full inventory. Initiative This one is just a normal chat menu, as it uses Abilities in a character named 'macro' for the buttons. Each Ability is named after one of the listed skills (lower case). The first macro here is the Initiative Menu, followed my the individual skill macros to use as Abilities in the 'macro' character. These are all separated by two lines of double backslash in the link. The roll also adds the character's bonus to the relevant skill as a decimal in the case of a tie. (You can remove that part if you prefer the method of "Enemies always win ties") Character Details Miscellaneous details for the character. Archetype is found by filtering Class Feats descriptions for the word "Archetype".
1570264674
GiGs
Pro
Sheet Author
API Scripter
That looks like a great set of menus.  Seph said: Also GiGs, I solved that issue I was having before so you don't have to worry about checking it out. It was just an overlook on my part. That's a relief. It was a bit mystifying.