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

[3.5] Iaijutsu Focus Macro help?

Okay, so I was following this <a href="https://app.roll20.net/forum/post/561282/rolling-a" rel="nofollow">https://app.roll20.net/forum/post/561282/rolling-a</a>... And it worked well, but with my current situation I am using a the skill check template that is a part of the 3.5 character sheet. Well my current problem is that I need some way to "call" the first roll for the skill check that is using the normal skill check and then use that check to base this calculation on and I can't figure out how to do this? As it currently stands it rolls two separate rolls instead of using the first roll to calculate the # of d6s that result. I need it to look back at the previous section of the macro take that 'oh this rolled 1d20 + 5 and got a 22, therefore ____' but right now its going 'Check was 1d20 +5 and got a 22 also this second roll did 1d20 +5 and got 14 and therefore the number of d6 is 2' instead of calculating off of 22 it calculates off of a sepearate roll
1467261135

Edited 1467261338
Karel Frostsong said: 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 This is the macro in question that rolls the number of d6 from a resulting skill check. &{template:DnD35StdRoll} {{skillflag=true}} {{name=@{character_name} }} {{check=@{otherskillname} check:}} {{checkroll= [[ 1d20 + [[ @{otherskill} ]] ]] }} {{notes=@{otherskillnote} }} This is the normal skill check, i would like to incorporate that code in there like &{template:DnD35StdRoll} {{skillflag=true}} {{name=@{character_name} }} {{check=@{otherskillname} check:}} {{checkroll= [[ 1d20 + [[ @{otherskill} ]] ]] }} {{Iaijutsu D6= [[[{{(floor((CALL FIRST ROLL-10)/5))+1,1d1-1}kh1,1d1+8}dh1]]d6]}} {{notes=@{otherskillnote} }} But the problem I am facing is, i don't know how to call the first roll's result into the second section
1467274471

Edited 1467274495
Silvyre
Forum Champion
B14d3r11 said: But the problem I am facing is, i don't know how to call the first roll's result into the second section Unfortunately, it's not possible to do this without the assistance of an API Script . (Access to the API is available in games in which the Creator has an active Pro subscription.) That said, there is another way to combine both rolls by using an inline roll nested within a /roll: /r [[ {{floor((1d20 + [[@{otherskill}]]) / 5) - 1, 0d0}kh1, 9 + 0d0}kl1 ]]d6
1467348169

Edited 1467348581
So this is the output i am looking for, except the 4d6 roll doesn't correlate with the Check result of 18 (because its supposed to be 2d6) I want it to be displayed in a fashion to this so that the DM and other players can see with one simple roll how many D6 and what the result was... Also that combination macro is nice, but it doesn't show the actually skill check roll which is whats needed aswell. Thats great for streamlining an Attack roll with Iaijutsu. Also later when my character is able to he will be adding his charisma modifier to each d6 that is added from Iaijutus focus... how do I do that from modifying the macro you left for me?
1467348989

