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

[5e] Menu based Macro

I'm curious if it's possible to make a macro that essentially displays a menu of buttons that perform actions. For example: If I run the macro "Spell Menu", it would whisper a message to me that has buttons for each spell and clicking on the button will run the repeating spell attribute.
I don't think so but that would save a lot of needed time
1464979097

Edited 1464979115
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
This is indeed possible. See the  Ability Command buttons section of the wiki for all the details. This is a feature that is available to everyone, but is fairly new (in one of the last few updates). As an example, here's the Eldritch Scion Magus' spellbook macro from the pathfinder game I'm running: /w @{character_name} &{template:pf_generic} {{header_image=@{header_image-pf_spell}}}{{character_name=@{character_name}} {{character_id=@{character_id}}} {{name=Spells}} {{**Level 0 | Infinite**}} {{[@{Selected|repeating_lvl-0-spells_$0_name}](~Selected|repeating_lvl-0-spells_$0_roll) [@{Selected|repeating_lvl-0-spells_$1_name}](~Selected|repeating_lvl-0-spells_$1_roll) [@{Selected|repeating_lvl-0-spells_$2_name}](~Selected|repeating_lvl-0-spells_$2_roll) [@{Selected|repeating_lvl-0-spells_$3_name}](~Selected|repeating_lvl-0-spells_$3_roll) [@{Selected|repeating_lvl-0-spells_$4_name}](~Selected|repeating_lvl-0-spells_$4_roll) [@{Selected|repeating_lvl-0-spells_$5_name}](~Selected|repeating_lvl-0-spells_$5_roll)}} {{**Level 1 | [[@{spellclass-0-level-1-spells-per-day}]]/[[@{selected|spellclass-0-level-1-spells-per-day|max}]]** }} {{[@{Selected|repeating_lvl-1-spells_$0_name}](~Selected|repeating_lvl-1-spells_$0_roll) [@{Selected|repeating_lvl-1-spells_$1_name}](~Selected|repeating_lvl-1-spells_$1_roll) [@{Selected|repeating_lvl-1-spells_$2_name}](~Selected|repeating_lvl-1-spells_$2_roll)[@{Selected|repeating_lvl-1-spells_$3_name}](~Selected|repeating_lvl-1-spells_$3_roll)}} {{**Level 2 | [[@{spellclass-0-level-2-spells-per-day}]]/[[@{selected|spellclass-0-level-2-spells-per-day|max}]]**}} {{[@{Selected|repeating_lvl-2-spells_$0_name}](~Selected|repeating_lvl-2-spells_$0_roll) [@{Selected|repeating_lvl-2-spells_$1_name}](~Selected|repeating_lvl-2-spells_$1_roll) [@{Selected|repeating_lvl-2-spells_$2_name}](~Selected|repeating_lvl-2-spells_$2_roll)}} Gives: As the output. Happy rolling.
That's perfect! Thanks! Obviously I'll have to adjust the specifics, but I think I can handle that.
1464980671

Edited 1464980842
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Yep, pretty much that whole macro is pathfinder specific (or at least roll20 pathfinder sheet specific). As an addendum, it is possible to call other macros and abilities with the buttons, but it requires using special characters. See the API button link that is in the ability command section for details on what you need to add in front of the '#'  replace the # with .
The ability buttons is actually exactly what I was looking for.
1464987100
Kryx
Pro
Sheet Author
API Scripter
If you're using the shaped sheet this is built in via %{NAME|shaped_spells}
Is there a way to specify "prepared" spells?
Daryl P. said: Is there a way to specify "prepared" spells? I add buttons for the spells I prepare, and delete the buttons once I prepare new spells.
1465030758
Kryx
Pro
Sheet Author
API Scripter
Daryl P. said: Is there a way to specify "prepared" spells? Still not sure which sheet you're using, but if it's the shaped sheet the prepared spells are more pronounced. See
1465156526

Edited 1465158320
I'm unsure which sheet it is. It says shaped, but it looks different than the other shaped sheets I've seen. Here is the spells section:
Additional question, is it possible to add multiple attributes to the label? For instance, if I want a label saying "Acrobatics X" where X is the total bonus. I've tried the following, but can't seem to get it to work. I've tried various uses of parentheses and brackets but I can't get it to display anything other than each value separately. [Acrobatics @{selected|acrobatics_prof_exp}+@{selected|dexterity_mod}+@{selected|acrobatics_bonus}](~selected|Acrobatics_Check)
1465161269
Kryx
Pro
Sheet Author
API Scripter
I would recommend updating to the latest shaped sheet (the process isn't simple though). It had everything you want here.
Unfortunately, the GM will not be doing that.
1465165307
Kryx
Pro
Sheet Author
API Scripter
The values aren't added unless you put them in a inline roll [[value1 + value2]] No idea if that'll work in the button syntax though. Unfortunate that your GM won't update. That sheet has been unsupported for almost 6 months now. Lots of new features on the updated version. Best of luck figuring this out!
Kryx said: [[value1 + value2]] I tried that and it break the ability command button so it looks like [Acrobatics 6(~name|acrobatics_check). Thanks for you help anyway
Kryx said: The values aren't added unless you put them in a inline roll [[value1 + value2]] No idea if that'll work in the button syntax though. Command Button labels are really picky about inline rolls. [[[ @{selected|acrobatics_prof_exp} + @{selected|dexterity_mod} + @{selected|acrobatics_bonus} ]] Acrobatics](~selected|Acrobatics_Check) At the very beginning is the only place I've reliably been able to get inline rolls to "work".