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 .
×

Help with creating macro with palyer inputs & prompts

1690142822

Edited 1690143119
Hello everyone, I'm trying to create a macro roll for a game I want to run. I'm creating the system on my own and it uses a d100. Players need to roll beneath a certain threshhold. That threshhold is a combination of several factors: Player Skill level(00-75), if the player has a specialization (+5 or 0), Equipment Level (from +15 to -5) and the Challenge Level (+20 to -20). I tried the following (simplified from my macro): ?{WhichSkill?|Skill 1|Skill 2|Skill 3}                                         // Just a simple output which skill is rolled. /roll 1d100 <=                                                                          //Start of the comparison of a 1d100 roll that needs to be smaller or equal to the addition ?{Skill Level |0}                                                                    // The player needs to input his Skill Level; +?{Specialisation?|Yes,5|No,0}                                            // Add the bonus for the Specialisation, if any +?{Equipment Level?|Option 1, 15|Option 2,-5}                 // Add bonus/substract penalty of the Equipment Level +?{Challenge Level?|Option 1, +20|Option 2,-20}            // Add bonus/substract penalty of the Challenge Level If I do that, it just shows something like this: Skill 1 rolling 1d100 <=30  // This is the only thing that is actually compared; the 30 is the Skill Level I typed in. ( 3 ) 3 +5 +-5 +-20 Edit: Here's a screenshot of that: Does anybody know how I need to edit this, that it works properly? Preferably with showing if the roll was a success or a failure?
1690146282
Gauss
Forum Champion
Hi Faenwulf, Without using code of any kind, could you please state what you'd like the macro to do? That is generally a better starting off point.
Hey, yeah, in my head it's all pretty easy. The general idea is this: Roll 1d100, then compare that roll to a fixed value. If the roll is below that value, it is a SUCCESS, if it is higher, it's a FAILURE. The problem is, that the value is supposed to be composed of information the player gives the system: He has to put his skill value into a prompt. He then has to choose something from three drop down menus from three different prompts (so 4 promts total, one after the other). The system is supposed to add all of this together to create the value that is compared to the 1d100. Thanks!
1690148449
Gauss
Forum Champion
This is simple: " Roll 1d100, then compare that roll to a fixed value. If the roll is below that value, it is a SUCCESS, if it is higher, it's a FAILURE." You need to elaborate more on this: " The problem is, that the value is supposed to be composed of information the player gives the system: He has to put his skill value into a prompt. He then has to choose something from three drop down menus from three different prompts (so 4 promts total, one after the other). The system is supposed to add all of this together to create the value that is compared to the 1d100." What, specifically, is the player putting into the system?
1690151613

Edited 1690152194
GiGs
Pro
Sheet Author
API Scripter
Faenwulf said: I tried the following (simplified from my macro): ?{WhichSkill?|Skill 1|Skill 2|Skill 3}                                         // Just a simple output which skill is rolled. /roll 1d100 <=                                                                          //Start of the comparison of a 1d100 roll that needs to be smaller or equal to the addition ?{Skill Level |0}                                                                    // The player needs to input his Skill Level; +?{Specialisation?|Yes,5|No,0}                                            // Add the bonus for the Specialisation, if any +?{Equipment Level?|Option 1, 15|Option 2,-5}                 // Add bonus/substract penalty of the Equipment Level +?{Challenge Level?|Option 1, +20|Option 2,-20}            // Add bonus/substract penalty of the Challenge Level Roll20 doesn't recognise <=; the < operator is the same as <=, and > is the same as >=. When you use < it compares only against the very next number. You need to combine the rest into a single quantity, something like /roll d100<[[ ?{Skill Level |0} +?{Specialisation?|Yes,5|No,0} +?{Equipment Level?|Option 1, 15|Option 2,-5} +?{Challenge Level?|Option 1, 20|Option 2,-20} ]]  The inline roll brackets [[ ]] evaluate everything inside them first, then you can compare the roll against that total. You also have this in your queries +?{Challenge Level?|Option 1, +20|Option 2,-20} If Option 1 is chosen, you'd get ++20, and that will cause the calculation to crash. That second + has to be removed. This will return two outputs: 0 Sucesses = failure, and 1 success = success.
Thank you GiGs! That = was the problem then, it works now as it's supposed to. I tried it with the inline roll brackets, but that didn't give me any output at all, so I removed them again before posting.
1690204108
GiGs
Pro
Sheet Author
API Scripter
Yay! Roll20's error checking, especially with dice rolls, could be improved a lot.
Yeah, it could stand to be more specific in its error messages. That said, with the plethora of character sheets nowadays, I have barely used macros, let alone made my own, for a couple of years now.