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

Rolling a dice inside a dice to determine dice... or Iaijutsu Focus Macro Help. (D&D 3.5)

Is there any way to have a macro call upon another macro that rolls a skill check, then consults another macro for a specific number of d6, which then move into the main macro? somthing Like -Roll 1d10+x+ #IF 1d10 being a weapon, x being strength. IF being -roll 1d20+s s being skill modifier (ranks, cha, etc) where it calls on another macro, or in the same macro ... if the result is 10 to 14 its 1d6, 15 to 19 2d6, 20 to 24 3d6 and so on....
1389080666
DXWarlock
Sheet Author
API Scripter
Only way to do if/then with rolls is if you use the API and make a script for it. Currently macros have no real logic that complex.
1389083730
Alex L.
Pro
Sheet Author
William R. said: Only way to do if/then with rolls is if you use the API and make a script for it. Currently macros have no real logic that complex. ..... why? [[(floor((x-10)/5))+1]] if you replace x with what ever the result is it will return the number of d6 to roll.
1389084968

Edited 1389085896
DXWarlock
Sheet Author
API Scripter
isnt the #IF conditional, or am I reading it wrong? Was assuming the #IF was only rolled when the result was 10 or higher (I guess you could do 0d6 as a result of the math). But how would you pass the result of the d20 to X to make the next line work? like sudo code: /roll (1d10+x)+(1d20+s)+((that 1d20 result-10/5+1)D6) how would you get " that 1d20 result" + results of that 1d20s d6 count". I cant see a way to use the d20 result as an addition variable AND as a result for the d6 count at the same time. I might be just missing the solution myself or misunderstanding the request.
1389086504

Edited 1389088488
DXWarlock
Sheet Author
API Scripter
Wait, I think I see what he means. my mistake. I was looking at it wrong, the d20 result isn't added then used also as d6 calc, its just used as a dice count for the d6 /Roll 1d10+ 3 +[[(floor((1d20+ 4 -10)/5))+1]]d6 with 3 and 4 the X and S calls. that will roll the d20, figure out the d6 to roll, then roll the xd6 and 1d10 and add them. so like: /Roll 1d10+ @Damage +[[(floor((1d20+ @Skill -10)/5))+1]]d6 or this if you want d10 and d20 thrown at the same time. /Roll [[1d10+ @Damage ]]+[[(floor((1d20+ @Skill -10)/5))+1]]d6 only issue I cant figure out is low rolls on the d20, like a 2 returns negative amounts of d6 to roll..which makes a negative result to add. Not sure how to make it go if < 0 then 0
1389094313
GiGs
Pro
Sheet Author
API Scripter
This is a technique I'm using a lot lately /Roll 1d10+3+[[{(floor((1d20+4-10)/5))+1,1d1-1}kh1]]d6 The kh1 method makes sure that values below 0 are not used.
1389102874
DXWarlock
Sheet Author
API Scripter
Ahh that seems to work perfect :) need to remember that, I could use it for some rolls we do also when we need it to be 0 or higher.
Thanks guys. I ended up thinking up of one similar but this one is so much better. (The one I made has 3 macros and couldn't go below 5 or else it turned into negative dice ><) Anyway to make it stop at 50? or like have any result over 50 be the same as 50?
1389117161

Edited 1389117804
DXWarlock
Sheet Author
API Scripter
expanding on what I ended up looking into on the wiki from GG's kh1 addition..(thanks for that GG). I got this, but there might be a better way : /Roll {1d10+3+[[{(floor((1d20+4-10)/5))+1,1d1-1}kh1]]d6, 1d1+49}dh1 this works..but might be an easier way to get 50 everytime without doing 1d1+49 to compare to. It rolls your roll, and compares it to 1d1+49 which is always 50. and drops the highest of the 2. So under 50 return your roll, over 50 return 1d1+49 result.
William that one's incorrect, I keep getting over 9 dice if I roll high enough.
1389121578
DXWarlock
Sheet Author
API Scripter
it seems to have worked for me. Let me double check it. It might roll a crapload of d6 dice if you get a high 1d20, but the total cant ever go over 50.
try 1d20+55 ull see. its not doing it right, its defining the total number rolled, not the one for the dice. 9d6 doesnt cap at 50. what your macro is doing is rolling the skill check, then making an approprite amount of d6, but bypassing the limit in a high enough roll/modifier (so like 11d6 when the limit is 9) then it rolls the 11d6 and compares it to 1d1+49. if the d6 is higher, it uses 50, if its lower, it uses the xd6 rolled. effectively making the DMg of the IF cap at 50. when the 50 cap is on the skill check. You need to have the ",1d1+49" inside of the macro. so that it ends in [["uberawesomemacro"]]d6
1389122671
DXWarlock
Sheet Author
API Scripter
I still get a grand total of 50 returned even with +55 on the 1d20: /Roll {1d10+3+[[{(floor((1d20+55-10)/5))+1,1d1-1}kh1]]d6, 1d1+49}dh1 are you needing the end total capped at 50? or the total of the 1d20+skill set to 50?
Iaijutsu Focus goes like this: Skill check result -> 10-14 1d6, 15-19 2d6, 20-24 3d6 and so on. It capt at 50+ = 9d6 So when the result of the Iaijutsu Focus check is 50+ the amount of Dice rolled is 9 regardless of getting a 50 or a 2343532234. So yea, I need it capped to the 1d20+skill
1389122833
DXWarlock
Sheet Author
API Scripter
Ahh just saw your edit You need the 1d20+(whatever) capped to 1d20+50?
yes exactly. or rather be able to roll higher than 50 but still get 9d6 max.
1389123069

Edited 1389123139
DXWarlock
Sheet Author
API Scripter
Hmm might need someone else to help figure that one out. Dont know a way to do a drop/keep on a number itself. the logic fusses about it. So cant do like {1d6, 5}dh1 it fusses about the 5 being a number. And since the skill returns a number, cant think of a way to make it do a keep lowest, other than moving it to the{1d1+@skill, 1d1+49}dh1 after the 1d20.
There, Got it. /Roll 1d10+3+[[{{(floor((1d20+700-10)/5))+1,1d1-1}kh1, 1d1+8}dh1]]d6 Just put the 1d1+49 dh1 inside, and changed it to 1d1+8 (max 9) meaning the max amount of dice is 9 the +700 would be the modifier, which I did to test it. yep 9
1389123389
DXWarlock
Sheet Author
API Scripter
Ah that works, I was doing it the hard way, trying to make the @skill a 1d1+ skill, if over 50 turn down to 50, then figure out dice count...lot easier your way of just adjusting it AFTER its figure out to a limit of 9 :)
Derp. Mathematics, derping your brains out with epic amounts of Derp. Well, This thread is finished. Hopefully others gained from this.