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

Drop Down Macros Choose Attribute/Skill

Hi, about to have my third session on roll20 and looking to expand the ease for which my players can roll. This game is taking places with World of Darkness rules, so having the computer count the successes is a plus. I have been using the following macro (primarily) for my players to make their rolls. /roll {?{How many d10|1|2|3|4|5|6|7|8|9|10}d10!}>6f1 Thank you to Ziechael for providing that. In World of Darkness dice pools are made (primarily) by combining an attribute and a skill. So as GM I will tell the players what two things to check on their character sheet, they will add them up, and then they will make the roll. What I'd like to do is skip the step of having them do the adding themselves and just directly pick the attribute/skill from the drop down. The closest I've been able to come is /roll {?{Attribute Selection|Strength,@(Selected|Strength}|Stamina,@{Selected|Stamina}|Wits,@{Selected|Wits}}d10!}>6f1 This is off consulting some old forum posts and using my limited knowledge. It calls up the drop down menu but only displays Strength and doesn't work anyway. I'd like players to call up the macro but instead of selecting drop down dice, they use the drop down to select the attribute/skill. Ideally, they would be able to select both at the same time and the system to add the successes together. Thank you for your help.
1585981852
GiGs
Pro
Sheet Author
API Scripter
This can be done. Bear in mind though that a dropdown where players choose stat and skill might not be the best way - because most storyteller games have like 30 skills, so having a dropdown to select that would involve a lot of scrolling and be tedious. Honestly the original macro is probably best - where you tell the players what to roll, they look at their sheets for the scores, run the macor and enter the total. This also allows them to add in the effect of wounds and other modifiers without issue. But if you do want to proceed, your altered formula has an error in it.  @(Selected|Strength} should be @{Selected|Strength} notice the curly bracket at the start. Fix that and your formula works properly. You oculd do the combination like /roll {?{Attribute Selection| Strength,@{Selected|Strength}| Stamina,@{Selected|Stamina}| Wits,@{Selected|Wits}}d10!}>6f1 + {?{Skill Selection| Brawl,@{Selected|Brawl}| Fighting,@{Selected|Fighting}}d10!}>6f1 Bear in mind you can put a linebreak after every | in a query  to break things up for reading clarity. Dont put linebreaks inside attribute calls though - dont do @{selected| stamina} that wont work - just queries not attributes. Another approach would be to have a chat menu listing a button for every skill, and when clicked it prompts for the attribute used. You only need one dropdown on any roll, and could even reorder the attribute dropdowns for each so the most likely attribute for that skill is always at the top.
GiGs, First I want to say thanks for spotting that error and helping me out. Yes, it's a large drop down menu, but the players do seem to appreciate it. The only issue I've noticed is that when one of the things has a value of zero (pretty much always the skill), it doesn't do the roll. Easy enough to work around in those cases. Another approach would be to have a chat menu listing a button for every skill, and when clicked it prompts for the attribute used. You only need one dropdown on any roll, and could even reorder the attribute dropdowns for each so the most likely attribute for that skill is always at the top. I'm not sure what you mean here. This sounds interesting, but not sure I fully understand what you are suggesting. Thank you again.
1586430808
GiGs
Pro
Sheet Author
API Scripter
For this method, you'd need to create a macro for each skill, so it's a bit of work initially. They would look like /roll [[@{selected|Brawl} + ?{Attribute Selection|Strength,@(Selected|Strength}|Stamina,@{Selected|Stamina}|Wits,@{Selected|Wits}]]d10!>6f1 or if you want to make them look prettier &{template:default} {{name=@{selected|character_name} rolls Brawl}} {{Skill=@{selected|Brawl} }} {{Stat= ?{Attribute Selection| Strength,@(Selected|Strength}| Stamina,@{Selected|Stamina}| Wits,@{Selected|Wits} } }} {{Roll=[[ [[ @{selected|Brawl} + ?{Attribute Selection}]]d10!>6f1]] }} Note that the attribute selection query has a line break at every selection after the |. That's the only place you can put a linebreak, and doing so helps make the code more readable. Once you have all thirty skill macros created, names Brawl, Streetwise, or whatever, you have two options: Set them as token macros, so they'll appear on the top left of player's screens when they select a token. one click to select the skill, and another to select the attribute. Though 30 buttons across the top of the screen might be a bit much. Create a chat menu macro. The rest of this post will describe that. Dont bother creating all 30 to begin with - just create 2 or 3 for testing, to see if you like it. To create this macro, you need to use the code for entering a button in chat. In the wiki, these are called API Command Buttons , but despite using the term API, they are usable by free users.  The code is slightly different depending on whether you are calling a macro, a character ability, or a button from a character sheet. We'll use the macro syntax here. The code for a single button would look like [Brawl]( !
# Brawl) The weird set of characters before the # are a html entity, and are needed for macro buttons to work. If you have a macro with these in, once you save the macro, never reopen it - or they'll be erased. It;s a good idea to make a copy of your code elsewhere in case you ever need to edit the macro. The bit inside the [ ] is a descriptive label - it can be anything. The name inside the () is the macro name and must be spelled exactly the same as the macro name. So lets say you create a macro for several buttons. You could do it like this: /w @{selected|character_name} &{template:default} {{name=Skill Button Menu}} {{Physical Skills = [Brawl](!
#Brawl) [Melee](!
#Melee) [Shoot](!
#Shoot) {{Mental Skills=some mental skill buttons}} {{Social Skills=some social skill buttons}} Copy and paste that into a macro, select a token and run the macro. The owner of that token will get a menu of buttons whispered to them (to avoid clogging up the chat for others), and clicking the buttons will roll the skill. You can organise the skill buttons into groups, as they are on the character sheet. You can make this macro a token action, so its always available. It takes a bit of setting up, but chat button menus are very handy.
Hi Cris, sorry about the english. Well, I have been using the following macro for my players in Changeling (same universe) to make their rolls, but remember to correct the names of attributes and abilities for your sheet template: &{template:default} {{name=@{selected|name} is rolling dices}} {{Roll ?{Attribute|Intelligence, @{selected|Intelligence}|Wits, @{selected|Wits}|Resolve, @{selected|Resolve}|Dexterity, @{selected|Dexterity}|Strength, @{selected|Strength}|Stamina, @{selected|Stamina}|Presence, @{selected|Presence}|Manipulation, @{selected|Manipulation}|Composure, @{selected|Composure}} + ?{Skill|Academics, @{selected|Academics}|Computer, @{selected|Computer}|Crafts, @{selected|Crafts}|Investigation, @{selected|Investigation}|Medicine, @{selected|Medicine}|Occult, @{selected|Occult}|Politics, @{selected|Politics}|Science, @{selected|Science}|Athletics, @{selected|Athletics}|Brawl, @{selected|Brawl}|Drive, @{selected|Drive}|Firearms, @{selected|Firearms}|Larceny, @{selected|Larceny}|Stealth, @{selected|Stealth}|Survival, @{selected|Survival}|Weaponry, @{selected|Weaponry}|AnimalKen, @{selected|AnimalKen}|Empathy, @{selected|Empathy}|Expression, @{selected|Expression}|Intimidation, @{selected|Intimidation}|Persuasion, @{selected|Persuasion}|Socialize, @{selected|Socialize}|Streetwise, @{selected|Streetwise}|Subterfuge, @{selected|Subterfuge}} dice for [[[[ (?{Attribute} + ?{Skill} + ?{Positive Modifier|0} - ?{Negative Modifier|0})]]d10>7!]] Successes }} Important detail, even the zero rating skills must be listed on the sheet. From luck tests i use &{template:default} {{name=@{selected|name} is trying to get lucky}} {{and he made it [[d10>10!]] Successes }} And you can use the same idea for iniciative, perception, explosion 9, 8, etc. Christopher R. said: Hi, about to have my third session on roll20 and looking to expand the ease for which my players can roll. This game is taking places with World of Darkness rules, so having the computer count the successes is a plus. I have been using the following macro (primarily) for my players to make their rolls. /roll {?{How many d10|1|2|3|4|5|6|7|8|9|10}d10!}>6f1 Thank you to Ziechael for providing that. In World of Darkness dice pools are made (primarily) by combining an attribute and a skill. So as GM I will tell the players what two things to check on their character sheet, they will add them up, and then they will make the roll. What I'd like to do is skip the step of having them do the adding themselves and just directly pick the attribute/skill from the drop down. The closest I've been able to come is /roll {?{Attribute Selection|Strength,@(Selected|Strength}|Stamina,@{Selected|Stamina}|Wits,@{Selected|Wits}}d10!}>6f1 This is off consulting some old forum posts and using my limited knowledge. It calls up the drop down menu but only displays Strength and doesn't work anyway. I'd like players to call up the macro but instead of selecting drop down dice, they use the drop down to select the attribute/skill. Ideally, they would be able to select both at the same time and the system to add the successes together. Thank you for your help.
Hi Lars, Gigi I just want to say thank you for your replies. I'm slowly working in the more advanced concepts. I might have more questions in the future on this, but I felt bad for not saying thank you for such detailed responses.
Hi guys. I'm trying to make a similar macro and I used the initial one in this thread as it seemed to be close to what I need, though I am not having much luck getting it just right. It may not even be possible? /roll {d20+?{Attribute Selection|Strength,@{Selected|Strength}|Dexterity,@{Selected|Dexterity}|Constitution,@{Selected|Constitution}}} I want to take the above snippet and change it up a bit. I want it to print out the selection and then be able to re-use "Attribute Selection" later to find the actual math. If I print out the above, I will get the actual score for the selected attribute, so I have to take out the ",@Selected|xyz} bit. Then, I want to use that "word" to find the numbers associated with the stat. I tried this below, but it seems to be trying to use the "Attribute Selection" before I've even made my selection: ?{Attribute Selection|Strength|Dexterity|Constitution} [[d20+@{Selected|?{Attribute Selection}}-10/2]] As soon as you click the macro it tells you there is nothing for "<token name>|?{Attribute}", before you even select an option. After you select an option, nothing happens. Any advise?
1590121501

Edited 1590121643
Kraynic
Pro
Sheet Author
If you use the exact same query question more than once, it will automatically reuse your answer from the first instance of that question.  One way to do labels in a roll is to put single square brackets around what you want your label to be.  Using your top example, you might try /roll {d20+?{Attribute Selection|Strength,[Strength]@{Selected|Strength}|Dexterity,[Dexterity]@{Selected|Dexterity}|Constitution,[Constitution]@{Selected|Constitution}}} and see if that does what you are looking for.
1590121964
GiGs
Pro
Sheet Author
API Scripter
This @{Selected|?{Attribute Selection} cannot be done on roll20. You can never use partial attributes and build them up from parts, because of roll20's order of operations. When a macro runs, roll20 scans the macro for all attribute calls, does them all immediately, then processes queries. So in the above case, it would look for an attribute called @{Selected|?{Attribute Selection}}, which can not exist, and then try to do the query ?{Attribute Selection}. Obviously it never reaches the query because it crashes on the attribute call. There are two ways to do what you want, the hard way and the easy way. The hard way is put everything you need doing on each row of the query.  Something like Frodo makes a ?{Attribute Selection| Strength,Strength roll /roll 1d20+@{Selected|Strength}| Dexterity, Dexterity roll| /roll 1d20+@{Selected|Dexterity}| Constitution,Constitution roll /roll 1d20+@{Selected|Constitution}} If your roll is really  simple, like above, its pretty easy. But if you include any special characters (} , or | ), outside of attribute calls, you'll have to look into the world of html entity substitution . That way lies madness (with your only hope forum user Ziechael to lead you back to sanity - the expert at html macros). The easy way  is to explore Chat Menus . In this case, you print to chat a button for each option, and then just click the button you want. You can whisper the menu of buttons so it doesnt clutter chat, and it leads to much, much simpler macros.
1590129948

Edited 1590130071
Oosh
Sheet Author
API Scripter
That way lies madness (with your only hope forum user Ziechael to lead you back to sanity - the expert at html macros). What? I feel like Ziechael's html journeys travel in the opposite direction to the one you have suggested. I've been having ampersand nightmares since I found these forums.... dear god, can an ampersand function as an Otherworldly Patron???
1590130260
GiGs
Pro
Sheet Author
API Scripter
andrew p. said: That way lies madness (with your only hope forum user Ziechael to lead you back to sanity - the expert at html macros). What? I feel like Ziechael's html journeys travel in the opposite direction to the one you have suggested. I've been having ampersand nightmares since I found these forums.... dear god, can an ampersand function as an Otherworldly Patron??? Lol, you have a point there.
1590136024
Ziechael
Forum Champion
Sheet Author
API Scripter
I honestly have no idea what they are talking about... there is no madness involved in the 'Way of the Html', only enlightenment and happiness... Also, here is a 'no html' required uber-simplified version of GiGs example: Frodo makes a ?{Attribute Selection|Strength,Strength roll: [[ @{selected|strength}|Dexterity,Dexterity roll: [[ @{selected|dexterity}|Constitution,Constitution roll: [[ @{selected|constitution}} + 1d20 + ?{Modifier|0} ]] Note how the query only contains the bits that you want to change, everything else is left outside of the query to avoid duplication and prevent the need for 'messy' or 'madness inducing' code :)
GiGs! That is great! Thank you! Using your example and link I tried both ways, I like them both. I am torn which way I want to flush out and make the prettiest lol
1590172599
GiGs
Pro
Sheet Author
API Scripter
You're welcome :)