Macros (Roll20)

If you’re like me, you like to play Pathfinder in a way that is more like a computer RPG than a math class. To do this, Macros can make it super easy to turn hunting through your character sheet for the right button into a single click for moves and abilities.

For a more advanced course on Menu-Based Powercards, click here:

How to make an options menu powercard macro!

This guide will cover three topics:

  • How to make Macros
  • Useful Macro Variables and Tricks
  • Powercard Formatting

The first section will cover where you can go to put in the values. The second will show you what you can use to simplify your moves, and the third will show you how to format these into the fancy-looking powercard equations you now see in the game (as of 1/15/15).

 

HOW TO MAKE MACROS

Step one of making macros is to understand what macros do in Roll20 and the two types of macros you have to work with: Token Macros and Player Macros.

Token Macros are made on your character journal page. When you open your character there are three pages you can edit: The Bio and Image page, the Character Sheet, and the Attributes and Abilities page. The last one, Attributes and Abilities, has two columns. You will want to leave the Attributes column (on the left) as is and don’t touch it (since this works with your character sheet) The right column, Abilities, is where you make Token Macros. Token macros appear on your screen only when you are clicking on your player token, and are typically the superior way of making macros since they are bound to your character. You can make as many here as you like, and depending on the checkbox you click will appear in different place. If you check “Show as Token Action” they will only appear when you click your token. If you check “Show in Macro Bar” they will appear as Player Macros. Clicking “Add” will add a new macro to your listing. When you highlight a macro you will see a pencil, three lines, and an X on the right of the macro field, the pencil allows you to edit and input your code, the three lines allow you to click and drag it into a new order vertically on the window, and the X will delete the macro. When editing, you must click the checkmark when you are done for your changes to be saved and ready for use.

Player Macros are made on your “Options” page, accessed by clicking the Gear image on the top right of the chat bar. These will appear at the bottom of your screen at all times. These can be good for certain universal things, such as a macro to whisper a player or GM, but typically are not great for character specific actions since they will always stick around and clutter up your screen. They are edited in the same fashion and with the same image buttons as Token Macros. You will notice that some macros appear in your Player Macros area at all times, such as Sneaky Roll and GM-Whisper, these are ones made by the GM to help facilitate certain actions in game.

