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

Help with Drop-Down Prompts

I'm fairly new to Roll20 and am running my first game (of Deadlands: Classic) this weekend. I'm trying to get my head around macros, but I have hit a wall. I'm trying to make a macro for every trait that contains a drop-down menu of all the abilities. For example, say I want Laura to roll for Lockpicking. I click on Laura's token, click the macro titled Deftness, and select Lockpicking from the drop-down menu. I have figured out how to do this if I only ever want to roll for Laura. But what if I want to roll for Phillip? That's where I thought  "selected" came into play, but I can't get it to work correctly. Everything works separately but if I try to put %{Selected|Lockpicking} into the value placement in the drop-down list, it thinks it's part of the label, not the value. I've tried everything I could think of but I'm stumped. Is there a way to fix this?
1496355227
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Can you post your deftness macro as well as your lockpicking macro? I think you're probably running into an issue with needing to html encode some characters, but I don't know for sure without seeing the macros.
So this is the macro I was using to test the drop down prompts: /r ?{Which skill are you using? | Lockpickin, 3d6 | Shootin, 4d10} And this is the macro I was using to test simply rolling a particular ability: /r %{Selected|Lockpickin} But when I try to put them together like this: /r ?{Which skill are you using? | Lockpickin, %{Selected|Lockpickin} | Shootin, 4d10} It shows me the picture below and then when I try using that option, I get a message saying there was an error in my formula.  I've tried using the html replacements and haven't had much luck. Maybe I'm putting them in the wrong place?
1496369035
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Ah, these are sheet generated abilities aren't they? Does the Deadlands:Classic sheet use roll templates (to give nicely formatted rolls)? The problem here is that the sheet roll buttons contain the problem characters, but you most likely can't edit their content. You aren't going to be able to do this via a query, but you can make a chat menu of  ability command buttons to do this.
I was planning on building each ability individually myself. So Lockpickin corresponds to the ability I manually created in the NPC's profile. That ability's command, in this case is {2d6!!}k1. Should I be using the html alternatives inside the abilities themselves? That I haven't tried yet.  But I'll give the ability command buttons a shot. Thanks!
1496372024
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Oh, then you can do this, but the abilities will not work unless accessed from the correct depth of roll query. So, advanced roll query 101: Problem characters and their replacements are commas (,), bars (|) (|), end curly brace (}) (}) Never replace problem characters that are part of an ability or attribute call (e.g. %{selected|Lockpickin} or @{selected|Strength}) For each roll query that you have in front before getting to the actual ability, you must escape the characters an additional time, usually by replacing & with &. So, your query will look like this: /r ?{Which skill are you using? | Lockpickin, %{Selected|Lockpickin} | Shootin, %{Selected|Lockpickin}} Your lockpickin macro will look like this: {2d6!!}k1 So, it's certainly possible, but the ability command button method will be much more straightforward as there is no encoding required.
Kelsey B. said: {2d6!!}k1 You could remove the curly brackets, as they are not necessary in this situation. Also, I might recommend saving skill values/ratings as Attributes, rather than Abilities, to save space on your Attributes & Abilities Tab.
Thank you, Scott! I'll keep playing around and figure out the best way for me to get what I'm looking for. Silvyre, the problem with that is the way the Deadlands: Classic character sheet is set up, my lockpickin level is 2, for example. Then I look at my deftness and see my type is a d6. So I roll 2d6. Is there a way to combine the two different attributes this way?
Kelsey B. said: Silvyre, the problem with that is the way the Deadlands: Classic character sheet is set up, my lockpickin level is 2, for example. Then I look at my deftness and see my type is a d6. So I roll 2d6. Is there a way to combine the two different attributes this way? Try this out: @{lockpickinlvl}d@{defdtype}!!k1
That's awesome! Thanks Silvyre!