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

Macro for a complicated Iaijutsu Focus

This is for 3.5 (although I am using a PF-sheet for this because it's easier to customize on that) D&D game with the original Immortals rules set (converted over) and the Deities & Demigods rules set.  Basically, the pcs are demi-gods (yes, this is a ridiculously high level campaign, with some homebrewed rules necessary to ensure internal consistency between the different editions used here).  All of which explains the horribly complicated Iaijutsu Focus skill check I am about to describe: The pc is an Epic Iaijutsu Master, with the Epic Iaijutsu Focus feat and an unique Divine Salient Ability called Divine Iaijutsu Focus.  Here is how it works - the character makes an Iaijutsu Focus skill check (1d20 + @{CHA-mod} + relevant skill ranks and other modifiers to this skill check).  To determine the bonus damage this skill check adds to a strike with a katana (must be sheathed beforehand) against a flat-footed opponent, we subtract the results of the Iaijutsu Focus skill check by 10, then divide that by 5 (rounding down), followed by adding +1 to the total.  That gives the base number of bonus d6s the character rolls for damage in addition to the katana's base weapon damage.  Thanks to the Epic Iaijutsu Focus feat, there is no cutoff limit in determining how many bonus d6s can be added through Iaijutsu Focus. Easy, right?  Well, here is where it gets complicated.  The Epic Iaijutsu Master prestige class has an ability that adds the character's Charisma modifier to EACH bonus d6 that the Iaijutsu Focus skill check adds to the katana's base damage .  On top of that, the Divine Iaijutsu Focus salient ability increases the number of bonus d6s by 3 AND causes the total bonus damage to repeat itself again on the round after (the exact damage total is repeated; a 2nd Iaijutsu Focus skill check is not required to determine that secondary damage). I need to pull off a macro that not only shows the final results of the rolled number of bonus d6s, it also has to show results of the Iaijutsu skill check so that everyone in the group can see for themselves that the macro is rolling the right number of bonus d6s.  Luckily I only need the results of said macro for 1 such attack (usually once per encounter). Anyone can figure this one out?  I got the macro figured as far as calculating the number of d6s required to roll, but then I get stumped on two areas: how to add the Charisma modifier to each d6 rolled, and how to show all of that work whenever someone puts their cursor over the rolled damage results. Thanks in advance for any insight/help offered! CB
1493478254

Edited 1493478445
The main calculation you're describing sounds like [[ floor((10 - (1d20 + @{CHA-mod} + ?{Mods})) / 5) + 1 + 3 ]], which can be rewritten to emphasize the check: [[ 4 + floor(2 - .2 * (1d20 + @{CHA-mod} + ?{Mods})) ]] After making the roll above within its own individual macro, you could add something like  + ?{Iaijutsu dice|0}d6 + ?{Iaijutsu dice} * @{CHA-mod} to the damage section of the katana's attack macro.
Hm.  I already have a miscellaneous skill listed in the Skills section for Iaijutsu Focus (as @{Misc-Skill-3} ), so I can use that directly to substitute for the 1d20 + @{CHA-mod} +?{Mods} , thus making it [[ 4 + floor(2 - .2*(1d20 + @{Misc-Skill-3})) ]] . But why would you use floor(2 - .2* in the formula?  The calculation is supposed subtract 10 from the sum of the Iaijutsu Focus skill check, and then divide by 5, rounding down to the nearest whole number before adding 4 to calculate the total number of bonus d6s. The ?{Iaijutsu dice|0}d6 + ?{Iaijutsu dice} * @{CHA-mod} formula resolves the 2nd issue I had, thanks! :D
1493594474

Edited 1493594492
CB said: The calculation is supposed subtract 10 from the sum of the Iaijutsu Focus skill check Oops, misread your original post! (Misread 'by' as 'from') The calculation is supposed subtract 10 from the sum of the Iaijutsu Focus skill check, and then divide by 5, rounding down to the nearest whole number before adding 4 to calculate the total number of bonus d6s. So, in the case we're dealing with [[ floor((1d20 + @{CHA-mod} + @{Misc-Skill-3} - 10) / 5) + 4 ]] One way to make it easier to separate the Iaijutsu Focus skill check from the rest of the calculation (when viewing the calculation via tooltip) is to rewrite the calculation to emphasize the Iaijutsu Focus skill check a little bit more:   [[ floor(((1d20 + @{CHA-mod} + @{Misc-Skill-3}) - 10) / 5) + 4 ]] = [[ floor((1d20 + @{CHA-mod} + @{Misc-Skill-3}) / 5 - 10/5) + 4 ]] = [[ floor((1d20 + @{CHA-mod} + @{Misc-Skill-3}) * 1/5 - 2) + 4 ]] = [[ 4 + floor((1d20 + @{CHA-mod} + @{Misc-Skill-3}) * 0.2 - 2) + 4 ]] = [[ 4 + floor(-2 + .2 * (1d20 + @{CHA-mod} + @{Misc-Skill-3})) ]] Another way to emphasize/isolate the skill check is to use a /roll like so: /r floor(([[1d20 + @{CHA-mod} + @{Misc-Skill-3}]] - 10) / 5) + 4 ]]