MapTool geek-out update: Flexible monster creation

Update: The new campaign file now has a cool Edit Monster macro that lets you tweak things on the fly, including Solo/Elite/Minion status. Thank you to JonathanTheBlack over on the MapTool forums!

After I put my initial pass at new damage tables and MapTool monster templates out there for the world to see, I saw some niggling problems that I wanted to correct.

First, my original damage tables had a couple of flat spots where the damage expression stayed the same from one level to the next. Since average damage is supposed to increase by 1 per level, this bugged me and I wanted to fix it.

Second, I knew I should be able to make monsters tweakable more easily with some additional properties.

Third, I wanted to handle limited damage expressions more elegantly.

Updated damage tables

My damage table now increases at every level. It also has a slightly wider range than the official tables, even at low level, but I’m okay with that. My crits will hurt a little more and my lousy damage rolls will hurt a little less than with official monsters. At the lowest levels, my expressions still have less overall variance because I’m rolling two dice right from the start (the official expressions only roll one for level 1-3). And at the highest levels I have some more variance because I’m only rolling two dice instead of four; that’s a good feature in my opinion.

I also fleshed out the table to include damage expressions for multi-target attacks (about 25% less than standard attacks) as well as limited damage expressions (25% more and 50% more than standard attacks). These took some fiddling to get right, but I’m pretty happy with where they ended up.

Tweakable monsters

I added a property for the attack bonus versus non-AC defenses (NADs); it’s just the normal attack bonus minus 2, but it makes it easier to tweak attack macros en masse. If you want a particular monster to have an easier time hitting NADs (as Soldiers do), just tweak the one property rather than editing every attack macro.

The same goes for having the 125% and 150% damage expressions; it’s easier to do something like tweak the Brute by changing the normal damage to the 125% numbers and the 125% numbers to the 150% numbers in the monster’s properties rather than in each individual attack macro.

Limited damage expressions

High-damage attacks are not perfectly formulaic; the official guidelines say to increase the damage for encounter or recharge powers by 25 to 50 percent.

I decided to add a formula. My generic monsters’ recharge powers do 25% extra damage, while their encounter powers do 50% extra damage. If it’s a multi-target recharge attack I use the standard single-target damage expressions; a multi-target encounter attack gets the 125% damage expressions.

A word on artillery monsters

The official guidelines say that artillery monsters should have +1 or +2 to hit for ranged or area attacks. This is entirely too vague for me, and messy to implement. So, I just gave them +2 to hit versus both AC and NADs. Sure, maybe they’re a little more accurate than they “should” be; I can live with that.

Putting it all together

If you want to download a template campaign file with the sample monsters and properties, you can download it here. The file was created in version 1.3.b66 of MapTool. The properties themselves have been pasted below.

#---StatsToSetManually-----
#Level:1
#Role:Skirmisher
#HPModifier:8
#Spd:6
#NativeSize:Medium
#ActPts:0
#SaveBonus:0
#HeShe:It
#ArmorClassRoleMod:0
#InitiativeRoleMod:0
#Leader:0
#MinionHP:0
#SubType:Standard
#SubTypeHPMod:1
#----StatsThatCanBeDefaulted---------
#MaxHP:{((HPModifier + Constitution + (Level * HPModifier)) * SubTypeHPMod) + MinionHP}
#ArmorClass:{Level+14+ArmorClassRoleMod+ACAdj}
#Fortitude:{Level+12+FortAdj}
#Reflex:{Level+12+RefAdj}
#Will:{Level+12+WillAdj}
#Init:{HalfLevel+DexMod-ArmorPenalty+InitAdj}
#Strength:{10+HalfLevel+StrAdj}
#Constitution:{10+HalfLevel+ConAdj}
#Dexterity:{10+HalfLevel+DexAdj}
#Intelligence:{10+HalfLevel+IntAdj}
#Wisdom:{10+HalfLevel+WisAdj}
#Charisma:{10+HalfLevel+ChaAdj}
#DefaultAttackBonusVsAC:{Level+5}
#DefaultAttackBonusVsNAD:{Level+3}
#SingleTargetDamageBonus:{DamageBonus100}
#SingleTargetDamageDie:{DamageDie100}
#MultiTargetDamageDie:{DamageDie75}
#MultiTargetDamageBonus:{DamageBonus75}
#DamageBonus100:{1+CEILING(Level*2/3)}
#DamageDie100:{6+FLOOR(Level/3)}
#DamageDie75:{SingleTargetDamageDie-2-FLOOR((Level+3)/9)}
#DamageBonus75:{SingleTargetDamageBonus-1-FLOOR((Level+1)/9)}
#DamageDie125:{8+FLOOR(Level/3)}
#DamageBonus125:{1+CEILING(Level*2/3)+FLOOR((Level+1)/4)}
#DamageDie150:{9+FLOOR(Level/3)+FLOOR((Level+3)/6)}
#DamageBonus150:{2+CEILING(Level*2/3)+FLOOR((Level+1)/3)}
#MinionDamage:{4+FLOOR(Level/2)}
#-----CalculatedOrStaticStats-----
#HitPoints:{MaxHP}
#TempHP:0
#BloodiedHP:{FLOOR(MaxHP/2)}
#DeathFails:0
*#HP:{Hitpoints}/{MaxHP} + {TempHP}
*#AC/Fort/Ref/Will:{ArmorClass} / {Fortitude} / {Reflex} / {Will}
*#Type:Level {Level} {Role}
*#Speed:{Spd}
*#Initiative:{Init}
*#ActionPoints:{ActPts}
*#Str/Con/Dex:{Strength} / {Constitution} / {Dexterity}
*#Int/Wis/Cha:{Intelligence} / {Wisdom} / {Charisma}
#E1:1
#E2:1
#E3:1
#E4:1
#E5:1
#R1:1
#R2:1
#R3:1
#R4:1
#R5:1
#PowerCharged:1
---------------------------Skills-------------------------------------
#ArmorPenalty:0
#Acrobatics:{HalfLevel+DexMod-ArmorPenalty+5*AcrTrained}
#Arcana:{HalfLevel+IntMod+5*ArcTrained}
#Athletics:{HalfLevel+StrMod-ArmorPenalty+5*AthTrained}
#Bluff:{HalfLevel+ChaMod+5*BlfTrained}
#Diplomacy:{HalfLevel+ChaMod+5*DipTrained}
#Dungeoneering:{HalfLevel+WisMod+5*DunTrained}
#Endurance:{HalfLevel+ConMod-ArmorPenalty+5*EndTrained}
#Heal:{HalfLevel+WisMod+5*HeaTrained}
#History:{HalfLevel+IntMod+5*HisTrained}
#Insight:{HalfLevel+WisMod+5*InsTrained}
#Intimidate:{HalfLevel+ChaMod+5*IntTrained}
#Nature:{HalfLevel+WisMod+5*NatTrained}
#Perception:{HalfLevel+WisMod+5*PerTrained}
#Religion:{HalfLevel+IntMod+5*RelTrained}
#Stealth:{HalfLevel+DexMod-ArmorPenalty+5*StlTrained}
#Streetwise:{HalfLevel+ChaMod+5*StrTrained}
#Thievery:{HalfLevel+DexMod-ArmorPenalty+5*ThvTrained}
#AcrTrained:0
#ArcTrained:0
#AthTrained:0
#BlfTrained:0
#DipTrained:0
#DunTrained:0
#EndTrained:0
#HeaTrained:0
#HisTrained:0
#InsTrained:0
#IntTrained:0
#NatTrained:0
#PerTrained:0
#RelTrained:0
#StlTrained:0
#StrTrained:0
#ThvTrained:0
------------------AbilityMods-------------------------------
#StrMod:{FLOOR((Strength-10)/2)}
#ConMod:{FLOOR((Constitution-10)/2)}
#DexMod:{FLOOR((Dexterity-10)/2)}
#IntMod:{FLOOR((Intelligence-10)/2)}
#WisMod:{FLOOR((Wisdom-10)/2)}
#ChaMod:{FLOOR((Charisma-10)/2)}
#HalfLevel:{FLOOR(Level/2)}
-----------------Adjustments-------------------
#StrAdj:0
#ConAdj:0
#DexAdj:0
#IntAdj:0
#WisAdj:0
#ChaAdj:0
#ACAdj:0
#FortAdj:0
#RefAdj:0
#WillAdj:0
#InitAdj:0
---------------Other-----------------------------------------
Elevation:0
AttackState:0
DefenseState:0

