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

Syntax hell

I have a macro on a character sheet for Ironclaw that amounts to: /roll {@{will-select}+@{select_mark-Leadership}+@{career-select}}kh1 When I replace the keep highest roll with the target number of success syntax like so: /roll {@{will-select}+@{select_mark-Leadership}+@{career-select}}>4 Roll20 returns the following error: Only one roll expression is allowed in a single sub-roll expression success check. I'm at a loss what I'm missing or a way to brute force the function call in such a way that it's understood.
first off I'm pretty sure that you don't have the right number of {} sets ... I'll skim through this again and read it out ... when you are trying to find the syntax error you should always replace every variable with a constant for testing.
It looks like when you do keep highest 1 it can check each of the choices but when you change it to the greater than 4 it is adding them all together and deciding you are making multiple rolls where you shouldn't ... it would be much easier to figure out if you put it in a format with either all number representations or you wrote out pseudo code (like English sentences) for the parts in side the {} braces.
1439273141

Edited 1439273155
Literally the only thing that changed was "kdh1" (which did work) becomes ">4". Still good advice I should have tried and didn't, Thanks. :) That said? "/roll {d8+d8+d8}kh1" Works. "/roll {d8+d8+d8}>4" Does not work.
okay ty give me one sec i will solve this
Jonah L. said: It looks like when you do keep highest 1 it can check each of the choices but when you change it to the greater than 4 it is adding them all together and deciding you are making multiple rolls where you shouldn't ... it would be much easier to figure out if you put it in a format with either all number representations or you wrote out pseudo code (like English sentences) for the parts in side the {} braces. That inspires a way to make it work, after a fashion. (Even if I do have to hang my head in shame that target number of success is a simpler function to write.) "/roll {d8+d8+d8}>4" Does not work. However, this does. /roll [[{d8}>4]]+[[{d8}>4]]+[[{d8}>4]] I'll say thank you and just continue to hang my head in shame.
{d8+d8+d8}kh1 is an option [[d8+d8+d8]]>4 is an option the greater than part wants to add them all up than check the {} braces are trying to role seperate dice and than check each on against each other for the highest one. If you want the right way to make this work I need a better idea of what you are trying to accomplish :).
1439274574

Edited 1439274666
The problem is solved, but as you asked? The exact problem is this. In Ironclaw you get a number of dice based based on what your trying to do, and your dice pool. In your dice pool you have carrier dice (how good you are at your job), stat dice(dice associated with one of for stats), your marks in a given skill (how good you are at a specific task), and race dice(species by the book, and some species are really good at certain tasks) I was attempting to write macro for the Rebuke spell ability. To use the attack you add your will dice(a stat dice), and leadership(a skill dice). Any number you scored above 3 counts as a success. The more successes you have, the better off you are. ("Will, Leadership vs. 3", by the book.) So, I roll a d8 + d8 + d8. A d8 Will dice, a d8 for my leadership skill, and a third d8 because I'm a cleric(Almoner, by the book) which means I can claim my carrier dice as "class skill"(carrier dice as a bonus) for Leadership. I needed to roll each and count the number of any that rolled above 4. So ... I wanted d8+d8+d8 greater equal to or greater then 4. {d8+d8+d8}>4. (Can't make it {3d8}>4 as I'm having to pool different stats from the character sheet written as "d(X)") "{d8+d8+d8}>4" As I only need to count if it's a success, a binary 1 or 0? /roll [[{d8}>4]]+[[{d8}>4]]+[[{d8}>4]] I total Roll20 to roll "{d8}>4" three times, writing out a literal "1" or "0" as the result with the inline tags [[ ]]. Then add the results (a one or zero). It's a resource intensive way to do what should already work, but... it works.
LOL as soon as I started reading I figured out your problem ... you want to actually check for every role to be over 3 and there is a way to do that much easier than what you wrote ... for example you can do a 3d8 roll it just isnt written how you are thinking .... [[3d8>4]] would give you a number equal to how many successes there are ... it would be like 3d8>4 you roll a 1 a 4 and a 6 it would give a response of 2
<a href="https://wiki.roll20.net/Dice_Reference" rel="nofollow">https://wiki.roll20.net/Dice_Reference</a> scroll down to target/success portion
you can than compare the answer to a number for another target success to see if you have a 1 or higher and move on :)
you can just put a macro in a macro to accomplish what you want exactly so if you have a macro roll for the number of success than have it check that number against a &gt;1 it should give you the 1 or 0 options
this kinda works maybe this will help not sure but glad you can move forward [[[[3d8&gt;4]]&gt;1]]
Well it was probably for my own knowledge now but the proper syntax is actually [[{3d8&gt;4}kh1]] and it can only give you a 1 or a 0 :)
I wrote the Iron Claw sheet. &nbsp;I don;t know if you are using it, but just to be on the safe side, is there anything wrong with the buttons?
1439354885

Edited 1439373753
Greetings sir. Not a thing. There's just limits to what can sanely be included in the character sheet without including all possibilities. I'm just&nbsp; one of those silly ADD people who like to customize. For example adding these macros as a token actions: &{template:default} {{name=Rebuke}} {{Range=Short(12)}} {{Attack=Will, Leadership vs. 3}} {{Attack Roll=[[{@{will-select},@{select_mark-Leadership},@{select_species-Leadership},@{select_career-Leadership}}&gt;4]] Successes}} {{Effect=Resist with Mind, Will, Presence vs. 3 Damage +0, Penetrating , Sweep Near(4) Counters Unholy}} -OR- &{template:default} {{name=Claw Attack}} {{Range=Close(1)}} {{Attack=Body, Species, Brawling vs. defense}} {{Attack Roll=[[{@{body-select}+@{species-select}+@{select_mark-Brawling}+@{select_species-Brawling}+@{select_career-Brawling}+d8}kh1]]}} {{Counter-Attack or Parry Roll=[[{@{body-select}+@{species-select}+@{select_mark-Brawling}+@{select_species-Brawling}+@{select_career-Brawling}}kh1]]}} {{Effect=Damage +2 Critical}} {{Gifts=Strength, p.81 Claws of Iron, p.318 Brawling Fighter, p.50}} Edit: Figured out my syntax error. Need to divide the separate 1d8 rolls by a comma. I under stood "d8 + d8" to be separate roll groups or for Roll20 to add it to 2d8 before counting target success. It does not. The syntax must be {d8, d8}&gt;4