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

[Macro Help] Calling Attributes w/ Queries

1472189949

Edited 1472191138
Andrew C
Marketplace Creator
Basically I've got some created Attributes (Att1, Att2, Att3...) and I am looking to build a single Roll Query to bring each up. EDIT: I realise it should be "@" not "%", but anyway... So the logic would run: [Start Macro] Which Attribute Do you Want? [Drop Down] [Run Attribute from Drop Down]. ?{Which Attribute?|Att1, %{Att1}|Att2,%{Att2}|...} is the basic form, but I need to do the HTML substitutions into it right? HTML Substituted: ?{Which Attribute?|Att1.%{Att1}|Att2, %{Att2}|...} Is that looking right to people?
1472193876
Silvyre
Forum Champion
Andrew said: I need to do the HTML substitutions into it right? Not on [Attribute] calls. Check out: Advanced Usage for Roll Queries ?{Which Attribute?|Att1, @{Att1}|Att2,@{Att2}|...} If this doesn't work, check out: Roll Query Troubleshooting
1472195010
Andrew C
Marketplace Creator
Thanks. Just hate faffing around in a Macro feeling like I'm just creating as many bugs as I might 'solve'.
1472195816
Andrew C
Marketplace Creator
So, I tried it just then, and it spat back basically stupid stuff. 1) It didn't give me a drop-down, but a long text box 2) When I hit Submit, it repeated the Macro Code, and then told me errors about expecting certain symbols and things after executing one of the Attributes.
1472196587
Silvyre
Forum Champion
What are the values of the Attribute calls @{Att1} and @{Att2}? If you're not testing them from an Ability, did you provide these Attribute calls with keywords? (e.g. selected)
1472197012

Edited 1472197093
Andrew C
Marketplace Creator
They're D&D3.5E Templated Rolls For example: @{Att1} is &{template:DnD35StdRoll} {{name=@{selected|token_name} }} {{skillcatflag=true}} {{check=Balance check:}} {{checkroll= [[ 1d20 +8+[[@{selected|npcdex-mod}]]+ ?{Modifiers:|0} ]] }} If I just make the Ability call the Attribute directly (i.e. Ability1 = @{Attribute 1}) then it works fine, but setting up a Query to filter the Attributes doesn't work.
1472199308

