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

[D&D5e] I've Cracked It! - My personal perfect NPC Attack Macros

Hi folks.&nbsp; Getting your head around this macro stuff is both tricky but very rewarding when you finally get it to do something that works so well for your game. It's worth sticking with it! And I have just finished a set of macros that works so well for me that I would like to share them.&nbsp; I call them my "Generic NPC Macros". So first up, I set up my tokens with the Bars set up a certain way: Bar 1 (green) is health including the max HP in the appropriate field. Bar 2 (blue) is for passive perception, but the Max field I use as a description for what weapons the NPC is visibly using, like "Longsword &amp; Whip" Bar 3 (red) is for AC and the Max field I use for a description of what they are visibiliy using for armor. (As in "chainmail &amp; shield" could be entered) Each NPC has a "character sheet" attached to them (as picked up from Cody in his excellent videos). When I drop them on the map and select them, I click the "NPC_Stats" macro button (I have this in my macro bar) which gives me this output. Here is the macro code: /w gm &amp;{template:default} {{name=@{selected|token_name}: Stats}} {{Armor Class= @{selected|bar3} @{selected|bar3|max}}}{{Weapons=@{selected|bar2|max}}} {{Hit Dice= @{selected|npc_hpformula} | [[@{selected|npc_hpformula}]]}} {{Speed= @{selected|npc_speed}}} That's all well and good, but there is even better. Again, some inspiration credit has to go to Cody but code in this forum has helped me heaps, too. So I wanted a generic attack macro that allowed me to use the Roll20 electronic rolls if I was remote or just being lazy, but also to allow me to use real world dice (my and players preference) but give me the bonuses as well as my target AC. (So yes, I have to have my attacker NPC selected, and then I have to Target who they are attacking). Here is the output. First, the players get a message as to who is attacking whom with what, and the target AC (so they can correct me if there is some modifier I might have missed) and then the details I want to see get whispered to me, as below. It even rolls two attack dice, so if its Advantage then I pick the higher, if Disadvantage I pick lower of the two, or just the first roll if a normal attack. Rolls damage too but lists what it is so you can manually roll: The description is not always there (although we use max damage for crits so I always put that in there to save mathing) but can be used to remind you of any special effects the attack may do. So yes, there is a little setup involved in terms of editing their attacks, but hey, DMs are suckers for punishment, right? Here is the code: **@{selected|token_name}** attacks with its *@{selected|repeating_npcaction_$0_name}* at **@{target|Aiming for...|token_name}** (AC of **@{target|Aiming for...|bar3})**&nbsp; /w GM &amp;{template:default} {{name=@{selected|token_name}: @{selected|repeating_npcaction_$0_name}}} {{Attacking AC of=@{target|Aiming for...|bar3}}}{{Attack bonus= +@{selected|repeating_npcaction_$0_attack_tohit} ([[1d20+@{selected|repeating_npcaction_$0_attack_tohit}]]/[[1d20+@{selected|repeating_npcaction_$0_attack_tohit}]])}}{{@{selected|repeating_npcaction_$0_attack_damagetype} Damage= @{selected|repeating_npcaction_$0_attack_damage} ([[@{selected|repeating_npcaction_$0_attack_damage}]])}}{{Description=@{selected|repeating_npcaction_$0_description}}} Of course, as with all these repeating action things, for each attack you have to change ALL the $0 to $1 for the second attack and $2 for the third and so on. And then you set them as "Token Actions" with a descriptive button title and you're good to go. Select the attacker, click on the Token Action for the attack, it asks you to select your target and then BOOM, the data is displayed. So, what do you think? Is it "not bad" for my first post in the Macro forum? :) Hey, if you like this and have a Suggestion vote to spare, I'd really appreciate a vote for my suggestion that would likely mean you don't need to do all this macro crap for each and every NPC... Take a look and if you think it's a good suggestion, I'd appreciate a vote for it. Cheers! <a href="https://app.roll20.net/forum/post/7347663/token-selection-new-attack-options-button-show-attack-options" rel="nofollow">https://app.roll20.net/forum/post/7347663/token-selection-new-attack-options-button-show-attack-options</a>
Just wanted to say this is great and it helped me out a lot!
Cheers, man. Thanks for the thumbs up. :)