A quick word on macros - after messing with them today I intend on adding some new token properties to the campaign that will make macroing much easier. These new properties will be:
maxHP - Your max HP
strMod - Your Strength modifier
dexMod - Your Dexterity modifier
intMod - Your Intelligence modifier
wisMod - Your Wisdom modifier
chaMod - Your Charisma modifier
Perception
Stealth
History
etc...
If you can think of any other variables you could use hardcoded to your token, let me know and I'll set it up. I also created a quick, easy damage macro and a heal macro based on a template provided by Urchin.
Code:<!-- Ask the user for input. [DmgValue = DamageTaken] Calculate the new value and the correct word to use. [NewHP = min(maxHP, max(-20, HP - DmgValue))] [Word = if(DmgValue >= 0, "drop", "rise")] --> {DmgValue} points of damage are taken. <br>Hit points {Word} to {HP = NewHP}/{maxHP}.When I get the chance, I'll mess with it some more so it can detect when you are bloodied and automatically assign the correct state.Code:<!-- Ask the user for input. [DmgValue = DamageTaken] Calculate the new value and the correct word to use. [NewHP = min(maxHP, max(-20, HP + DmgValue))] [Word = if(DmgValue >= 0, "rise", "drop")] --> {DmgValue} points of HP are healed. <br>Hit points {Word} to {HP = NewHP}/{maxHP}.
Also, I am aware that there are entire 4e frameworks available for download that you can implement but I'm weird and I don't like relying on other people's code. I'm much more comfortable working with my own stuff because I know how it's written and I know it's not going to do any mysterious things. If you don't feel the same way, check out the MapTools forums and you'll find a bunch of macros you can import for your characters!![]()




Reply With Quote