MapTool geek-out: Creating flexible monsters FAST

Edit 7/15/2011: I put up a revised version of this post with a better set of damage tables and everything a day after the original went live. I’ve left the original below for posterity.

I run all of my D&D games using MapTool, whether online in the traditional MapTool way or in-person using my projector rig. I don’t use a pre-made campaign framework for my games, since I enjoy learning new things and I enjoy computer programming (as a hobbyist, not a professional). More of my posts about my learnings with MapTool can be found in my MapTool Education Central.

Today I spent a fair part of the afternoon creating flexible monster templates. This came about because I’m working on finishing up the third adventure in my Staff of Suha trilogy (part 1 is here, and part 2 is here), and I want to use custom monsters and to make it as easy as possible to run the adventure at multiple levels (adventure level 2, 4, 6, 8 and 10). I’m already updating older monsters to use the most current monster math, so I thought, why not create flexible templates for each monster role?

My goal was to make it so that I could create a new monster in very little time. All I wanted to have to do was pick a role, pick a level, and then write down any special abilities. All of the math should be baked in based on the level and role. This meant that I needed to change around my monster properties.

I’ll paste the full properties at the end of the post, but what follows is a discussion of the math you’ll see there.

The math

HP modifier is either 6, 8 or 10. Artillery and Lurkers get 6 hit points per level; Skirmishers, Soldiers and Controllers get 8; Brutes get 10. MaxHP follows the formula laid out by Wizards of the Coast post-MM3 (HP modifier times Level+1, plus Constitution).

Defenses are tied to level and role. By default, Armor Class is Level+14 and the non-AC defenses (NADs) are Level+12. Soldiers have AC of Level+16; Brutes and Artillery have AC of Level+12.

The AttackBonus is Level+5. Versus NADs it’s Level+3, but I handle that in the attack macros instead of here in the properties (maybe I should do the latter).

Ability scores default to 10+Half Level each. I tweak these based on monster flavor, of course. I haven’t seen this explicitly spelled out anywhere, but glancing through recent monsters, it appears to be about right.

Initiative is basically a Dexterity check – Dex mod plus half level. Brutes reduce this by 2, Skirmishers increase it by 2 and Soldiers increase it by 4.

The most interesting part comes with damage. The table laid out by Wizards of the Coast is nice in that it scales pretty steadily in terms of average damage (Level+8 on average for a single target attack). It’s a bit tricky, though, in that it uses varying numbers of d6s and d8s at different levels. I wanted an easy-to-program solution to this problem that would give me similar average damage and a similar-shaped damage distribution to the official numbers.

What I ultimately came up with was to always roll two damage dice and add a bonus. The size of the die varies with level. It starts as a d6 and increases by 1 every fourth level. No, that doesn’t mean it goes to a d8 at level 5 – it goes to a d7! I’m leveraging the power of MapTool here; it’s happy to roll a d7 or d17 or whatever you like, just as easily as a d6 or d8.

Thus, every attack rolls a pair of damage dice, ranging from d6s at 1st-4th level to d13s at 29th-20th level.

The static damage bonus goes up every level or every other level, starting at 2 and ending at 23. Thus, a first-level monster deals 2d6+2 damage on a normal attack and a 30th-level monster deals 2d13+23.

