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 .
Advertisement Create a free account Compendium in Game, Join Today

Looking to make a query macro pulling directly from the sheet.

so I am using the current Pathfinder 1e character sheet by roll20. I know how to write out a query macro using the templates and inserting html in the qurey like this for example (a Save query). ?{Save | Fort,/w gm &{template:pc} {{type=save}} {{name=Fort Save}} {{roll=[[1d20+@{fortitude}]]}} | Reflex,/w gm &{template:pc} {{type=save}} {{name=Reflex Save}} {{roll=[[1d20+@{reflex}]]}} | Will,/w gm &{template:pc} {{type=save}} {{name=Will Save}} {{roll=[[1d20+@{will}]]}} } now i am looking to make a spellbook macro that will appear on token selection, as i have with the above macro. I should note that the above macro is being used on a token that is attached to the character sheet and on the macro I have "show on token" selected. I have found the id of the spells via dragging them into my macro bar and viewing the location id from there. When i make up a singular marco like this %{selected|repeating_spell-1_-MHcqz5iCFtGTmrJ1v7L_spell} it has no problem pulling the spell from the sheet but as soon as i put it into a query like this {Spellbook | 1st level | Magic Missle,%{selected |repeating_spell-1_-MHcqz5iCFtGTmrJ1v7L_spell} | Web Bolt,%{selected |repeating_spell-1_-MHcsGkHPbfublHZfCNA_spell} } It doesnt work. I am a novice in html and just started getting into macros like this. I was just looking at a way to not have to write a ton on a macro. I am also trying to help out my PCs by creating their spell books in macro so they dont have to open their sheet all the time.
ᐰndreas J.
Forum Champion
Sheet Author
The problem is likely in getting those html replacements right, and that you've made some minor mistakes there. What's the current output when you try using that one? Oh, and that macro will only work on the specific character you checked the spell's rowID for, as each sheet will have a unique ID for their rows, even if they'd have a identical entry as some other sheet. Might be a better idea to use reference the row number rater than the unique rowID. Scouring the documentation page and the main guide might help you out realizing what's the problem: <a href="" rel="nofollow"></a>
Abilities get expanded before Roll Queries. So it's breaking since it's trying to find an ability name, that due to the HTML replacements, extends to the end of your roll query. However allowing the ability to expand has it's own problems since it'll have a ton of characters that will break the roll query. Your best bet is to create a Chat Menu either for the full spell list or with a roll query to create a single ability button to avoid the problems with expanding an ability inside a roll query.
Thanks guys, the chat menus were a way better option and easier than trying to do a long drawn out query macro putting in each spell. Thanks again, I knew the forums would point me in the right direction.

Edited 1606004684
Sheet Author
If you are running the game, you might want to install the Universal Chat Menu script.&nbsp; It isn't in the script library, so you would have to copy/paste the code from the second post in that thread.&nbsp; It allows the GM to set up global macros for everyone to use.&nbsp; In the one Pathfinder 1 game I run, it makes things easy to access for the PC or NPC sheet.&nbsp; I assume players can set up their own versions as character abilities, but I haven't tried that (or had a player interested in customizing theirs). The various menu generating commands I use are in the second post on page 8 (the current last page).&nbsp; While it is nice to know how to set them up manually, the script can pull any roll button off the sheet for you without having to go through the bother of manual setup.&nbsp; Then you can leave manual setup for character specific things. Edit:&nbsp; If you aren't the game creator, but the person who is also has a Pro account, maybe they would be willing to install that script.