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

Using a drop-down selection to call out a skill check

I'm sure I'm making this more complex than it is.  I made a drop down macro to select a token skill and roll the appropriate dice.  I want to use the skill they selected and and make up their skill check.  It will come from 1 attribute, 1 trait and 1 skill.  So basically I want it to look like; X's Skill test (for the title) XXX (variable) Skill Test Skill Check = XX Here is my code so far; &{template:default} {{name=@{selected|token_name}'s Skill-Test}}  {{[[1d10-1]][[1d10-1]][[1d10-1]] ?{Skill|  Athletics, Athletics Skill-Test:| CloseCombat, CloseCombat Skill-Test.| Command, Command Skill-Test.| Computer, Computer Skill-Test:| Fixer, Fixer Skill-Test:| Knowledge, Knowledge Skill-Test.| Medical, Medical Skill-Test.| Observation, Observation Skill-Test.| Persuade, Persuade Skill-Test.| Pilot, Pilot Skill-Test.| PowerArmor/Mech/Tank, PowerArmor/Mech/Tank Skill-Test.| Psi-Power, Psi-Power Skill-Test.| Resistance, Resistance Skill-Test.| ShipSystems, ShipSystems Skill-Test:| Splicer, Splicer Skill-Test:| Stealth, Stealth Skill-Test.| Survival, Survival Skill-Test.| Weapons/Advanced, Weapons/Advanced Skill-Test.| Weapons/Basic, Weapons/Basic Skill-Test.} }}  {{Skill Check= [[@{selected|BODY} +@{selected|Strength} +@{selected|CloseCombat}]]}} That last line contains what I want it to do but for each skill.  Thanks for any Help.
1593388553
GiGs
Pro
Sheet Author
API Scripter
It looks like you can move the }} part out of the query, since its repeated in every section. That avoids an error that breaks queries, so its a good thing. Whats this for just before the query? {[[1d10-1]][[1d10-1]][[1d10-1]]&nbsp; Here's one way to do it &amp;{template:default} {{name=@{selected|token_name}'s Skill-Test}}&nbsp; {{?{Skill| Athletics,Athletics=&nbsp; [[@{selected|BODY} +@{selected|Strength} +@{selected|CloseCombat}]]| fill in extra skills here Weapons/Basic,Weapons/Basic=[[@{selected|BODY} +@{selected|Strength} +@{selected|CloseCombat}]]}}&nbsp; Chances are you want to make a fancier layout. Before you start messing, read this:&nbsp; <a href="https://wiki.roll20.net/Macros#Advanced_Usage_for_Roll_Queries" rel="nofollow">https://wiki.roll20.net/Macros#Advanced_Usage_for_Roll_Queries</a>
That is my skill check roll.&nbsp; I'm messing around with a d1000 system.&nbsp; I have read that link but I will read it again, actually I probably need to read it a number of times.&nbsp; I'll try out your code.&nbsp; Thank you very much for the time and help.
1593390824
GiGs
Pro
Sheet Author
API Scripter
Can you describe how the skill check works, so we can incorporate it into the template?
It's a little radical.&nbsp; I'm rolling a d1000 but just the tens &amp; ones digits are giving me a percentile roll to check against a skill.&nbsp; For the most part it is a d100 system but the one hundreds digit will be used for other mechanics.&nbsp; It's basically saving an additional die roll.&nbsp; Each skill is made up of three factors like I said earlier so I want those three factors to show along with the roll so you can see your roll plus your skill check number.&nbsp; So if you have a skill check number of 60% and you roll 837 on your roll you succeed because we are using the last two digits of the roll - 37 is less than 60 so you succeed.&nbsp; I'm not explaining it great but hopefully you can get where I'm going.
1593391924
GiGs
Pro
Sheet Author
API Scripter
You'll need to explain it in full if you want us to be able to tell you how to do it in roll20. For example, I dont see what the 8 is doing in the above roll, and why it isnt a completely separate roll? Though if its a complex mechanic with multiple ways to use the same die roll, you probably cant do it in roll20 without using an API script.
I understand, it's a little unusual.&nbsp; The three digits will be part of an overall mechanic.&nbsp; If the last 2 numbers are a match, it will be a critical success or failure depending on your skill.&nbsp; If the first 2 numbers are a match it will trigger it a special stunt, skill or bonus.&nbsp; If all 3 numbers are a match, that can trigger further effects.&nbsp; I imagine it needs to be an API to get everything out of it that I want but that is beyond my skills so I'll hoping to take it as far as I can.
1593393786
GiGs
Pro
Sheet Author
API Scripter
Yes, that will definitely need to be an API script. All I think you can do is just show the dice roll and let people interpret it. You could add something like {{Dice Roll=[[1d10-1]][[1d10-1]][[1d10-1]]}}
1593418166

Edited 1593418240
Ziechael
Forum Champion
Sheet Author
API Scripter
(As a side note, unless the 3d10 to simulate a d1000 is required you could just as easily in this wonderful digital world use:) {{Dice Roll=[[1d1000]]}}
1593424363
GiGs
Pro
Sheet Author
API Scripter
The problem with that, is Jeff wants to use each die separately, and d1000 will change the individual dice: if you roll under 100 it wont show the first die at all, and an unlikely result of 1000 will change the first die to a 10. Yes, we know that first die is always a 0, but with this system they want to see all three dice as they are rolled.
1593431870
Ziechael
Forum Champion
Sheet Author
API Scripter
Oh, I get that, I just like breaking people out of the standard dice options... nothing finer in my experience than rolling a good d38 :) Also, I should have put [[1d1000-1]] to truly mirror the expected range.
Yeah, I'm trying to do some tricky stuff with the d1000.&nbsp; At the table it will be easy but I want to have it work for roll20.&nbsp; I probably need to look at how some d100 systems do their rolls.&nbsp; It's basically what I'm doing with the other d10 tacked on up front to give me a triple match, a first two match and use it separate for damage.&nbsp; I'm just trying to do something different for a game I'm bouncing around in my head.&nbsp; I appreciate all the help!
1593469205
GiGs
Pro
Sheet Author
API Scripter
If you're creating your own character sheet, you can likely make a custom rolltemplate to do some of the work. It'll be clunky in the design, probably require a lot of repeated code, but the user wont see it.
Here is what a done for an attack roll using the same concept.&nbsp; You read the tens &amp; ones as a percent to see if you hit.&nbsp; The hundreds place die is damage for the same hit.&nbsp; If there was a first &amp; second digit match, that would mean something.&nbsp; If there was a 2nd &amp; 3rd digit match, that would mean something.&nbsp; If all 3 were a match, that would mean something really good or bad depending.&nbsp; I was going to handle the matches outside of the die roll, I just wanted to explain the theory behind all of this. &amp;{template:default} {{name=@{selected|token_name}'s Melee-Attack}} [[ {[[1d10-1]] +1 +@{selected|melee-mod}}]] [[d10-1]][[d10-1]] {{Attack = $[[0]] $[[2]] $[[3]] to hit}}&nbsp; {{Damage = $[[1]] }} {{Score= [[ @{selected|BODY}+ @{selected|Strength}+@{selected|CloseCombat}} ]]}}