The distribution of results is going to be a bit different from the official results, especially at higher levels, but I like it. My damage expressions have a slightly narrower range (at 30th level, WotC’s minimum damage is 24 and maximum 52 while mine ranges from 25 to 49). However, my distributions have more variability within that range (if you roll four dice instead of two, it’s much less likely that you’ll get extreme results). Honestly, I think the shape of my damage distribution curve at higher levels is more fun; higher variance in a slightly narrower range.

Also, due to rounding I have a couple of spots on my table where the damage from one level to the next is actually the same; I’m not overly concerned, honestly.

Multi-target attacks deal a bit less damage; I won’t go into the details.

Recharge and encounter powers (and Brute attacks) also deal extra damage, which I handle in either the token properties for the Brute (altering the static damage) or in the individual attack macros for recharge and encounter powers.

The templates in action

Once I had finished putting these new properties together and creating token templates for each role, I started putting an encounter together.

Wow, was it fast! I knew I wanted a level 7 skirmisher, a level 8 soldier and a level 8 artillery. I copied the appropriate token templates, set the levels, tweaked a few stats (a bit more Reflex and a bit less Fortitude on the artillery; low Intelligence on the beast skirmisher, etc.) and then got to the meat of monster building – abilities.

I was able to focus all of my attention on what would be a cool ability for a monster to have. For instance, my Skirmisher is a beast called a Digger. It can grab an enemy with its Pincers. It can use a special move action to drag the enemy up to half its speed without requiring a check. It has a recharge power that lets it burrow under an enemy, trying to make the enemy fall into the newly created channel.

It literally took about five minutes. I gave no thought to math. I just thought about flavor and abilities.

I built this Digger with an eye on the level 8 version of the adventure, but when it comes time to run it at Adventure Level 2, all I need to do is change the level. One stat; that’s all.

The download

I figure that the best way to share this is in a campaign file that has all of the necessary properties and a set of the tokens. You can download that template file here. Note that this file was created in MapTool version 1.33.b66.

The properties

#---StatsToSetManually-----
#Level:1
#Role:Skirmisher
#HPModifier:8
#Spd:6
#NativeSize:Medium
#ActPts:0
#SaveBonus:0
#HeShe:It
#----StatsThatCanBeDefaulted---------
#MaxHP:{HPModifier+Constitution+(Level*HPModifier)}
#ArmorClass:{Level+14}
#Fortitude:{Level+12}
#Reflex:{Level+12}
#Will:{Level+12}
#AttackBonus:{Level+5}
#DamageBonus:{1+Level-FLOOR((Level+2)/4)}
#DamageDie:{5+FLOOR((Level+3)/4)}
#MultiTargetDamageBonus:{1+Level-FLOOR((Level+2)/4)-(1+FLOOR(Level/4))}
#MultiTargetDamageDie:{4+FLOOR((Level+3)/4)}
#Init:{HalfLevel+DexMod-ArmorPenalty+0}
#Strength:{10+HalfLevel}
#Constitution:{10+HalfLevel}
#Dexterity:{10+HalfLevel}
#Intelligence:{10+HalfLevel}
#Wisdom:{10+HalfLevel}
#Charisma:{10+HalfLevel}
#-----CalculatedOrStaticStats-----
#HitPoints:{MaxHP}
#TempHP:0
#BloodiedHP:{FLOOR(MaxHP/2)}
#DeathFails:0
*#HP:{Hitpoints}/{MaxHP} + {TempHP}
*#AC/Fort/Ref/Will:{ArmorClass} / {Fortitude} / {Reflex} / {Will}
*#Type:Level {Level} {Role}
*#Speed:{Spd}
*#Initiative:{Init}
*#ActionPoints:{ActPts}
*#Str/Con/Dex:{Strength} / {Constitution} / {Dexterity}
*#Int/Wis/Cha:{Intelligence} / {Wisdom} / {Charisma}
#E1:1
#E2:1
#E3:1
#E4:1
#E5:1
#R1:1
#R2:1
#R3:1
#R4:1
#R5:1
#PowerCharged:1
---------------------------Skills-------------------------------------
#ArmorPenalty:0
#Acrobatics:{HalfLevel+DexMod-ArmorPenalty+0}
#Arcana:{HalfLevel+IntMod+0}
#Athletics:{HalfLevel+StrMod-ArmorPenalty+0}
#Bluff:{HalfLevel+ChaMod+0}
#Diplomacy:{HalfLevel+ChaMod+0}
#Dungeoneering:{HalfLevel+WisMod+0}
#Endurance:{HalfLevel+ConMod-ArmorPenalty+0}
#Heal:{HalfLevel+WisMod+0}
#History:{HalfLevel+IntMod+0}
#Insight:{HalfLevel+WisMod+0}
#Intimidate:{HalfLevel+ChaMod+0}
#Nature:{HalfLevel+WisMod+0}
#Perception:{HalfLevel+WisMod+0}
#Religion:{HalfLevel+IntMod+0}
#Stealth:{HalfLevel+DexMod-ArmorPenalty+0}
#Streetwise:{HalfLevel+ChaMod+0}
#Thievery:{HalfLevel+DexMod-ArmorPenalty+0}
------------------AbilityMods-------------------------------
#StrMod:{FLOOR((Strength-10)/2)}
#ConMod:{FLOOR((Constitution-10)/2)}
#DexMod:{FLOOR((Dexterity-10)/2)}
#IntMod:{FLOOR((Intelligence-10)/2)}
#WisMod:{FLOOR((Wisdom-10)/2)}
#ChaMod:{FLOOR((Charisma-10)/2)}
#HalfLevel:{FLOOR(Level/2)}
---------------Other-----------------------------------------
Elevation:0

Reavers of Harkenwold – complete MapTool file

Since I ended up putting all of my Reavers of Harkenwold maps into an easy-to-import format and since I had saved almost all of the MapTool monster tokens I had created for the adventure, I figured I might as well bring it all together in a complete MapTool campaign file.

