Tomorrow Comes Today

Main Menu

Social Networks

@Christopher Halse Rogers · Oct 11, 2008 · 2 min read

The Will to Macros

The excellent MapTool full of useful features. One of which is the ability to associate macros with tokens - particularly useful it 4E D&D, since the maximum number of different attacks a character can have is less than 10.

Again, this is sub-optimal: a natural 20 on the to-hit is a critical, which does maximum damage. We can get this behaviour using MapTool's ability to assign variables, and the fact that eq(var, 20) = 1 iff var = 20 and 0 otherwise.

I'm not sure how to suppress output from these macros, and MapTool seems to evaluate only the first full expression in [ ]. Feel free to remedy these flaws in the macro, which ends up as: