Macros
Okay, folks! I am so excited and proud of myself, I have to share. I finally figured out how to make a macro for an attack that does crits and fumbles. This may not seem like a big deal, but its been driving me crazy for weeks now. Any way first I'll lay out the code for a Basic Mele Attack:
----------------------------------------------------------------------
[h: attmod = 4+1]
[h: dmgmod = 4+0]
[h: critTgt = 20]
[h: fumRng = 1]
[h: attD20 = d20]
[h: maxdmg = 10]
[h: bonusdmg = 1*0]
<b>LANCE OF FAITH<br>
A beam of light lances out<br>
to scorch and burn an enemy</b><br>
Standard Action - Range 10 <br>
<b><font color="red">[t: attRoll = attD20 + attmod]</b></font color> WIS vs REF to attack<br>
[if(attD20 >1 && attD20 <20), code:{<b><font color="red">[t: roll(1,10)+attmod]</b></font color> Radiant damage<br>
AND one ally +2 to attack this target} ; {}]
[if(attD20 <= fumRng), code:{Fumble!<br>} ; {}]
[if(attD20 >= critTgt), code:{<b><font color="red">Critical!</b></font color><br>
<b><font color="red">[t: maxdmg+dmgmod+bonusdmg]</b></font color> Radiant damage<br>
AND one ally +2 to attack this target} ; {}]
-----------------------------------------------------------------------
At the top you will see a set of variables that the code below will use just like an algebra equation.
This macro uses a series of "IF, THEN" statements just like algebra to tell the macro what to do. First it rolls a d20 and adds the attmod (attack modifiers like ability modifier + level bonus + weapon prof bonus + etc). Then it uses the next three sets of code to compare the roll against the variables set at the top for fumble range and crit range (so you can set it for a weapon with increased crit ranges). Each path has a result that it notes and displays, such as "Fumble!" and doesn't even roll for damage, "Critical!" and uses the maxdmg variable to figure out damage. I have even figured out a way to add a few more variables to account fo magic weapons that add extra damage on a crit.
Enjoy,
Jim