Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Fun Macros for non-api users such as myself

Hello! So, I'm a poor man who doesn't have access to the API scripts that roll20 has to offer, but I really enjoy making/improving macros that I find in order to try and make my DnD games run a bit more smoothly, for both me and my player. So if there is anyone out there who is interested, I'll be adding new macros that I create/redevelop along the way, plus some that I already have going for me. For example, here is the unarmed damage macro that I came up with: &{template:atkdmg} {{mod=+[[@{selected|PB}+@{selected|strength_mod}]]}} {{rname=Unarmed}} {{r1=[[1d20+@{selected|PB}+@{selected|strength_mod}]]}} {{always=1}} {{r2=[[1d20+@{selected|PB}+@{selected|strength_mod}]]}} {{attack=1}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[{1,1+@{selected|strength_mod}}kh1]]}} {{dmg1type=Bludgeoning}}  {{crit1=[[{1,1+@{selected|strength_mod}}kh1]]}} {{charname=***@{selected|token_name}***}} If you use this as a Token action and allow all your players to use it, when they select their tokens it will read their strength value and use it for damage (unarmed damage without being a monk or having another special feat being 1+strength modifier). I've also improved it so that if a character has a negative strength modifier they do the base damage of 1 if they miraculously manage to hit by any chance.  Let me know if this is useful, and I'll post more if people are interested!
1599974326
Oosh
Sheet Author
API Scripter
Just a minor thing - 5e does not have a minimum damage if 1 rule (I think 3.5 might though). So {0,1+@{strength_mod}}k1 would be more accurate unless you're house-ruling. Also worth noting that punching a raging barbarian (or something else with DR) can also round down to zero. Negative numbers are, unfortunately, not allowed. As my Halfling Bard discovered when he tried to punch himself back to full health.
1599979642
Pat
Pro
API Scripter
Come to think of it, a negative damage should damage the puncher for punching - as in this hurts you more than it does them. 
@Oosh Oh, I see! That's how my old DM and I used to play it! In that case, If negative attacks are a thing, then this should be the normal code for that: &{template:atkdmg} {{mod=+[[@{selected|PB}+@{selected|strength_mod}]]}} {{rname=Unarmed}} {{r1=[[1d20+@{selected|PB}+@{selected|strength_mod}]]}} {{always=1}} {{r2=[[1d20+@{selected|PB}+@{selected|strength_mod}]]}} {{attack=1}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[1+@{selected|strength_mod}]]}} {{dmg1type=Bludgeoning}}  {{crit1=[[1+@{selected|strength_mod}]]}} {{charname=***@{selected|token_name}***}} I hope this works for you!  Also, here is another if yall are interested: This is what I use for initiative for my players. It displays token names with the roll, so its easier to see who rolled what, and, so long as you make it a token action, it will automatically add the roll to the initiative tracker AND this automatically adds an initiative tiebreaker.  &{template:simple} {{rname=Initiative}} {{mod=[[@{selected|initiative_bonus}+((@{selected|dexterity})/100)]]}} {{r1=[[1d20+(@{selected|initiative_bonus}+((@{selected|dexterity})/100))&{tracker}]]}} {{normal=1}} {{charname=***@{selected|token_name}***}} If you don't want the tiebreaker or have the initiative tiebreaker box on your character sheet, then they should look as follows: &{template:simple} {{rname=Initiative}} {{mod=[[@{selected|initiative_bonus}]]}} {{r1=[[1d20+(@{selected|initiative_bonus}]]}} {{normal=1}} {{charname=***@{selected|token_name}***}} Thank you for the feedback! I haven't really had the chance to share my code with anyone, so I'd love the chance to improve and learn a bit more
Thanks I am looking a an attack macro for an NPC/Monster.  Right now I select the NPC/Monster, from the character sheet and attack, the copy the macro from the chat window and create the attack macro. This is time consuming if I have to do it for every attack for every type of NPC/Monster. I am looking for something like "Selected token attack1 ... selected token attack 2" is that possible?
1600185947
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Try this: NPC Statblock Chat Menu for D&D 5e sheet — No API required!
Keithcurtis is a master at making/compiling these amazing macros. Thank you for putting this up, I absolutely love what is here!
I love that we have both Oosh and keithcurtis on this thread. You two are some of my inspirations for a lot of the work I (try to) do, so this is awesome. 
So here is another little macro I made. It's not super fancy, but a friend wanted a better way of doing magic missile for a PC, so I replicated the NPC version: &{template:dmg} {{rname=Magic Missile}} {{range=120ft}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[3d4+3]]}} {{dmg1type=Force}}  {{hldmg=[[?{Cast at what level?|1st level, 0| 2nd level, 1|3rd level, 2|4th level, 3|5th level, 4|6th level, 5|7th level, 6|8th level, 7|9th level, 8}d4+?{Cast at what level?|1st level, 0| 2nd level, 1|3rd level, 2|4th level, 3|5th level, 4|6th level, 5|7th level, 6|8th level, 7|9th level, 8}]]}} It may not be super useful, but it's fun to share :) Enjoy!
1600215574