Edited 1472199369
Silvyre
Forum Champion
Andrew said: &{template:DnD35StdRoll} {{name=@{selected|token_name} }} {{skillcatflag=true}} {{check=Balance check:}} {{checkroll= [[ 1d20 +8+[[@{selected|npcdex-mod}]]+ ?{Modifiers:|0} ]] }} This is an example of a value that needs to be subject to character replacements, as stated by Roll Query Troubleshooting . If you run into difficulty with the character replacements, feel free to use these tips to help post your progress to the forum.
1472202790
Andrew C
Marketplace Creator
Aaaaah so the replacement needs to happen in the Called Stuff rather than in the thing doing the call!
1472212652
Andrew C
Marketplace Creator
Now I'm getting stranger behaviour... The rolls appear in the Templates appear in the Chat Log but don't appear in the Chat Box. Can a Mod/Tech take a look?&nbsp;<a href="https://app.roll20.net/editor/setcampaign/1606869" rel="nofollow">https://app.roll20.net/editor/setcampaign/1606869</a>
1472229841
Diana P
Pro
Sheet Author
Andrew, I have a set of all-in-one macros which work with the 3.5 sheet in my collected spells document ( here ). Basically for those, I substituted the various macros into the query and made the appropriate html character replacements.&nbsp; Which reminds me, I need to update some of them for the additional note fields I've since added to the sheet. :) You can also use buttons to give you a menu in chat to call the buttons like: /w @{selected|character_name} &{template:DnD35StdRoll} {{ name = Skill List }} {{ [Appraise](~selected|appraisecheck) = [Balance](~selected|balancecheck) }} {{ [Bluff](~selected|bluffcheck) = [Climb](~selected|climbcheck) }} {{ [Concentration](~selected|concentrationcheck) = [Craft (@{selected|craft1name})](~selected|craft1check) }} {{ [Craft (@{selected|craft2name})](~selected|craft2check) = [Craft (@{selected|craft3name})](~selected|craft3check) }} {{ [Decipher Script](~selected|decipherscriptcheck) = [Diplomacy](~selected|diplomacycheck) }} {{ [Disable Device](~selected|disabledevicecheck) = [Disguise](~selected|disguisecheck) }} {{ [Escape Artist](~selected|escapeartistcheck) = [Forgery](~selected|forgerycheck) }} {{ [Gather Information](~selected|gatherinformationcheck) = [Handle Animal](~selected|handleanimalcheck) }} {{ [Heal](~selected|healcheck) = [Hide](~selected|hidecheck) }} {{ [Intimidate](~selected|intimidatecheck) = [jump](~selected|jumpcheck) }} {{ [Knowledge (Arcana)](~selected|knowarcanacheck) = [Knowledge (Engineering)](~selected|knowengineercheck) }} {{ [Knowledge (Dungeoneering)](~selected|knowdungeoncheck) = [Knowledge (Geography)](~selected|knowgeographycheck) }} {{ [Knowledge (History)](~selected|knowhistorycheck) = [Knowledge (Local)](~selected|knowlocalcheck) }} {{ [Knowledge (Nature)](~selected|knownaturecheck) = [Knowledge (Nobility)](~selected|knownobilitycheck) }} {{ [Knowledge (Religion)](~selected|knowreligioncheck) = [Knowledge (the Planes)](~selected|knowplanescheck) }} {{ [Listen](~selected|listencheck) = [Move Silently](~selected|movesilentcheck) }} {{ [Open Lock](~selected|openlockcheck) = [Perform (@{selected|perform1name})](~selected|perform1check) }} {{ [Perform (@{selected|perform2name})](~selected|perform2check) = [Perform (@{selected|perform3name})](~selected|perform3check) }} {{ [Profession (@{selected|profession1name})](~selected|profession1check) = [Profession (@{selected|profession2name})](~selected|profession2check) }} {{ [Profession (@{selected|profession3name})](~selected|profession3check) = [Ride](~selected|ridecheck) }} {{ [Search](~selected|searchcheck) = [Sense Motive](~selected|sensemotivecheck) }} {{ [Sleight of Hand](~selected|sleightofhandcheck) = [Spellcraft](~selected|spellcraftcheck) }} {{ [Spot](~selected|spotcheck) = [Survival](~selected|survivalcheck) }} {{ [Swim](~selected|swimcheck) = [Tumble](~selected|tumblecheck) }} {{ [Use Magic Device](~selected|usemagicdevicecheck) = [Use Rope](~selected|useropecheck) }} this macro is also in the document. You are more than welcome to use any of these. Clearing the chat log (from the campaign setting page; not the in-game one) might fix the roll/template issue (or at least it tends to do so for me when I break things) but make sure you save anything you might need before you do so.
1472252961

Edited 1472253309
Andrew C
Marketplace Creator
So from looking at it Diana, yours makes a big table of the skills which can then be run from the table. I was hoping to have the filtering happen in a Drop Down. Mostly because there are no real skill options on an NPC/Monster. It means I can't then for instance have a Leopard make a Jump Check as the GM. I am adding them in as Attributes and hoping to call them from a single Token Ability. Click Panther, click Skill Check Macro, choose Skill from list, Output Skill Check in Template form Thank you for access to that working file too.
1472253219
Silvyre
Forum Champion
Andrew, I have a set of all-in-one macros which work with the 3.5 sheet in my collected spells document ( here ). Basically for those, I substituted the various macros into the query and made the appropriate html character replacements. Here's a link to Diana's dropdown Roll Query macro for skills.
1472253513
Andrew C
Marketplace Creator
I was looking at the wrong section mostly, and I see the core error was calling the templates instead of calling the contents of the templates. with that realisation I should have far fewer struggles.