I've been struggling with macros and the character limit in macros and the complexity of some macros....so I did a little test.
Basically, it's making the creation of individual macros a lot easier.
I set token properties of WPNBaseAttack, WPNBaseDamage, and WPNCritDamage. The values of those properties are the formulas that are used for attacks with that weapon.
WPNBaseAttack: WPNMagic+WPNProf+WPNAttackBonus+HalfLevel+AttackBonus
WPNBaseDamage: roll(Mult*WPNNo,WPNDice)+WPNMagic+WPNDamageBonus+DamageBonus
WPNCritDamage: Mult*WPNNo*WPNDice+WPNMagic+WPNDamageBonus+DamageBonus+eval(WPNMagicCritDamage)+If(WPNHighCrit=="Y",roll(ceiling(Level/10)*WPNNo,WPNDice),0)
The Melee Basic Attack macro (to hit and damage) is:
[H:input("AttackBonus","DamageBonus")]
[H:AttackRoll=1d20]
[H:Mult= If(Level>20,2,1)]
To Hit:
[AttackRoll+eval(WPNBaseAttack)+STRBonus]
[If(AttackRoll>WPNCritRoll," (Critical)","")]<br/>
Damage:
[If(AttackRoll>WPNCritRoll,eval(WPNCritDamage),eval(WPNBaseDamage))+STRBonus]
This should really streamline my creation of macros. I won't need to enter as much in individual macros and this should eliminate a lot of my errors.
Macro Tip
Moderators: dorpond, trevor, Azhrei
Adding another example:
Macro for Priest's Shield (formatted):
<table width="90%"><tr style="background:#009900;color:white;font-weight:bold;"><td>Priest's Shield</td><td align="right">Cleric Attack 1</td></tr><tr><td colspan="2" style="background:#EEEEEE"><i>You utter a minor defensive prayer as you attack with your weapon.</i><br/><b>At-Will</b> * <b>Divine, Weapon</b><br/><b>Standard Action</b> <b>Melee weapon</b><br/><b>Target:</b> One creature<br/><b>Attack:</b> [H:input("AttackBonus","DamageBonus")][H:AttackRoll=1d20]
[AttackRoll+eval(WPNBaseAttack)+STRBonus] vs AC
[If(AttackRoll>WPNCritRoll," (Critical Hit)","")]<br/><b>Damage:</b> [H:Mult=If(Level>21,2,1)]
[If(AttackRoll>WPNCritRoll,eval(WPNCritDamage),eval(WPNBaseDamage))+STRBonus] damage and you and one adjacent ally gain a +1 power bonus to AC until the end of your next turn.<br/></td></tr></table>
Macro for Priest's Shield (formatted):
<table width="90%"><tr style="background:#009900;color:white;font-weight:bold;"><td>Priest's Shield</td><td align="right">Cleric Attack 1</td></tr><tr><td colspan="2" style="background:#EEEEEE"><i>You utter a minor defensive prayer as you attack with your weapon.</i><br/><b>At-Will</b> * <b>Divine, Weapon</b><br/><b>Standard Action</b> <b>Melee weapon</b><br/><b>Target:</b> One creature<br/><b>Attack:</b> [H:input("AttackBonus","DamageBonus")][H:AttackRoll=1d20]
[AttackRoll+eval(WPNBaseAttack)+STRBonus] vs AC
[If(AttackRoll>WPNCritRoll," (Critical Hit)","")]<br/><b>Damage:</b> [H:Mult=If(Level>21,2,1)]
[If(AttackRoll>WPNCritRoll,eval(WPNCritDamage),eval(WPNBaseDamage))+STRBonus] damage and you and one adjacent ally gain a +1 power bonus to AC until the end of your next turn.<br/></td></tr></table>