Edited 1602703632
MJ Cooper said: So here is another little macro I made. It's not super fancy, but a friend wanted a better way of doing magic missile for a PC, so I replicated the NPC version: &{template:dmg} {{rname=Magic Missile}} {{range=120ft}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[3d4+3]]}} {{dmg1type=Force}}  {{hldmg=[[?{Cast at what level?|1st level, 0| 2nd level, 1|3rd level, 2|4th level, 3|5th level, 4|6th level, 5|7th level, 6|8th level, 7|9th level, 8}d4+?{Cast at what level?|1st level, 0| 2nd level, 1|3rd level, 2|4th level, 3|5th level, 4|6th level, 5|7th level, 6|8th level, 7|9th level, 8}]]}} It may not be super useful, but it's fun to share :) Enjoy! Macros that use repeated queries will always re-use the outputs from the first time the query is called, so you can actually simplify the macro a bit: &{template:dmg} {{rname=Magic Missile}} {{range=120ft}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[3d4+3]]}} {{dmg1type=Force}}  {{hldmg=[[ ?{Cast at what level? |1st level, 0| 2nd level, 1|3rd level, 2|4th level, 3|5th level, 4|6th level, 5|7th level, 6|8th level, 7|9th level, 8}d4+ ?{Cast at what level? }]]}} Or an approach that I like to take is to remove the query input/output section from the macro altogether and use a false API call. This helps with troubleshooting the query itself: ! ?{Cast at what level? |1st level, 0|2nd level, 1|3rd level, 2|4th level, 3|5th level, 4|6th level, 5|7th level, 6|8th level, 7|9th level, 8} &{template:dmg} {{rname=Magic Missile}} {{range=120ft}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[3d4+3]]}} {{dmg1type=Force}} {{hldmg=[[ ?{Cast at what level? }d4+ ?{Cast at what level? }]]}} (I'm using a different character sheet so I can't confirm I didn't screw something up when I copied and pasted, but the idea should work!)
OOOOH, that's so cool! See, this is why I really wanted to post these, because I knew that there are people more clever than I am who could improve them :) Thank you so much!  I also have a really simple one for rolling health potions. can this be improved at all?  &{template:desc} {{desc= ?{Choose a Potion of...|Healing, **Potion of Healing**: [[2d4+2]]|Greater Healing, **Potion of Greater Healing**: [[4d4+4]]|Superior Healing, **Potion of Superior Healing**: [[8d4+8]]|Supreme Healing, **Potion of Supreme Healing**: [[10d4+20]]}}}
I actually used to use that healing one, but recently migrated to using the API menu in the chat area. My players like this as they have a quick reference if they want to roll physical dice, or they can click the link to have Roll20 do it. A macro named HealValues in a macro character puts the initial menu up: **Potions:**  [|Potion of Healing, 2d4+2|](~MacrosUtils|Healing) [|Potion of Greater Healing, 4d4+4|](~MacrosUtils|GreaterHealing) [|Potion of Superior Healing, 8d4+8|](~MacrosUtils|SuperiorHealing) [|Potion of Supreme Healing, 10d4+20|](~MacrosUtils|SupremeHealing) Which looks like this The other macros that fire off are all referenced in the ~MacrosUtils character, and variations on: &{template:default} {{name=**Potion**}} {{**Healing for**= [[2d4+2]]}} (which is the "Healing" one. It takes a few minutes to setup, but I've found people like it better. M
Markie said: I actually used to use that healing one, but recently migrated to using the API menu in the chat area. My players like this as they have a quick reference if they want to roll physical dice, or they can click the link to have Roll20 do it. A macro named HealValues in a macro character puts the initial menu up: **Potions:**  [|Potion of Healing, 2d4+2|](~MacrosUtils|Healing) [|Potion of Greater Healing, 4d4+4|](~MacrosUtils|GreaterHealing) [|Potion of Superior Healing, 8d4+8|](~MacrosUtils|SuperiorHealing) [|Potion of Supreme Healing, 10d4+20|](~MacrosUtils|SupremeHealing) Which looks like this The other macros that fire off are all referenced in the ~MacrosUtils character, and variations on: &{template:default} {{name=**Potion**}} {{**Healing for**= [[2d4+2]]}} (which is the "Healing" one. It takes a few minutes to setup, but I've found people like it better. M How exactly does that work? I don't have access to APIs or anything, but it doesn't seem like this uses them. Could you go through it step by step?
You are correct that this does not use the API.  It is just a bunch of reference macros put onto a 'macro mule' character that holds macros to be used instead of putting them in the Collections tab or repeating the same macro on individual characters. 1. Create a character named MacrosUtils.  2. Change MacrosUtils to be Edited and Controlled by All Players (but you can leave the In Players Journals blank) 3. On MacrosUtils, create an ability called HealValues with this macro: **Potions:**  [|Potion of Healing, 2d4+2|](~MacrosUtils|Healing) [|Potion of Greater Healing, 4d4+4|](~MacrosUtils|GreaterHealing) [|Potion of Superior Healing, 8d4+8|](~MacrosUtils|SuperiorHealing) [|Potion of Supreme Healing, 10d4+20|](~MacrosUtils|SupremeHealing) 4. On MacroUtils, Create an ability called Healing with this macro: &{template:default} {{name=**Potion**}} {{**Healing for**= [[2d4+2]]}} 5. Repeat creating abilities for GreaterHealing, SuperiorHealing, and SupremeHealing 5. To call the initial chat menu "HealValues", use: %{MacrosUtils|HealValues} You can type that directly into chat, or create a Collection macro, or put it as a Token Action on each PC.
Oh that's super clever! I really like that a lot! thank you for going into that for me!