Edited 1467412851
Silvyre
Forum Champion
Sorry, but that is not possible to do within a Roll Template. I'll offer another workaround: a Command Button that makes it easier to roll the calculated number of dice (you'll be able to see the actual check result within the inline roll): Iaijutsu D6: [[ {{floor((1d20 + [[@{otherskill}]]) / 5) - 1, 0d0}kh1, 9 + 0d0} kl1 ]] [Roll Damage](!&amp;#13; &amp;#91;[ &amp;#63;{Iaijutsu D6|1|2|3|4|5|6|7|8|9&amp;#125;d6 ]&amp;#93; )
1467349181
Silvyre
Forum Champion
B14d3r11 said: Also that combination macro is nice, but it doesn't show the actually skill check roll which is whats needed aswell. If you mouse over the inline roll, you can see the d20 roll result.
1467349390
Silvyre
Forum Champion
B14d3r11 said: Also later when my character is able to he will be adding his charisma modifier to each d6 that is added from Iaijutus focus... how do I do that from modifying the macro you left for me? The relevant Attribute call is @{cha-mod}, so you'd could just add that right before the closing set of inline roll brackets.
1467401599

Edited 1467402519
So your second workaround, that would work but it gives the result for mitigations before the d6 roll? cause i rolled a 29 total and it came out as a 13 on the macro, whereas if its just an command button needed then could "write in" the check results that each D6 uses so i could select it? Also do you think it would be possible to make calling a rolling from inside the same macro a permanent feature for an API later on? Cause that seems like a "simple" thing that would be beneficial for all because if you could predefined variable/string in the macro that IaijutsuR = [[ 1d20 + [[ @{otherskill} ]] ]] that way you could make a macro that goes like (Similar to other coding languages) Define IaijutsuR As Integer (Or technically a String) IaijutsuR = [[ 1d20 + [[ @{otherskill} ]] ]] &{template:DnD35StdRoll} {{skillflag=true}} {{name=@{character_name} }} {{check=@{otherskillname} check:}} {{checkroll= IaijutsuR }}&nbsp; {{Iaijutsu D6= [[[{{(floor((IaijutsuR-10)/5))+1,1d1-1}kh1,1d1+8}dh1]]d6]}} {{notes=@{otherskillnote} }} this would also make coding macros much easier as you would be able to predefine your most used code in a macro and then call it back to make it less cluttered. Cause in this circumstance Iaijutsu is predefined and rolled before the macro so when its called as a checkroll it just displays the roll that was already done (say 23) so it shows 23 and then when it recalls it again for the number of d6 it just pulls that 23 again and does more calculations to get the d6 roll corresponding to previous roll? I know this is something you work more with Pro members because they've paid for your service and I have been trying desperately to get this to work correctly...
1467413000
Silvyre
Forum Champion
B14d3r11 said: So your second workaround, that would work but it gives the result for mitigations before the d6 roll? Apologies; my {}kl1 function was incomplete; I fixed it in my post. B14d3r11 said: Also do you think it would be possible to make calling a rolling from inside the same macro a permanent feature for an API later on? The API Script called ExtendedExpressions can make internal dice calculations, and then use them as a variable.
Silvyre said: The API Script called ExtendedExpressions can make internal dice calculations, and then use them as a variable. I assume you need to be a Pro member in order to have this API script working?
1467697551
Silvyre
Forum Champion
B14d3r11 said: Silvyre said: The API Script called ExtendedExpressions can make internal dice calculations, and then use them as a variable. I assume you need to be a Pro member in order to have this API script working? The Creator of the game in which the script is used does, but the players within that game do not.
If i purchase a pro membership and add the api in to the game and then my pro membership expires. Does the game still have access to that api script? And if so I wouldn't be able to make changes to the api afterwords correct?
1468504193
Silvyre
Forum Champion
Access to the API is available in games in which the Creator has an active Pro subscription. Non-Pro Creators cannot use API Scripts nor access the Script Editor.
Thanks for your assistance, now the next task is to apply a stat modifier multiplied by the number of d6 rolled... is that possible? Like I get 2d6 and my stat is 3 its 2d6 + 6
1470040839

Edited 1470041223
Ziechael
Forum Champion
Sheet Author
API Scripter
Sure thing: [[ [[?{Dice?|2}]]d6 + (?{Dice?}*@{selected|stat}) ]] you could of course drop the 'selected' if using it as part of a token action. You would need to replace the ?{Dice?} query with the query/formula used to define how many dice you are rolling but you get the gist :)
1473307931

Edited 1473307997
I am sorry I am always late to reply, our group hasn't been playing "all" the time so... but as it stands the Damage query being used is Silvyre's: [Roll Damage](! [[ ?{Iaijutsu D6|1|2|3|4|5|6|7|8|9}d6 +&nbsp; ]] )}} So with this addition i would modify it to become: [Roll Damage](! [[ ?{Iaijutsu D6|1|2|3|4|5|6|7|8|9}d6 +&nbsp;(?{Iaijutsu D6|1|2|3|4|5|6|7|8|9}*@{selected|stat}) ]] )}} ?? or am I doing this wrong? Cause by "raw" it should prompt me to select the number of "d6" twice correct? once for the actual d6 number and once more for the Stat modifier? Is there any way to condense that to only selecting "d6" once and it auto selecting the stat modifications?
1473308962

