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

As a DM is there a universal macro i can use for my monsters?

I play 2nd edition D&D. I also like the in-line roll flavor text style for my dice rolling! Is there some kind of macro i could use that would take the tokens name and put it into a macro like "skeleton token selected" Example: The skeleton swings with his rusty sword and hits with an 18 for 6 damage! Then if i select another token like a ghoul it says " the ghoul slashes with its claws and hits with a 16 for 4 damage! I realize there is no way to determine what kind of weapon is in the tokens hand but having a universal script would sure cut down on all the macros i have for each individual monster! I literally have hundreds!!!!!!!!
Well... yes, and no. Let me explain. No, is too much. Let me sum up: First, you can use @{selected|token_name} to vary your macro's subject... and/or you can use @{target|token_name} to vary the macro's target. IE: Macro: @{selected|token_name} attacks @{target|token_name}! Result: SKELETON attacks BOB THE FIGHTER! This goes off what the actual token itself is called, which may be different from what the character is named. Then, you can set a token to represent a character, ie a journal entry. Within the entry, you can have an Attribute named "Weapon", and you can add @{selected|weapon}, which will pull up the weapon's name (if there's no entry, it will return an error). IE: Macro: @{ selected|token_name} attacks @{target|token_name} with its @{selected|weapon}! Result: Skeleton attacks Bob the Fighter with its RUSTY SWORD! Then, follow this up with Attributes for attack and damage: IE: Macro: @{ selected|token_name} attacks @{target|token_name} with its @{selected|weapon}, rolling a [[ 1d20+@{selected|attack} ]] and doing [[ @{selected|damage} ]]! Result: Skeleton attacks Bob the Fighter with its rusty sword, ROLLING A [19] AND DOING [6] DAMAGE! And if you want to get really fancy, add in the target's armor class: IE: Macro: @{ selected|token_name} attacks @{target|token_name} with its @{selected|weapon}, rolling a [[ 1d20+@{selected|attack} ]] vs AC [[ @{target|AC} ]] and doing [[ @{selected|damage} ]]! Result: Skeleton attacks Bob the Fighter with its rusty sword, rolling a [19] VS [17] and doing [6] damage! Hopefully, that should get you at least part of the way to where you wanna go! You can also play around with rollable tables for different tokens, modifying the macros for each character, token actions vs macros, and lots and lot of other fun stuff. And that's not even counting what the API can do once you upgrade your membership to Mentor level! I'm sure there will be others coming in to add their ideas as well. People have gotten VERY creative with what Roll20 can do! -Phnord, wishing he had six fingers to speed up his typing.
There's also using the /as and /emas commands like this, if you're not a mentor or just don't like using API scripts. It doesn't work for players though, because they don't have access to the /as or /emas chat commands. The /as command lets you speak as someone else without using the dropdown menu... /as "Bandit" Give us all your gold or you die! >> shows up in chat as >> Bandit: Give us all your gold or you die! This means you can use /as to separate attack name, attack roll, damage, effects, and such like so... /emas The shambling mound lurches forward and tries to slam you into the ground. /as "Slam" Reach 10 ft /as "Attack" [[1d20+5]] vs AC /as "Damage" [[1d8+3]] bludgeoning The shambling mound lurches forward and tries to slam you into the ground. Slam: Reach 10 ft Attack: [23] vs AC Damage: [7] bludgeoning
1424078021