The linked file (which was created in MapTool version 1.3.b66) contains:

  • A big map with all of the individual encounter maps on it (feel free to copy these to separate maps within MapTool if you prefer
  • One copy of each monster and NPC token that I created for the adventure (CTRL+C and CTRL+V will make more)
  • Complete stats and attack macros for all of the monsters on their tokens
  • A generic monster token and a generic player character token
  • Campaign macros for basic things like dice rolling and toggling conditions on and off the tokens

Now, I’ll admit that there are a few things it doesn’t contain

  • A couple of maps are not present, as I didn’t use them in my run-through of Reavers of Harkenwold
  • A couple of monsters are missing (I believe the underground goblin leader is one, and there may be a couple of others) – I simply failed to save them after I’d created them
  • Not every monster is quite as fleshed out as I’d like (senses, equipment, etc.) but they’re totally ready to use (they’ve got hit points, defenses and attack macros, which is the important stuff).

Note that this by no means replaces the adventure itself. If you want to run Reavers of Harkenwold, you still need to get your hands on a copy of the adventure (there’s no background information or even information about which monsters appear in which encounter). This is just a tool to help you run it online.

If you happen to run Reavers using this campaign file, I would LOVE to hear about it! I had a ton of fun with the adventure, and this file should let you pick it up and go (assuming you’ve at least read through the adventure so that you know what the plot is!).

Download the Reavers of Harkenwold MapTool campaign file here.

MapTool – updated and new macros

I’ve spent a little time bringing the macros on my web site up to date with the latest versions that I’m using in my own games. You can see all of my macro code here.

A few changes of note:

  • Healing macro for PCs now handles healing surges and non-surge healing in one macro
  • Properties have been updated so that daily power tracking works properly (fun fact; having a property called D4 instead of Daily4 creates problems in a program that recognizes D4 as a four-sided die)
  • Added code to allow for encounter, X-times-per-encounter (such as Healing Word) and daily power tracking
  • Added macros for toggling states such as Dazed, Marked, etc.
  • Added short rest, extended rest, death saving throw and second wind macros
  • Revamped monster properties so that the items that need to be set manually are all grouped together (this makes for faster monster token creation)

I also realized that my list of macros on that page was getting insanely long, so I created an index at the top of the page that will let you jump directly to whatever macro you’re looking for. For convenience’s sake, I’ve reproduced that list below.

If there are any MapTool macros that you’re looking for but that you don’t see here, please let me know – I’m always looking for excuses to write new macros!

Links to individual macros:

Auras in MapTool

When using MapTool to run Dungeons and Dragons 4th Edition games, it’s useful to be able to show the players that a monster has an aura and which squares are and are not in that aura. Yes, MapTool can handle that!

The trick is to use lighting. I’ll admit that I don’t take advantage of the powerful lighting and vision blocking layer capabilities of MapTool; I just reveal the map as the party moves through an area by removing the fog of war manually. However, I don’t completely ignore lighting any more, now that I’ve discovered its uses in creating visible, color-coded auras for monsters (or PCs, but that’s rarer in my games).

To set up auras, go to Edit – Campaign Properties, and then navigate to the Light tab. Unless you plan to use the default light sources in your game, such as the candle or the torch, you can delete everything that’s here and replace it with auras.

I’ve set up three categories of auras – red, green and blue. To set up a category that will appear on the Light Source menu that pops up when you right-click on a token, enter a line of text for the category name, followed by a line of four dashes:

Auras - Red
----

Beneath the line of dashes, you can list your auras. The format is:

Aura name: aura square RadiusValue#HexCodeForColor

The aura name comes first, followed by a colon. Next, put the word “aura” to let the game know that this is just an effect that floats around the token rather than an actual light source that will reveal darkened sections of the map (if you’re using lighting in your game).

Next comes the word “square” to let MapTool know that this is a square aura (standard for D&D4e auras). Other possibilities include “circle” and “cone” but those aren’t going to come up in D&D4e.

Next comes the aura’s radius, measured in squares. The shortcut is to take the number of squares of the aura and add 0.5, so an Aura 2 would have a radius of 2.5. This is because an aura 2 is a 5 square by 5 square area, the radius of which is 2.5 squares.

Finally comes the hexadecimal code for the aura’s color (with no space between the radius and the hex code). I won’t go into the details of hexadecimal color codes as it’s not really my area of expertise (a better resource is here), but in a nutshell it starts with the pound sign “#” and then has two characters for the amount of red you want in the color, then two characters for the amount of green, then two characters for the amount of blue. The values for each color range from a low of 00 to a high of ff (hexadecimal is a base 16 system, and f is 16 – so ff is 255, since the counting starts at 0). Pure red is #ff0000, pure green is #00ff00 and pure blue is #0000ff. See this site for more options.

You can also add the “GM” option just before the radius if you only want the aura to be visible to the person running the game.

For my game, I have fifteen auras set up by default: red, green and blue, each ranging from an aura 1 to an aura 5. The code looks like this:

Auras - Green
----
Aura green 1 : aura square 1.5#00ff00
Aura green 2 : aura square 2.5#00ff00
Aura green 3 : aura square 3.5#00ff00
Aura green 4 : aura square 4.5#00ff00
Aura green 5 : aura square 5.5#00ff00 

Auras - Red
----
Aura red 1 : aura square 1.5#ff0000
Aura red 2 : aura square 2.5#ff0000
Aura red 3 : aura square 3.5#ff0000
Aura red 4 : aura square 4.5#ff0000
Aura red 5 : aura square 5.5#ff0000 

Auras - Blue
----
Aura blue 1 : aura square 1.5#0000ff
Aura blue 2 : aura square 2.5#0000ff
Aura blue 3 : aura square 3.5#0000ff
Aura blue 4 : aura square 4.5#0000ff
Aura blue 5 : aura square 5.5#0000ff

And if you want some GM auras, you can make them like so:

Auras - GM Only
----
Aura GM blue 1 : aura square GM 1.5#0000ff
Aura GM red 2 : aura square GM 2.5#ff0000

To give a creature an aura, right click on the token and go to Light Source. Find the aura you want and click on it. Note that you can give a token multiple auras if you want to.

As for auras in action, they look something like this.

A bullywug with a blue aura 2, a kruthik with a red aura 1 and an orc with a green aura 5

I hope you find this helpful. As always, if you have any MapTool questions, please ask! I love discovering the answers.

Length of 4e combat – Decision time, not calculation time

Geek Ken has a post over at This is My Game today talking about an idea for speeding up combat. He suggests doing away with rolling dice for damage and instead having fixed damage for each attack with some variety for crits, near-crits and barely-hits. The variety sounds like fun, but as I commented on that post, I don’t think the time it takes to roll and add up damage adds much to the problem of long combats.

What slows down combat is the time it takes to make decisions.

When I first started my Friday night online campaign in August 2010 with first-level characters, combat seemed to move at a pretty good pace. Lately, I’ve noticed that we’ve had some battles that have taken two hours to finish.

What has changed? The PCs are now eighth level rather than first level, and they have a lot more powers to choose from each turn. They have more interrupts on one another’s turns. They have magic item abilities to think about.

It’s probably also true that I haven’t had quite as much time to prepare for sessions as I did back in August, so maybe I’m fumbling around a little more on the bad guys’ turns. But I think I fumbled around back then, too, because I was a new DM. The time it takes me to run the monsters’ turns now is probably similar to what it was back then.

One of the reasons I’m so confident that it’s about decision-making time rather than mechanical time to roll and add dice is that we use MapTool macros that automatically handle the rolling and adding. When the fighter decides to use Crushing Surge, he clicks one button and the attack roll and damage roll show up for all to see, with the math done. Even if he’s rolling 12 dice for damage, it takes no longer than a single die.

What to do about this? Well, I don’t really know. Suggestions to streamline the math of combat won’t help me, since the computer is handling that part. Could I raise monster damage and lower monster hit points/defenses? That’s a possibility. I can have monsters flee or surrender when the fight is clearly lost (and I do that where appropriate).

In the end, it takes time for players to decide what they want to do on their turn. I have great players, and they pay attention and keep their heads in the game. They just have a lot of options at their disposal, and they enjoy the process of making the best decision on their turn. That’s the fun of a game that’s tactics-heavy, and I don’t want to take that away from the players. But it sure does take a long time!

MapTool – Stupidly complex multi-attack macro

I haven’t posted any MapTool macros in a while, but I just finished writing one that ended up being so stupidly complex that I just had to share it with the world.

First a disclaimer: Yes, I am aware that there are wonderful MapTool frameworks out there that will help automate everything and make it so that I barely need to touch any macros.  I write my own macros just for the fun of it because I’m nerdy like that.  I share them here on my blog because I know there are some other nerdy people out there who might be able to use some of my learnings in their own macros.

Okay, here’s the situation.  There’s a tiefling wizard coming up in a battle for my Friday night War of the Burning Sky campaign.  It’s not a big boss or anything like that, just an ordinary bad guy.  This creature has several different attack powers, as you might expect with a wizard.  The one particular attack power that I’m about to show you is called Dancing Lightning

  • Dancing Lightning involves three attacks (separate attack rolls, separate damage rolls) against three different creatures.
  • This is a recharge power, recharging on a 6.
  • As a tiefling, the creature gets a +1 bonus to attack rolls against bloodied targets.
  • The wizard has a magic staff with a daily power that she can use whenever she uses Dancing Lightning.  If she uses the daily, she deals some bonus damage to creatures in a close blast 3 (which might be some of the same creatures targeted by the attack, or it might not).

Now, I could handle this with separate macros to track just the recharging or just the daily power, and I could decide not to worry about the +1 to attack rolls against bloodied targets.  But instead I decided to go all-in and make this one macro handle everything.

First, the recharge bit:

[h: RechargeTarget=6]
[h: RechargeRoll=d6]
[if(R1!=1), CODE:
 {[if(RechargeRoll<RechargeTarget), CODE:
 {[g: assert(1==0,add("Recharge roll = ", RechargeRoll, ". The power fails to recharge."),0)]
 };{}]
 };{[setProperty("R1",0)]}
]

This is my standard recharge code.  It sets the target number for recharging at 6.  It rolls a d6 and stores the result as RechargeRoll.  It then checks a property on the token called R1 (which is equal to 1 when the battle begins and is set to zero after the power has been used).  If R1 is not equal to 1 (that is, it’s zero because the power has already been used at least once), then the macro checks to see if the recharge roll was at least 6.  If not, it uses the ASSERT function to give an error message (no recharge) and the macro ends.  If the recharge roll is 6, then the macro moves on.  Finally, if R1 was equal to 1 (that is, if the power hadn’t been used yet this battle), the macro sets it to zero so that it won’t work next time unless it recharges.

Next, the standard attack macro setup stuff:

[h: AttackName="Dancing Lightning"]
[h: AttackBonus=14]
[h: Defense="Reflex"]
[h: NumDice=2]
[h: DamageDie=6]
[h: DamageBonus=5]
[h: DamageString="lightning damage."]
<b>[AttackName]</b><br>

Here I set up the name of the attack to be displayed, the attack bonus, the defense that is being attacked, the number of damage dice I’m going to roll, the size of the damage die, the number I’m adding to the damage dice and the text that I want to display after the damage number (in this case, “lightning damage”).  The last line displays the name of the attack in the chat window in bold type and then inserts a line break.  Simple stuff.  I only bother using these variables because for most attacks I just set these things at the top of my code and then I’m done.

Now we get into the stuff for the first actual attack and damage roll:

[h: x=input("FoeBloody|No,Yes|Is the first target bloodied?|RADIO|VALUE=STRING")]
[h: abort(x)]
[h: AttackBonus=if(FoeBloody=="Yes",AttackBonus+1,AttackBonus)]
[h: DamageRoll=roll(NumDice,DamageDie)]
[h: d20roll=d20]
[h: AttackRoll=d20roll+AttackBonus]
[h: MaxDamage=NumDice*DamageDie+DamageBonus]
[h: RegularDamage=DamageRoll+DamageBonus]

The first line above will result in me getting a pop-up dialog box that asks if the first target is bloodied.  The second line will end the macro if I click “Cancel” in that pop-up.  The third line checks to see if I said the first target was bloodied; if so, it adds 1 to the attack bonus (the tiefling ability).After that, the macro does a damage roll (2d6 in this case). It does a d20 roll for the attack, adding the attack bonus and calling it AttackRoll.  It calculates the maximum possible damage (in case of a crit) as well as the regular damage (from the damage roll plus the bonus).  Again, pretty simple.

Next, I display the results of the first attack in the chat window:

Attack 1: [d20roll] + [AttackBonus] = <b>[AttackRoll]</b> versus [Defense]<br>
[if(d20roll==20), CODE:
 {<font color=Red>--CRITICAL HIT--</font><br>
 Hit 1: [NumDice*DamageDie] + [DamageBonus] = <b>[MaxDamage]</b> [DamageString]
 };
 {Hit 1: [DamageRoll] + [DamageBonus] = <b>[RegularDamage]</b> [DamageString]}
]

The first line shows something like: “Attack 1: 7 + 14 = 21 versus Reflex”  Then I check to see if there was a critical hit.  If so, I display the maximum damage (along with a crit message); otherwise, I show the damage that was rolled for this attack.  Again, standard stuff from my regular attack macros.

After this, I repeat those last two sections (starting with the FoeBloody piece) for the second and third attacks (changing the language to “second target,” “Attack 2,” “Hit 2,” and so on).  I put a couple of line breaks in between as well.

Finally, there’s the piece of code to deal with whether I want to use the bonus daily damage in a close blast 3 or not.  Generally I’ll just use it at the first opportunity, of course – this is a recharge 6 power, which means it’s highly unlikely that I’ll get a second chance to use it.  But hey, for the sake of completeness, I wanted the option to be built in to the macro.

[if(E2==1), CODE:
 {[h: x=input("UseDaily|Yes,No|Use the daily close blast 3 power now?|RADIO|VALUE=STRING")]
 [h: abort(x)]
 [if(UseDaily=="Yes"),CODE:
 {[h: E2=0]
 <br><br><i>Quarterstaff of Storms</i>: Each enemy in a close blast 3 takes an additional [d8] lightning and thunder damage.
 }; {}
 ]
 };
 {}
]

This one is very messy to look at, mainly because it uses nested IF statements (an IF within an IF).  It first looks at a property of the wizard token called E2 (this is for her second encounter power – the first is Infernal Wrath).  If E2 equals one, that means that I haven’t already used this daily yet, in which case the code moves on to ask me if I want to use it this time.  It does so with another pop-up dialog box:

Now, if I do choose to use the daily power, the macro sets E2 equal to zero (to show that the power has been used up).  It then inserts two more line breaks, displays the name of the daily power in italics and then says what happens to the enemies in the blast (including the damage roll).  Note that if E2 were equal to zero (meaning that the daily item power had already been used), then the rest of the code is skipped over.

When I run the power, the output in the chat window looks like this:

And the finished macro in all its glory is as follows:

[h: RechargeTarget=6]
[h: RechargeRoll=d6]
[if(R1!=1), CODE:
 {[if(RechargeRoll<RechargeTarget), CODE:
 {[g: assert(1==0,add("Recharge roll = ", RechargeRoll, ". The power fails to recharge."),0)]
 };{}]
 };{[setProperty("R1",0)]}
]

[h: AttackName="Dancing Lightning"]
[h: AttackBonus=14]
[h: Defense="Reflex"]
[h: NumDice=2]
[h: DamageDie=6]
[h: DamageBonus=5]
[h: DamageString="lightning damage."]

<b>[AttackName]</b><br>

[h: x=input("FoeBloody|No,Yes|Is the first target bloodied?|RADIO|VALUE=STRING")]
[h: abort(x)]
[h: AttackBonus=if(FoeBloody=="Yes",AttackBonus+1,AttackBonus)]
[h: DamageRoll=roll(NumDice,DamageDie)]
[h: d20roll=d20]
[h: AttackRoll=d20roll+AttackBonus]
[h: MaxDamage=NumDice*DamageDie+DamageBonus]
[h: RegularDamage=DamageRoll+DamageBonus]

Attack 1: [d20roll] + [AttackBonus] = <b>[AttackRoll]</b> versus [Defense]<br>
[if(d20roll==20), CODE:
 {<font color=Red>--CRITICAL HIT--</font><br>
 Hit 1: [NumDice*DamageDie] + [DamageBonus] = <b>[MaxDamage]</b> [DamageString]
 };
 {Hit 1: [DamageRoll] + [DamageBonus] = <b>[RegularDamage]</b> [DamageString]}
]

[h: "Second Attack"]
[h: x=input("FoeBloody|No,Yes|Is the second target bloodied?|RADIO|VALUE=STRING")]
[h: abort(x)]
[h: AttackBonus=if(FoeBloody=="Yes",AttackBonus+1,AttackBonus)]
[h: DamageRoll=roll(NumDice,DamageDie)]
[h: d20roll=d20]
[h: AttackRoll=d20roll+AttackBonus]
[h: MaxDamage=NumDice*DamageDie+DamageBonus]
[h: RegularDamage=DamageRoll+DamageBonus]
<br><br>
Attack 2: [d20roll] + [AttackBonus] = <b>[AttackRoll]</b> versus [Defense]<br>
[if(d20roll==20), CODE:
 {<font color=Red>--CRITICAL HIT--</font><br>
 Hit 2: [NumDice*DamageDie] + [DamageBonus] = <b>[MaxDamage]</b> [DamageString]
 };
 {Hit 2: [DamageRoll] + [DamageBonus] = <b>[RegularDamage]</b> [DamageString]}
]


[h: "Third Attack"]
[h: x=input("FoeBloody|No,Yes|Is the third target bloodied?|RADIO|VALUE=STRING")]
[h: abort(x)]
[h: AttackBonus=if(FoeBloody=="Yes",AttackBonus+1,AttackBonus)]
[h: DamageRoll=roll(NumDice,DamageDie)]
[h: d20roll=d20]
[h: AttackRoll=d20roll+AttackBonus]
[h: MaxDamage=NumDice*DamageDie+DamageBonus]
[h: RegularDamage=DamageRoll+DamageBonus]
<br><br>
Attack 3: [d20roll] + [AttackBonus] = <b>[AttackRoll]</b> versus [Defense]<br>
[if(d20roll==20), CODE:
 {<font color=Red>--CRITICAL HIT--</font><br>
 Hit 3: [NumDice*DamageDie] + [DamageBonus] = <b>[MaxDamage]</b> [DamageString]
 };
 {Hit 3: [DamageRoll] + [DamageBonus] = <b>[RegularDamage]</b> [DamageString]}
]

[if(E2==1), CODE:
 {[h: x=input("UseDaily|Yes,No|Use the daily close blast 3 power now?|RADIO|VALUE=STRING")]
 [h: abort(x)]
 [if(UseDaily=="Yes"),CODE:
 {[h: E2=0]
 <br><br><i>Quarterstaff of Storms</i>: Each enemy in a close blast 3 takes an additional [d8] lightning and thunder damage.
 }; {}
 ]
 };
 {}
]

MapTool states should differ for online and in-person play

I’ve been running my online Dungeons and Dragons 4th Edition game for several months now, and MapTool has been fantastic for running the game.  The players have macros for their powers and abilities, we can keep track of hit points electronically, etc.  It’s also great because it’s easy to keep track of all of the conditions that can be put onto a character – bloodied, prone, marked, cursed, ongoing damage, weakened, dazed… the list goes on and on.  My MapTool states for the online game consist of little icons that can show up over a token in a 3 by 3 grid (so there can be up to nine states on a token at once).

A token that is granting combat advantage, dazed, slowed, taking ongoing damage, marked, cursed and bloodied

I love this about MapTool for in-person games that I run using my projector, too.  Unfortunately, it’s much harder to make out the details on a monster token when I’m using the projector because I have to keep the map zoomed pretty far out in order to project a grid with 1-inch squares.  This means that it’s really hard for the characters to see all of the states on a creature.  Is that guy bloodied?  Is he marked?  What about prone?

The solution here is a combination of using bigger states and using different states.

  • Bloodied: The most important state.  Instead of an icon on the image, use a red circle around the token
  • Prone: A purple triangle (actually a yield sign)
  • Marked: A blue or green X (have two different marks available in case you have multiple defenders in your party)
  • Cursed/Quarried/Oathed/etc.: An orange cross
  • Other: Normal icons, but in a 2 by 2 grid instead of 3 by 3 (so they’re bigger)

The most important states for players to be able to see clearly are those that are most likely to affect their interaction with a creature.  They have to know if it’s bloodied, prone, marked, or subject to a striker ability (quarry, etc.).  It’s nice to know if the bad guy is dazed or has -2 to its defenses or it’s slowed, but not AS important.  The really important conditions, therefore, should get big, prominent marks across the face of the token.  The less-important conditions can rely on the 2 by 2 grid (at the very least, you as the DM can still zoom in on them on your screen to see what they are.

The easily-visible conditions can be tailored to your own campaign, of course.  Every defender should have his or her own color of marks, but they can all use the same symbol (since a new mark will override an old one, you’ll never have to worry about making multiple marks visible).  If you have multiple strikers that can put conditions on a creature, you’ll want to use multiple shapes (maybe a cross for one and a diamond for another).  Assassin shrouds are tricky – I haven’t yet come up with a good way to keep track of how many are on a creature, but fortunately my regular games don’t include any assassins (though I see them occasionally at convention games).

Bottom line: Icons are great for understanding what a particular symbol means, but they’re hard to see at a distance.  Colorful shapes are better for in-person games with a projector.

MapTool macros: Improved tracking of encounter/daily powers

I’ve been having fun playing with my MapTool campaign file recently.  One of my latest improvements is to add actual tracking for encounter powers and daily powers so that the players can know which powers they’ve used and which are still available.

In an earlier post I described my addition of code to the encounter and daily power macros that would give the player an error message if they tried to use a power that had already been used.  The code is basically as follows:

[h, if(E1==0), CODE:
{[assert(1==0,add(“This power has already been expended.”),0)]
};{[h: E1=0]}
]

Each macro will need its own E1, E2, E3, Daily1, Daily2, Daily3, etc. property to modify and check.  This is nice, but the player only figures out that they can’t use the power again if they try to do so.  What would be even better? A visual cue to show the player that the power is gone.

Enter the MetaMacro!  I didn’t learn until recently that MapTool macros can change the macro button itself.  One of the simplest things to change is the background color of the button.  I want the button to turn dark gray after a power is used up, so:

[h: setMacroProps(getMacroButtonIndex(), “color=darkgray”) ]

This piece of code uses the setMacroProps function to set the color property to “darkgray”.  The setMacroProps function takes two arguments: the index number of the macro whose button you want to change, and then a string that says what property you want to change and what you want the new value to be.

I didn’t know that each macro on a token has an index number, but it’s true.  I’m not sure how they’re assigned (perhaps the order in which you create them).  Fortunately, there’s a function you can use to get MapTool to tell you the index number of the macro you’re currently running.  That’s the getMacroButtonIndex() function that you see above.  It takes no arguments, and it just gives you the index number of the button.  Perfect!

Witchfire has been expended; Otherwind Stride is still available

Next, I had to write some code to turn the buttons back to their original color when the character takes a short rest (encounter powers only) or an extended rest (both encounter and daily powers).  This ended up being quite a bit trickier, but I finally figured it out.

[h, foreach(currentMacroName, getMacros()), CODE:
{
[h, foreach(currentMacroIndex, getMacroIndexes(currentMacroName)), CODE:
{
[h: myProps=getMacroProps(currentMacroIndex)]
[h: currentButtonColor=getStrProp(myProps, “color”)]
[h: currentFontColor=getStrProp(myProps, “fontColor”)]
[h: encounterPower=if(currentFontColor==”red” || currentFontColor==”purple”, 1, 0)]
[h: changeThisButton=if(currentButtonColor==”darkgray” && encounterPower==1, 1, 0)]
[h, if(changeThisButton==1): setMacroProps(currentMacroIndex, “color=default”) ]
}]
}]

Okay, what’s going on here? This piece of code loops through every macro on the token (that’s the first line), gets the index number for that macro (that’s the third line, counting the curly bracket as line 2), then checks to see if that macro needs to have its color changed.  That involves getting a string containing all of the properties for the macro (getMacroProps(currentMacroIndex)) and extracting the button color and font color for that macro.

In my campaign, the buttons for attack macros and special abilities use the default color for their background and a color-coded system for the text (green for at-will powers, red for encounter powers, purple for twice-per-encounter powers and blue for daily powers).  The short rest macro only resets encounter and twice-per-encounter powers, so it checks to see if the button is currently dark gray (expended) and the font is red or purple.  If so, it changes the color back to the default.  Otherwise, such as with a daily power, it leaves the button alone.

The same piece of code for extended rests looks like this:

[h, foreach(currentMacroName, getMacros()), CODE:
{
[h, foreach(currentMacroIndex, getMacroIndexes(currentMacroName)), CODE:
{
[h: myProps=getMacroProps(currentMacroIndex)]
[h: currentButtonColor=getStrProp(myProps, “color”)]
[h: currentFontColor=getStrProp(myProps, “fontColor”)]
[h: encounterOrDaily=if(currentFontColor==”red” || currentFontColor==”blue” || currentFontColor==”purple”, 1, 0)]
[h: changeThisButton=if(currentButtonColor==”darkgray” && encounterOrDaily==1, 1, 0)]
[h, if(changeThisButton==1): setMacroProps(currentMacroIndex, “color=default”) ]
}]
}]

Pretty much the same thing, except now it looks for fonts that are red, purple OR blue.

By the way, I’m aware that there are complete campaign frameworks out there, such as Rumble’s, and I’ve talked about them in an earlier post.  They’re great and very cool and they do everything that my code does and more.  But I write macros for the joy of it, and I love to learn about the language of MapTool.  My posts are intended to help other do-it-yourselfers out there who want to write their own code because they enjoy it.  If this isn’t for you, I highly recommend using a pre-packaged campaign framework – they’re quite slick!

In future posts I’ll talk more about my Short Rest and Extended Rest macros, and the concurrent improvements I’ve made to the healing macro.  Please let me know if there are particular macros that you’d like to hear about!

MapTool macros: Tracking encounter/daily powers

Update 10/7/2010: I’ve written another post that expands and improves on this one.

Update 3/29/2011: I’ve updated the daily properties from D1-D10 to Daily1-Daily15.

Over the past few weeks as I’ve continued running my online campaign through the War of the Burning Sky saga, I’ve made some tweaks to my MapTool framework.  Part of this has been driven by one of my players, who has also been using MapTool in her own game and has had some good ideas for improving the player character tokens.

Specifically, she suggested adding buttons for every character ability, even if it didn’t involve rolling dice, just so the players would remember that those abilities existed.  She also added some notes to her character sheet to remind her of things like her damage resistance and so on.  Good thinking!  I plan to do this for the rest of the PC tokens.

I’ve starting making some other changes as well.  I’ve added a Saving Throw button for each character.  Yes, it’s generally just a d20 roll and we do have buttons for that, but one character has an artifact that gives him a +2 bonus to saving throws, so I figured we might as well have a button that includes any modifiers to saves.

I’ve added a set of buttons for ability checks (Strength check, Dexterity check, etc.).  These don’t come up as often as skill checks, but they do come up enough to make it worthwhile to add macros for them.

I’ve also decided that it’s time to code up the tracking of encounter and daily powers.  I’d love it if I had an easy way for a character to tell at a glance which powers hadn’t been used yet, but failing that I can at least add logic to let the player know, “Sorry, you’ve already used that power.”  Here’s how I’ve done it:

  • I’ve added properties E1 through E15 for each character (I can add more later if PCs have more than 15 encounter powers).  These have default values of 1.
  • I’ve also added Daily1 through Daily15 for dailies (default of 1) and S1 through S3 (default value of 2) for special twice-per-encounter powers (Healing Word, etc.).
  • Note that you can’t use D1, D2, etc. because MapTool will recognize those as dice rolls (like d6 and d20).
  • In each encounter/daily/special power macro I’ve added a bit of code that looks something like this:

[h, if(E1==0), CODE:
{[assert(1==0,add(“This power has already been expended.”),0)]
};{[h: E1=0]}
]

That code checks to see if the property for that power has been expended (equal to zero) and if so uses the ASSERT function with a false condition (1==0) to display a message and exit the macro.  If it hasn’t been expended, it sets the property to 0 (or reduces it by 1 in the case of twice-per-encounter powers).  Note that each encounter power uses a different property (E1, E2, etc.).

Finally, I’ve created a Short Rest macro that resets all of the E and S properties back to their default values.  I plan to eventually add a function to the Short Rest macro that lets the player specify how many surges they want to spend and restores that many hit points, but one thing at a time.  I’ll need to add an Extended Rest macro at some point as well, refreshing dailies, healing surges, etc.

What macros am I missing here?  Are there things that I should be adding for my PCs?  I’m feeling pretty good about the direction my campaign is going, and I’m having a great time with it so far!