The order of the macros on either your token bar or player bar are a strange and mysterious thing. For Player Macros, they will appear left to right in the order they were checked to appear in Macro Bar (so if you want to reorder them, simply uncheck all of your macros and then re-check them in the order you want them to appear. For Token Macros they will generally follow the order they are listen in on your Abilities column until you reach a total of 10 Macros and then the order goes to hell and gets randomized (as far as I have been able to tell, anyway).

Macro Titles: When you are ready to make your first macro, click Add on your Abilities column and click the pencil to edit. You will get an open window with a title field of “New Ability 0” and an empty text box. The “New Ability O” field is what will appear as your button when you click on your character or on your macro bar, and as a general rule you want these to not be very long titles as you may end up with 5 to 30 macros before you are done making them. The text field follows.

Macro Input area: The big empty block below the title is where you put your code for what you want the macro to do. It is important to remember that macros are simply text entry shortcuts for the chat window, and while they will make your life super easy the macro input area is literally just copying and pasting what you write into the chat window for you. Each line in the input area will be considered a new line in the chat window and break your text accordingly if you hit enter or return. Text that is being wrapped by typing to the edge of the window will display in-line where possible.

 

MACRO CODES, VARIABLES, AND USEFUL TRICKS

These guides will do far more to help you get started than anything I can type, so check them out first:

https://wiki.roll20.net/Macros

https://wiki.roll20.net/Useful_Macros

Note the areas on selection macros and input variables.

Collapsed Rolls: Housing a calculation in [[Calculation]] will only display the final number.

[[1d20+5]]

[19]

Emotes: These make your character talk and appear as orange text!

/em takes a bow!

Johnny takes a bow!

Targeting: @{target|token_name} will prompt you to click on a target player on the table and then use that player’s name in the macro.

/em studies his target: @{target|token_name} !

Johnny studies his target: Bob!

Variable Inputs: Sometimes you have an ability you want to be able to toggle on or off. You could make two macros, one using it and one not using it, but it can be simpler just to have a variable input option in the equation. To do this, you need to add the following where you would want it to be used: ?{Variable Text Here|Default Value Here}. For Example:

[[1d20-?{Using Power Attack? 0 for no 3 for yes|0}]]

Would, on clicking the macro, cause a pop-up to appear asking the player “Using Power Attack? 0 for no 3 for yes” with an input field having the number “0” already entered by default. If you don’t want a number in there by default, simply remove the “|” and the number that follows it from the code. In this case, as an attack macro it will be a “–“ before the ?{code} for power attack since power attack lowers the accuracy. For the damage you would want to have a “+” before the code.

With variable inputs, if the text is exactly the same in the “Variable Text Here” portion but is used multiple times it will use the default value(or whatever you type in) indicated on the first prompt for ALL uses of it in the macro. This can be great if it is a toggle that needs to be used lots of times, but for something like Power Attack your damage roll would need to be different than your attack roll (since Power Attack gives you -1 to attack and +2 to damage). An example of this would be:

/em attacks (Power Attack: ?{Are you using Power Attack|No)!

ATK1: [[1d20+8-?{Power Attack – Attack Roll change to 1 if using it|0}]]

DMG1: [[1d10+{STR-mod}+?{Power Attack – Damage Roll change to 6 if using it|0}]]

ATK1: [[1d20+3-?{Power Attack – Attack Roll change to 1 if using it|0}]]

DMG1: [[1d10++{STR-mod}+?{Power Attack – Damage Roll change to 6 if using it|0}]]

 

These three lines would create a macro that has 3 variable inputs. It will ask if you are using power attack, then check if you are using the attack roll and then check the damage roll. Since this is a full round attack, it will copy your decisions for your first attack roll into the second attack (and since the text is the same it will only give three prompts instead of five). Note the “8” and “3” are the Base Attack Bonuses for this character at level. Giving a Final Output that looks like:

Johnny attacks (Power Attack: No)!

ATK1: [21]

DMG1: [9]

ATK1: [30]

DMG1: [12]

Variable Inputs can do a lot of neat things! Use the heck out of them.

Character Sheet Values: You can also calculate directly from your character sheet when needed! If you mouse-over a value of your character sheet you should see a mouse-over tip with the value of that field (such as {BAB} for base attack bonus or {Perception} for perception. You can add these into a macro roll very simply:

/em looks around!

Perception Check: [[1d20+@{Perception}]]

This will bring whatever the value of your Perception total into your check roll, giving an output like this:

Johnny looks around!

Perception Check: [19]

Some character sheet values don’t work all that well, and some are usually no problem. Skills, Ability Mods, and Saves are always good things to use. Attack values (especially Base Attack Bonus) are typically problematic as if there are variations (such as having multiple attacks with BAB), they aren’t recognized by the character sheet at present (1/15/15).

 

Powercards

Powercards take the information above and make it into a pretty formatted table when used in chat. They have several levels to them (Emote, Title, Body) that each do different things, but there are some general rules that have to be understood before trying to make one.

First, and most importantly, you cannot use any of the following characters in your text area of your macros (aside from the Emote section): “;”  “,” “:”       (Commas, Colons, and Semicolons will destroy the formatting and cause crazy errors!)

Ok, so now that that’s understood, Powercards work through the “!power” command. Basic details can be found here: https://app.roll20.net/forum/post/1463736/script-powercards-2/#post-1511920

You can change colors, fonts, and all sorts of things using the commands listed on that website, but by default the Emote (if used) will show your character token and white text, the title will be your player color (indicated at the bottom of the page, same as your ping, measuring lines, etc.), and the body will be alternating gold lines.

Powercards must be as one line. Any breaks via hitting enter or return will stop the card and give you wonky outputs.

Here is a sample attack powercard, as it will appear in your macro and then broken apart to show what is going on:

As in the macro:

!power –charid|@{character_id} –emote|spins forward, her wooden seperating-staff a whirlwind of power! –name|Sansetsukan+1 –leftsub|Melee –rightsub|Two Hand –PowerAttack|?{Are you using Power Attack|Yes} –BHloodrageing|?{Are you using Bloodrage?|Yes} –ATK1|[[ [HR19] 1d20]][[1d20+1+1+8+(@{STR-mod}+?{Bloodrage1xx0forNo|2})+?{GERIwithin20ftxx-5forno|2}]] –DMG1|[[1d10+1+(@{STR-mod}+?{Bloodrage1xx0forNo|2})+?{1stPowerAttackxx0forno|6}]] –Misc1|On hit:[[1d6]] Cold DMG & Crit: 19-20×2 –ATK2|[[ [HR19] 1d20]][[1d20+1+1+3+(@{STR-mod}+?{Bloodrage1xx0forNo|2})+?{GERIwithin20ftxx-5forno|2}-?{PowerAtk2ndAtkPenaltyxx0ifno|3}]] –DMG2|[[1d10+1+(@{STR-mod}+?{Bloodrage1xx0forNo|2})+?{1stPowerAttackxx0forno|6}]] –Misc2|On hit:[[1d6]] Cold DMG & Crit: 19-20×2 –Also|On critical hit: the target must succeed at a Will saving throw or be confused for 1 round (DC=14). This is a mind-affecting compulsion effect. If successful hit, may attack again at full BAB through cleave.

Now let’s break this down to take a look at what is actually going on here. I’m going to look at each piece of the macro, but keep in mind that powercards are always one line with each element separated by a space.

!power This begins the macro and tells the system it will be a powercard.

Emote section:

–charid|@{character_id} This tells the system to use the image of the character token the token macro is housed with.

–emote|spins forward, her wooden seperating-staff a whirlwind of power! This shows the text being used in the macro, you still should avoid using “;” “:” or “,” though.

 

Title Section:

–name|Sansetsukan+1 This will be the title of the card, in large text

–leftsub|Melee this is the subheader on the left

–rightsub|Two Hand this is the subheader on the right

 

Body Section:

Each of the lines below are a different line on the body of the Powercard. Note that the titles are all different for each element (so: –Title1|blah –Title2|Blah ). Each of these will run the macros we worked on earlier in their own line so they appear fancy and pretty.

–PowerAttack|?{Are you using Power Attack|Yes}

–BHloodrageing|?{Are you using Bloodrage?|Yes}

–ATK1|[[[HR19]1d20+1+1+8+(@{STR-mod}+?{Bloodrage1xx0forNo|2})+?{GERIwithin20ftxx-5forno|2}]]

–DMG1|[[1d10+1+(@{STR-mod}+?{Bloodrage1xx0forNo|2})+?{1stPowerAttackxx0forno|6}]]

–Misc1|On hit:[[1d6]] Cold DMG & Crit: 19-20×2

–ATK2|[[[HR19]1d20+1+1+3+(@{STR-mod}+?{Bloodrage1xx0forNo|2})+?{GERIwithin20ftxx-5forno|2}-?{PowerAtk2ndAtkPenaltyxx0ifno|3}]]

–DMG2|[[1d10+1+(@{STR-mod}+?{Bloodrage1xx0forNo|2})+?{1stPowerAttackxx0forno|6}]]

–Misc2|On hit:[[1d6]] Cold DMG & Crit: 19-20×2 –Also|On critical hit: the target must succeed at a Will saving throw or be confused for 1 round (DC=14). This is a mind-affecting compulsion effect. If successful hit, may attack again at full BAB through cleave.

Did you notice that on the attack rolls there are some fancy new additions? Lets take a look:

–ATK1|[[[HR19]1d20+1+1+8+(@{STR-mod}+?{Bloodrage1xx0forNo|2})+?{GERIwithin20ftxx-5forno|2}]]

Note the addition of a [HR19] before the initial 1d20. This will extend the range of the critical to 19 or 20, marking it as green, rather than the default 20 only in Roll 20. If you have extended critical range this is very useful! You can also do the same with the critical miss range with “LR”

 

And that’s about it for a basic crash course! Play around with it and have fun!