Edited 1424078148
Ziechael
Forum Champion
Sheet Author
API Scripter
Expanding upon Phnord's suggestion, to use a truly universal macro i would suggest setting up your monsters weapon names to reflect the style of attack as well which gives you a more unique feel to your beasties getting all nasty: Macro: @{ selected|token_name} attacks @{target|token_name} with its @{selected|weapon}! Result: Skeleton attacks Bob the Fighter with its RUSTY SWORD! Would become: Macro: @{ selected|token_name} attacks @{target|token_name} by @{selected|weapon}! by setting the weapon attribute to something more descriptive than 'Claws' or 'Spear' such as 'Slashing with it's Claws' or 'Stabbing with it's Spear' you can get: Result: Skeleton attacks Bob the Fighter by Slashing with it's Claws! or Result: Skeleton attacks Bob the Fighter by Stabbing with it's Spear! You could even introduce variation with a query: Macro: @{ selected|token_name} attacks @{target|token_name} by ?{attack type?|-} with it's @{selected|weapon}! in this example use the weapon name alone as the attribute as per Phnord's original example, when run you will be prompted to enter a more descriptive term for it's attack type... so 'Slashing' or 'Swiping' etc could give you: Result: Skeleton attacks Bob the Fighter by Slashing with it's Claws! and Result: Skeleton attacks Bob the Fighter by Swiping with it's Claws! or even Result: Skeleton attacks Bob the Fighter by Poking him in the Eyes with it's Claws! These could of course still be combined with attack macro information for a fully rounded output as needed. ps. for multiple weapons just number your attributes accordingly: @{selected|weapon1} could be sword and @{selected|weapon2} might be a magic rock of slaying?!
1424113413