Edited 1473309017
Silvyre
Forum Champion
B14d3r11 said: it should prompt me to select the number of "d6" twice correct? You'll only be prompted once (for each Roll Query with a unique name).
I clearly messed up somewhere... &{template:DnD35StdRoll} {{skillflag=true}} {{name=@{character_name} }} {{check=@{otherskillname} check:}} {{Iaijutsu D6: [[ {{floor((1d20 + [[@{otherskill}]]) / 5) - 1, 0d0}kh1, 9 + 0d0}kl1 ]] [Roll Damage](! [ [[ ?{Iaijutsu D6|1|2|3|4|5|6|7|8|9}d6 + (?{Iaijutsu D6|1|2|3|4|5|6|7|8|9}*@{selected|CHA}) ]] )}} It gives me the prompt that I am not selecting a token (when i clearly am) and it prompts me to roll damage dice before i even get the check result, to click the button in chat to roll damage? I am clearly at a loss, i've been tinkering with this for a while but can't figure it out
1473799767
Silvyre
Forum Champion
At this time, reopening a Macro saved under the My Settings tab of the Sidebar causes HTML entities within to be reverted; if the Macro is then saved, so are those reversions. This may be what you experienced. This behaviour is not present within Abilities , so you might consider saving this macro as one, after redoing the HTML entities.
1473875334
Diana P
Pro
Sheet Author
I suspect the reason it is giving the error is because the other skills section on the 3.5 sheet is a fieldset or repeating section.&nbsp; To specify using information from that area, the name you need to use is a little longer. Basically, assuming you are using the first entry for your skill, add repeating_skills_$0_ in front of the otherskillname and otherskill values to get their full name so that the macro looks something like: &{template:DnD35StdRoll} {{skillflag=true}} {{name=@{character_name} }} {{check=@{repeating_skills_$0_otherskillname} check:}} {{Iaijutsu D6: [[ {{floor((1d20 + [[@{repeating_skills_$0_otherskill}]]) / 5) - 1, 0d0}kh1, 9 + 0d0}kl1 ]] [Roll Damage](!&amp;#13; &amp;#91;[ &amp;#63;{Iaijutsu D6|1|2|3|4|5|6|7|8|9&amp;#125;d6 + &amp;#63;{Iaijutsu D6|1|2|3|4|5|6|7|8|9&amp;#125;*&amp;#64;{selected|CHA&amp;#125; ]&amp;#93; ) }} if you are using the second row, use a $1 instead of the $0, for the third row, a $2 instead of the $0, etc., counting down til you get to your skill. (I also tried to put the html entities back in.&nbsp; Hopefully I got them right.)
1474755846

Edited 1474755933
Diana P said: I suspect the reason it is giving the error is because the other skills section on the 3.5 sheet is a fieldset or repeating section.&nbsp; To specify using information from that area, the name you need to use is a little longer. Basically, assuming you are using the first entry for your skill, add repeating_skills_$0_ in front of the otherskillname and otherskill values to get their full name so that the macro looks something like: &{template:DnD35StdRoll} {{skillflag=true}} {{name=@{character_name} }} {{check=@{repeating_skills_$0_otherskillname} check:}} {{Iaijutsu D6: [[ {{floor((1d20 + [[@{repeating_skills_$0_otherskill}]]) / 5) - 1, 0d0}kh1, 9 + 0d0}kl1 ]] [Roll Damage](! [[ ?{Iaijutsu D6|1|2|3|4|5|6|7|8|9}d6 + ?{Iaijutsu D6|1|2|3|4|5|6|7|8|9}*@{selected|CHA} ]] ) }} if you are using the second row, use a $1 instead of the $0, for the third row, a $2 instead of the $0, etc., counting down til you get to your skill. (I also tried to put the html entities back in.&nbsp; Hopefully I got them right.) {selected|CHA} in your code doesn't seem to work I tried doing @{selected|Charisma} like suggested in this, but it didn't work? Yours rolls the correct damage and starts to roll the 5 * ___ but doesn't return with the Charisma as part of the damage bonus... This is what i see
1474756512

Edited 1474756566
Silvyre
Forum Champion
Try one of these: &amp;{template:DnD35StdRoll} {{skillflag=true}} {{name=@{character_name} }} {{check=@{repeating_skills_$0_otherskillname} check:}} {{Iaijutsu D6: [[ {{floor((1d20 + [[@{repeating_skills_$0_otherskill}]]) / 5) - 1, 0d0}kh1, 9 + 0d0}kl1 ]] [Roll Damage](!&amp;#13; &amp;#91;[ &amp;#63;{Iaijutsu D6|1|2|3|4|5|6|7|8|9}d6 + &amp;#63;{Iaijutsu D6|1|2|3|4|5|6|7|8|9} &amp;#42; @ {selected|CHA} ]&amp;#93; ) }} &amp;{template:DnD35StdRoll} {{skillflag=true}} {{name=@{character_name} }} {{check=@{repeating_skills_$0_otherskillname} check:}} {{Iaijutsu D6: [[ {{floor((1d20 + [[@{repeating_skills_$0_otherskill}]]) / 5) - 1, 0d0}kh1, 9 + 0d0}kl1 ]] [Roll Damage](!&amp;#13; &amp;#91;[ &amp;#63;{Iaijutsu D6|1|2|3|4|5|6|7|8|9}d6 + &amp;#63;{Iaijutsu D6|1|2|3|4|5|6|7|8|9} &amp;#42; &amp;#64; {selected|CHA} ]&amp;#93; ) }}
1474758453

Edited 1474758580
Both of those output the original macro's damage but didn't add the charisma to the damage. Also they both outputted "No character was found for 'selected'"
1474761630

Edited 1474761672
Diana P
Pro
Sheet Author
Change the @{selected|cha} to @{cha} then.&nbsp; The "selected" thinks you will have a token associated with your character selected but if that is not the case, you will get that error. If you want the charisma bonus, that would be @{cha-mod} instead.
&{template:DnD35StdRoll} {{skillflag=true}} {{name=@{character_name} }} {{check=@{repeating_skills_$0_otherskillname} check:}} {{Iaijutsu D6: [[ {{floor((1d20 + [[@{repeating_skills_$0_otherskill}]]) / 5) - 1, 0d0}kh1, 9 + 0d0}kl1 ]] [Roll Damage](! [[ ?{Iaijutsu D6|1|2|3|4|5|6|7|8|9}d6 + ?{Iaijutsu D6|1|2|3|4|5|6|7|8|9} * @{cha-mod} ]] ) }} Works perfectly, thank you for the help :) also for future reference how do i add the code to a code box like Silvyre did?
1474768553
Diana P
Pro
Sheet Author
You are welcome. To get the code box, click on the little paragraph symbol in the upper left corner of the input box (it says formatting when you mouse-over it) and then click on code. :) Happy Gaming.
1474773683

Edited 1474777563
Two last questions, is there a way to change the color of the text? Like when it outputs the damage besides being red if rolled low or green if rolled high can i make it say... yellow to show its lightning damage? And I am attempting to make a Iterative attack macro for the 3.5 Character sheet but at the bottom under the "Other Weapons" section the macro attack name is repeating_weapons_#_weaponattack How do i reference that in a macro like %{Atarasi|weapon1attack} Cause I can't figure out how to reference it. I was also hoping there could be a Iterative attacks section like the pathfinder character sheet for the 3.5 one but it isn't there :/
1474781798
Diana P
Pro
Sheet Author
If you mouse-over the field, you can see the fields name. %{repeating_weapons_#_weaponfullattack} or %{repeating_weapons_#_weaponattackmacro} depending on which macro field you want to pull.&nbsp; However.&nbsp; As far as I know, to get the contents of the macro field to work right, you would have to spell out the full name of the field, which is not done in the included sample macros.&nbsp; If you put the macro you created above in there, it should work correctly. I'm sorry, but I do not have the skill to create a sheet like the pathfinder one, nor am I interested in using one that complicated.&nbsp; Sadly, no one else has been interested in writing/submitting a more complex 3.5 sheet to stand beside this one (though I've encouraged them to do so) so the current one is what we have.
1475019435

Edited 1475019750
The problem with that is, they hall have the name of %{repeating_weapons_#_weaponattackmacro} So if i click "add" under the other weapons section, i can't call them apart because I don't know what their specific names are... cause their rolls all have the same name. I would attempt to modify the current one in order to work with my request, but I don't know where to find it to access it lol
1475019671
Diana P
Pro
Sheet Author
You have to change # to the number of row (starting with zero for the first row) that they are in.&nbsp; I have no way of reflecting that in the title for the field unfortunately.
1475020089

Edited 1475020912
Ahhh so the first "Other" weapon is %{repeating_weapons_0_weaponattackmacro} Correct? Or no? Also by iterative attacks I am mostly pointing towards people using Two-Weapon Fighting with different weapons. That way it would be a full attack button that rolls out say 4 mainhand and 3 offhand attacks specifying seperate weapons for the attacks and also a section to add in extra attacks for like Haste or Speed etc... Could this be accomplished by making a section under the weapons for Two-Weapon Fighting options and also allowing you to point out the weapons by directing towards the weapon1attack and weapon2attack thus when it calls for say 3 main hand and 2 off hand it rolls weapon1attack 3 times and weapon2attack 2 times applying their separate differences on their respective attacks?
1475022786
Diana P
Pro
Sheet Author
B14d3r11 said: Ahhh so the first "Other" weapon is %{repeating_weapons_0_weaponattackmacro} Correct? Or no? Correct. Also by iterative attacks I am mostly pointing towards people using Two-Weapon Fighting with different weapons. That way it would be a full attack button that rolls out say 4 mainhand and 3 offhand attacks specifying seperate weapons for the attacks and also a section to add in extra attacks for like Haste or Speed etc... Could this be accomplished by making a section under the weapons for Two-Weapon Fighting options and also allowing you to point out the weapons by directing towards the weapon1attack and weapon2attack thus when it calls for say 3 main hand and 2 off hand it rolls weapon1attack 3 times and weapon2attack 2 times applying their separate differences on their respective attacks? You can also click on the Attributes and Abilities tab and create the macro in there which points to those skills, or create the macro inside the current fields which pulls the correct attributes. The person in our group who favors two weapon fighting runs macros like: &{template:DnD35Attack} {{pcflag=true}} {{name=@{character_name}}} {{subtags=weaves a web of sharpened steel! }} {{fumbleroll=**Fumble:[[d20]]**}} {{fullattackflag=[[d1]]}} {{attack1=A1(flaming):[[@{weapon1attackcalc} -4[two-weapon fighting]]]}} {{critconfirm1=Crit!:[[@{weapon1attackcalc}]]}} {{damage1=D1:[[@{weapon1damage}]] fire}} {{critdmg1=+[[@{weapon1damage}]] fire}} {{attack2=A2(+2):[[@{weapon2attackcalc} -4[two-weapon fighting] ]]}} {{critconfirm2=Crit!:[[@{weapon2attackcalc} -4[two-weapon fighting] ]]}} {{damage2=D2:[[@{weapon2damage}]]}} {{critdmg2=+[[@{weapon2damage}]]}} {{attack3=A3(flaming):[[@{weapon1attackcalc} -5[BAB2] -4[two-weapon fighting] ]]}} {{critconfirm3=Crit!:[[@{weapon1attackcalc} -5[BAB2] -4[two-weapon fighting] ]]}} {{damage3=D3:[[@{weapon1damage}]] fire}} {{critdmg3=+[[@{weapon1damage}]] fire}} {{attack4=A4(+2):[[@{weapon2attackcalc} -5[BAB2] -4[two-weapon fighting] ]]}} {{critconfirm4=Crit!:[[@{weapon2attackcalc} -5[BAB2] -4[two-weapon fighting] ]]}} {{damage4=D4:[[@{weapon2damage}]]}} {{critdmg4=+[[@{weapon2damage}]]}} {{notes= GM may have to add favored enemy bonus if applicable. }} which he has on his Abilities and Attributes tab and then set as a token action so he needs only target his token and click the button to run them.
Unrelated bug, apparently whenever i roll the chat messes up?
1475026584
Diana P
Pro
Sheet Author
you seem to be missing the &{template:DnD35Attack} at the beginning of that roll template part.&nbsp; and I typically see that kind of issue if the curly brackets are miss-paired somehow.&nbsp; so check for somewhere where there is either an extra { or a missing }&nbsp;&nbsp;&nbsp; and clearing the chat log from the campaign details page will fix the chat log.
This doesn't happen with just that attack, its with EVERY roll i try. Even doing /roll 1d6 nothing shows
1475027295
Silvyre
Forum Champion
A game's Creator is often able to fix issues with their Text Chat by Clearing the game's Chat Archive (note: not Clearing your Current Chat Log ). A GM might want to copy/back up the Chat Archive before the Creator clears it.