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

Can't get a drop down box to work inside of an ability.

Hi,  I've been trying to get a drop down box to work inside of an ability on the D&D 4e character sheet. The goal of it is something like a 'Skill Check' ability which brings up a dropdown so the user can select the attribute, roll it and output a single roll instead of a huge block of all the checks.  Here is the original ability, but I wasn't able to make it work and display correctly. &{template:default}{{name=All Attributes}} {{[[1d20+@{strength_mod_level}]] =STR Check}} {{[[1d20+@{constitution_mod_level}]] =CON Check}} {{[[1d20+@{dexterity_mod_level}]] =DEX Check}} {{[[1d20+@{intelligence_mod_level}]] =INT Check}} {{[[1d20+@{wisdom_mod_level}]] =WIS Check}} {{[[1d20+@{charisma_mod_level}]] =CHA Check}} Any help would be appreciated?
1724976320

Edited 1724976335
Gauss
Forum Champion
Hi Spoony,  Please post the macro you are trying to create, the one that is not working so far. 
Hi Gauss, This is inside of the ability entry in the D&D4e character sheet. ?{Attribute check|STR, &{template:default}{{name=STR Check}} {{[[1d20+@{strength_mod_level}]] =STR Roll}} |DEX, &{template:default}{{name=DEX Check}} {{[[1d20+@{dexterity_mod_level}]] =DEX Roll | CON, &{template:default}{{name=CON Check}} {{[[1d20+@{constitution_mod_level}]] =Con Roll}}}
1724977680

Edited 1724977688
Gauss
Forum Champion
Please replace the code with: &{template:default} {{name=Test}} {{This is a test=[[1d20+5]]}} Run that and post the results from chat please.  After running that, also please click the chat box and click the up arrow on your keyboard, copy what appears in the chat box and paste that here. 
@{REDACTED|power-1-macro} Simple commands like this is fine, but completely break when trying to put several of these in a dropdown box.
1724979934
Gauss
Forum Champion
Spoony said: Simple commands like this is fine, but completely break when trying to put several of these in a dropdown box. That is fine, I needed to make sure we weren't in a "template inside a template" situation. There are over 1000 character sheets on Roll20, I don't know all of them so this test was to make sure we were not in that situation.  What that tells me is your query is breaking due to control characters.  Example:  ?{Queryname|Option1,Lets break this!}|Option 2,We still here?} So it should put out a dropdown menu of Option 1 and Option 2, but it wont because here is what Roll20 sees:  ?{Queryname|Option1,Lets break this!} That "}" In Lets break this tells the query "you are done".  So to get around it you have to use HTML substitution. Here is a guide on that . If you need further help please let me know.  P.S. Your query is actually pretty simple which is why I am pointing you to the guide on Nesting Queries. If it were any more complicated I would be telling you to use Chat Menus instead. 
Thank you for the advice, I will give it a try when I get off work :)
1725007592

Edited 1725007761
Gauss
Forum Champion
I had some free time to do the conversion for you, here you go:  &{template:default} ?{Attribute check|STR, {{name=STR Check}} {{STR Roll= [[1d20+5]]}}|DEX, {{name=DEX Check}} {{DEX Roll= [[1d20+2]]}}|CON, {{name=CON Check}} {{CON Roll= [[1d20+4]]}}} Note: you will need to substitute the attributes back in for the +5, +4, +2 bonuses. I don't know which sheet you are using so I kept it simple for my testing.  Attributes do NOT get the HTML substitution treatment.  Also, I flipped around the language of the roll during my testing (CON Roll = [[1d20...]] instead of [[1d20...]] = CON Roll). You can fix that if you'd like, I just tend to stick to my standard setups when performing testing.  Also, I moved the template section out of the query, there was no reason for it to be reproduced in each query section. 
I called off work :) Thank you very much for the help! it works perfectly now.
I do have a follow up request if you would be so kind. I would like to call these character sheet abilities from a macro on the macro bar as the end goal is to have all abilities available from just a few common buttons that all the players can share e.g. Attribute checks, Standard Actions, Free actions.. I am trying to call this ability contained within  the character sheet named REDACTED  (as pictured from my previous post) from a macro on the bar but I am getting  this error,  No ability was found for %{REDACTED|Attribute Check} This is the command I am trying to use. %{REDACTED|Attribute Check} Is there a way to solve this?
The sheet you're using doesn't call the "powers" saved in that field as abilities, but as attributes. Try @{ REDACTED| power-1-macro}, instead.
Thank you very much! you have solved the issue for me. :) I'm not a fan of the 4e char sheet honestly. The 5e char sheet was much more straight forward.