Edited 1424114498
Gold
Forum Champion
I play and DM also in the same game, AD&D 2nd Edition. Here is my universal 2E macro for monster attacks: Macro: /me The ?{Monster name|ENEMY} attacks ?{Who are you attacking?|the nearest PC} with ?{Monster attack type|ITS NATURAL WEAPONS} ! To Hit, it rolls... [[d20]] then add + ?{Any hit bonuses for the monster|0} If that's a hit then I'll roll damage. Result: Gold (DM) The skeleton attacks your magic user with rusty sword ! Gold (DM): To Hit, it rolls... 18 then add + 0 If that's a hit then I'll roll damage. You do not need to select a token at all for this. You won't need to select the attacker & you won't need to select the target, that saves you at least twice clicking for every monster every round (that's 100's less clicks per session). It works without pre-selecting tokens or targets, and this is appropriate for 2E anyway (in my experience and opinion). The savings on clicking targets, speeds up combat. It has variables which let you type any kind of weapon name, which is brilliant for narrative-style gameplay. And importantly, compared to the other suggested macros, with my method you don't need to pre-fill a Character Sheet for every monster listing their weapons. You can just type their weapon name on-the-fly as you play. For example using my macro you can easily have the Skeleton attack with a.... Shortsword.... a Rusty shortsword.... or a Bloody Shortsword dripping with the blood of your fallen cleric.... All in the same battle. Same macro works for any physical attacker, whether it's a Skeleton, ghoul, giant, orc, wizard, lich. Works against any target in the party & you can describe and name the victim (for example you can attack "The party's fallen cleric who lays prone on the ground" if you want that to be written as the target). All without shifting your mouse off the 1 macro button. Place this macro in your Macro Quick Bar (along the bottom of the screen). No need to make it a Token Action, or an Ability. And if you don't feel like typing a monster name or a descriptive weapon name on-the-fly? Just hit RETURN key, and the macro defaults to this text and rolls in a micro-second: Result: Gold (DM) The ENEMY attacks THE NEAREST PC with ITS NATURAL WEAPON ! Gold (DM): To Hit, it rolls... 12 then add + 0 If that's a hit then I'll roll damage. You can see where to change the default text in the macro code, if you want a different default wording. This macro can be easily modified to "do the math" and add the hit bonuses, rather than verbosely displaying what the bonuses are in the chat text. Personally I prefer to show the raw d20 result in-line and also write-out any applicable hit bonuses, verbose reporting of the hit roll. For example I'd rather see "20+2" in the chat, than seeing "22". I do this to my Players (so I can check their bonuses at a glance and know that there aren't any unwarranted bonuses accidentally snuck-in there), so I do it on my Monster macro just the same. The macro can be adjusted to calculate, or report, either way (or both). Let me know if you need help switching it to the calculator result.
Thanks Gold I'll give this a try!
1424191477

Edited 1424191696
I modified your script to this! /me The ?{Monster name|Enemy} attacks with its ?{Monster attack type|Claw} ! [[d20]] and it works great! Can i add the bonus column and have it only show if there was a bonus added to the roll without it displaying with an extra message? I just want the bonus added to the roll itself.
I forgot to mention i use another macro for damage!
1424194123

Edited 1424194466
Ok so i have been playing around with this and i have decided what i need is to have the token name displayed when selected so i don't have to type in the name everytime but i do want to type in a description for how the enemy attacks and have it display as an inline roll with the bonus if there is any? Something like this: I select the Harpy token and attack! The Harpy Swoops Down and Attacks with it's Claws for 16 and then display a bonus if any here of let's say +2 for a total of 18 replacing the 16 in the display! I don't want the bonus shown seperately just added to the original roll! I want to do the same thing with my damage token as well as some monsters get a damage bonus!
I personally like the /emas command for DM macros, so that I don't have to change who I'm posting as for every roll. In respose to your last post, I'd modify Gold's macro to this: /emas The @{selected|token_name} ?{Attack description?|swoops down} and attacks with its ?{Monster attack type?|Claws} for [[ d20 + ?{Attack bonus?|0}]]! How does that work for you? Of course, this macro would not work for your players, because of the /emas command.
1424196813

Edited 1424196937
Gold
Forum Champion
Here is To Hit with the damage bonus calculated into the roll and displayed inline. To Hit, it rolls... [[d20 + ?{Any hit bonuses for the monster|0} ]] EDIT: This doesn't add anything beyond what Gozer suggested, although I would change the term "Attack bonus" since that's not a 2E term. (To Hit bonus is in 2E... Attack bonus came in 3E.) Here are some examples of the same for Damage, but you'll find with 2E there are lots of different combinations of damage dice. Macro Name: Rolling a d8 for damage with bonuses Damage, it rolls.... [[d8 + ?{Any damage bonuses for the monster|0}]] Macro Name: Rolling a d10 for damage with bonuses Damage, it rolls.... [[d10 + ?{Any damage bonuses for the monster|0}]] Macro Name: Rolling a d12 for damage with bonuses Damage, it rolls.... [[d12 + ?{Any damage bonuses for the monster|0}]] and so on. Monsters in 2E do all kinds of differing damage amounts (1d6, 2d4, and so on), so honestly, the best way is probably to learn to roll any kind of dice by typing it in the chat so you can type any creature's damage any time. There are ways to make the macros pull-in the damage dice and such from a Character Sheet for the Monster, if you create such. Now, if you wanted to set up a separate Token and Character Sheet for every single monster, so that it's name & damage dice & hit bonus & damage bonus is already pre-calculated and pulls into the macro automatically at the time of rolling, that's your call, I personally don't do all that for my 2E (I see people doing that for 3E, 4E), but if you like to then have fun.
1424196885

Edited 1424196990
Thanks Gozer it's perfect and i modified it to work for my damage script too! I'm curious though what is the difference between /me /em and /emas? they all display the same? Thanks also to Gold for getting the ball rolling you guys are awesome!
I honestly don't know what the difference is between /me and /em, but /emas does an emote as another character. It's specifically for DMs, so you don't have to change who you're chatting as. It basically removes the identifier of who's sending the text to the chat. That's why you put the @{selected|token_name}, because without that, it would just have the emote text, but no identifier as to who is sending the text.
1424207468

Edited 1424207494
I got one more macro i would like to fix and i'll be set! I have this one for my random encounters using a rollable table. /gmroll [[1t[RandomEncounter]]] [[2d6]] Is there anyway i can make this display as an inline roll instead of two seperate lines? I'm guessing that the 1t in the macro is a d100?
You're mixing two roll mechanics; /gmroll and inline rolls [[ ]] Instead of /gmroll, use /w GM for inline rolls
Thanks i'll try that!
Thanks Mark it works great!
1424249495

Edited 1424249520
Ziechael
Forum Champion
Sheet Author
API Scripter
Brian A. said: Is there anyway i can make this display as an inline roll instead of two seperate lines? I'm guessing that the 1t in the macro is a d100? The 1t refers to the fact that you are asking the system to make 1 roll of the rollable table named[insert table name here], in your case your random encounter table. Depending on how you set up the weighting of the items in that table it may class as rolling a d100 (if the weighting all adds up to 100 then it is essentially percentage based) or it may just be a d37 roll because you have 37 items in the table with equal chance of them turning up (ie. all with a weight of 1). You could just as easily use 2t, 3t etc to make multiple rolls from the same table... See here for more details: Card Decks and Rollable Tables
Brian A. said: I realize there is no way to determine what kind of weapon is in the tokens hand but having a universal script would sure cut down on all the macros i have for each individual monster! I literally have hundreds!!!!!!!! Out of curiosity, were you making macros for each monster in the settings tab, or in the monster character sheet? On that note, are you making character sheets for your monsters, or just using tokens? I highly recommend reading Linking Tokens to Journals , however, there is a "best practices" way to set up your NPCs that may save you a lot of effort. The reason I bring this up is because the "universal macro", while handy, is inherently limited. It works fine for monsters with a single attack. I'm not as familiar with 2E, but if it's anything like later addition most monsters at higher levels are going to have more than one type of attack, e.g. a dragon. So with your universal macro you need to manually enter any special attack, or make macros for them...which puts you back at the same spot you were to begin with. Another way to do it that I've found works extremely well is to make a Journal entry for each monster. Now, this part is important...this doesn't mean you need to set up a character sheet for each monster! While it can be useful if you take the time to set up, generally speaking each monster only has a couple of stats you need during play (mostly attack and defense). It may not be an effective use of time to set up each monsters full stats. You'll want a couple of things on the attributes page, usually an attack (or to hit) attribute, a damage attribute, and (arguably) any defensive stats. You'll also want to set the HP for your monster in one of the bars, and I personally use their AC as one of the other bars (but that's optional). Now find the token you want to use for the monster. You'll want to set up the token how it's set up in the link I posted earlier, but the key is to set the HP but don't link it to the character sheet . If you link it all monsters will have the same HP at once, regardless of which one you change. Save this token as the default token. Lastly, I recommend setting up "token macros". These are macros that are set up on the attributes tab as abilities. You can customize these macros how you want, with specific monster names, number of attacks, weapons, whatever. I often use a copy-paste macro that includes character or token name for speed, along with @{target} macros to add the target's defense into my macro for quick play. Check the box for the abilities that says "Show as token action." Now, whenever you select the token that's linked to that character sheet, you'll see a custom box of macros for that monster only. Why is this better? Seems like a lot of work for essentially the same thing. The key difference is that you can have a different list per monster. So, for example, my goblin probably just has a "Melee Attack" and "Ranged Attack." My dragon, however, probably has "Bite", "Claw", "Wings", "Fire Breath," "Full Atk"...you get the idea. This means that, during play, I never have to look up what my monster can do. I just select them and all their options pop up. Combined with a target macro and you can literally just select a monster token, click your macro, click the PC you're attacking, and have it tell you what it rolled and the defense of the target you selected. It's so useful I use it for my face-to-face games, even if my "encounters" are just a bunch of tokens with the players sitting next to them. Hope that helps =)
Thanks Jacquesne! I actually made about sixty macros for every monster in my mod with their special attacks! Now with everyone's help here on the forums i can do it with four universal macros! I don't make sheets for my monsters and all the info i need i copied and pasted in the gm notes on the token from the DM guide! So any monster token i grab has all the info i need! Now my time is being better spent making really detailed maps and hopefully a great story for my players! I am currently running a 5 player campaign every Sunday.