Wednesday, March 18, 2020

125 A Veritable Grab Bag

Listen to episode 125

Roll20 Macros:
  • When in the Roll20 game environment look for the macros tab (right top, 2nd from right icon). 
  • Add one and name it something simple. Make sure your bottom menu bar for macros is turned on and that you check the box so that your macro shows there. 
  • Let's start with a simple one called #hammer. (The hashtag is added automatically to the name of the macro). I'm putting the actual macro you type in italics.
  • Anaxagoras swings his war hammer, to hit [[(1d20+1)]], dealing [[1d6+1]] damage. This means whenever you tap hammer you get something like "Anaxagoras swings his war hammer, to-hit [17], dealing [4] damage. (The numbers show up in little boxes, which is why I put in the brackets. Also, critical rolls are bordered green while rolls of a nat 1 are bordered red.)
  • Now, let's say we want to give ourselves the option to input different attribute bonuses (say it's a dagger and it matters whether we throw it – DEX – or stab with it – STR). We could write the macro to ask for input via a dialogue box like this: Anaxagoras attacks with his dagger, to hit [[(1d20+?{ATTR|1})]], dealing  [[1d6+?{ATTR|1}]] damage. The ?{ATTR|1} code works like this. The ? means ask for input. The input is a variable called ATTR (for attribute). The name of the variable won't be printed. The |1 sets the default to 1. So when the dialogue pops up, there will be a 1 already in the box. If you don't need to change it, you can just hit submit. For my own taste, too much input feels like it destroys the efficiency of the macro. I'd be more likely to make two macros: #dag-stab and #dag-throw and just hard code in the bonuses. 
  • Now let's do something fancy. Let's say we are playing 5e and our bonus to melee attack is +5 and the damage is +2. Anaxagoras swings his war hammer, hitting AC [[1d20+5]], dealing  [[1d6+2]] damage. See the difference? Instead of reporting the roll, I'm saying what AC I hit. Like "Anaxagoras swings his war hammer, hitting AC [17], dealing [5] damage."
  • Descending AC "THAC0" games are a little tougher, in that the math is weirder and the input box (for whatever reason) can't take negative modifiers. But the same attack (different bonuses of +1 to attack and damage) for Labyrinth Lord might look like: Anaxagoras swings his war hammer, hitting AC: [[(19-(1d20+1)]] and dealing [[1d6+1]] damage. 
  • Remember what I said about the input box? This more fancy code only works when the input attributes are positive. Anaxagoras swings his war hammer, hitting AC: [[(19-?{ATTR|1}) - (1d20+?{Bonus|0})]] and dealing [[1d6+1]] damage. This code asks for attribute input and roll modifier input. You can put a 1 (+1) in, but you can't put -1 in. So ... not that helpful. But cool. 

1 comment:

  1. Thank you for this, this explained the macros very well! I wish they had some conditional logic built it, but the documentation doesn't show me anything on that :/