I follow David M and his API's are amazing, he said you were going to make a video and I have been tuning in each day. Now I am truly amazed. Thank you. 😃
Hey Nick I love your videos, So glad you went to typing the code in word so we can see it better. I have played D&D with the same group of guys since 1981. We just recently moved to VTT (Roll20) due to covid. I say all this because I appreciate all that you do. I am no stranger to computer code. I was doing coding before windows existed. Now I am old and legally blind (No center of vision) I also suffer from TBI so some of my past knowledge is kind of scrambled. I had a lot of trouble following when you were typing in the roll20 chat window. I also appreciate the cut and paste scripts and macros. I understand the process it just takes me a little longer to type it all in. So now I just need to get to work on setting up spells for my pc’s.
This is awesome! Maybe in future versions they can add functionality that would determine angle limits based on token facing -- a must have for running naval battles (gotta have those broadsides!). Can't wait to see how this script keeps evolving over time!
Hmm, interesting. How do you determine token facing currently? Based on vision? It would have to be some property that the api has access to, whether on the token- or character- level. Just the appearance of a graphic wouldn't be enough.
@@davidmoorehead1865 -- There is technically already a 'facing' built into Roll20. When you interact with any token you'll get a box with drag-squares to resize it -- and, importantly, one at the top that can be used to rotate the token. This means that R20 itself is already keeping track of which direction is "forward" for a token. I would guess that there must be some way to use this information aside from just image rotation.
@@ryanedgerton1982 Right, there is a "rotation" property assigned to each token, so that is a viable method. Just wasn't sure what your method was. I'll think on it a bit - there's a few feature requests in the queue right now. At some point I'm going to add something like a --range or --maxRange command to ensure nobody drops a fireball from a mile away. I'll look into angle restrictions at that time and see if it all gels. Thanks for the idea!
Looks like you can do this with no rolls in to just highlight the targeted squares... that would be amazing, without requiring the library level effort in setup/maintenance.
Yep, no rolls required! A "simple" targeting aid was actually the original idea/scope of the script. Then after getting some feedback and ideas from my players and Patreon supporters, I just kept adding stuff, haha! --> If you just want to use it for targeting, the script also automatically creates a macro during install called *AoEGenerator* that creates a chat menu with some commonly used AoE types. You can the delete ones you don't want (like PF ones if you play 5e) and/or edit them however you like!
@@davidmoorehead1865 Epic - thank you and well done. Also saves me implementing a chat menu from scratch (which is clearly going to end up as a universal macro for players!) 😋
Hi Nick, very cool video like always, i love your work. Thanks so much. I have a question, can i apply the empowered evocation feat from my players Mage to the spells he cast? somehow, the script doesn´t do it, but the click on the fireball itself without the script do it. Any suggestion?
Thanks for the kind words! I'm not sure about the empowering bit, though, sorry. I'd say ask over here in the forums, and someone may be able to help - app.roll20.net/forum/category/46806 - best of luck, and happy gaming!
The script is system agnostic, so it will not automatically pick up features/traits from character sheets (with the undocumented exception of magic resistance for 5e). So, that would have to be included in your macro. You could either have a different version of the macro that is specific to your evoker that adds @{charName|intelligence_mod} to your damage, or use the same macro with an added query (not recommended), or possible write a scriptcard that somehow checks for this feature and adds it automatically if it exists (much more complicated). I'd choose option 1.
Can you please provide an example demonstrating how to use a spell that doesn't cause damage but instead alters the target's condition, similar to the sleep spell? Would something like that even be possible?
Hi there! This example (Faerie Fire) shows adding a status marker to targets wiki.roll20.net/Script:SmartAoE#Faerie_Fire_.285e.29 Best of luck, and happy gaming!
Glad you liked the vid! As for your question, you could take the code I did here - th-cam.com/video/jyLbR4unO7o/w-d-xo.html and then you'd need to add in the ability to provide targets, which are described here wiki.roll20.net/Macros#Targeted_Token_with_a_Macro. It'd take some work, but would definitely be possible.
This doesn't appear to work anymore for setting custom "--saveformula" stuff. Every time I make a macro with a custom one (because I'm trying to make scorching ray so the players can just use that and it'll roll and figure out if it meets/beats the ac), it saves it as "--saveformula|". I assume this is because "" refers to scripting tags (as in JS tags, like ).
I'm not sure about that one, sorry. I'd say your best bet is to post over on the Roll20 forums and the script's author might be able to chime in and help.
I'm sure this is an easy answer, but i installed the script from the script library. when I try to test the shatter macro or burning hands macro, or really any effect from the auto installed macro it gives, i keep getting the same error. "Error: Character "AoEControlToken" must be in the journal with a default token" it generates two of those characters when i int=stall the script. i go in and make sure they have a default token. i even copy pasted the name from between the quotes and renamed them into that incase there was something missing. its repeated this 4 times over, and i cant get the script to work. For the life of me I cant get why it's not registering that I do indeed have a character named AoEControlToken. Great roll20 sages and wizards of the posts, any advice for this humble n00b?
I'm not sure what might cause that, sorry. But if you post over on this forum -app.roll20.net/forum/category/46806 someone might be able to help. Good luck!
@@NickOlivo you responded so quickly to a video thats years old! that's incredible thank you so much. all of your videos are super informative and helpful and even pointing me in the right direction is a huge help. youre a rockstar. You get DM inspiration from me.
Haven't been able to go over the wiki yet (I'm still at work), but it looks like you could possibly work in a prompt for multiple lines of the macro, to make a more generic tool, unless I'm missing something? Like I could define the aoetype as a prompt, with the different options I want, and a prompt for the size? I should probably just read the wiki (I will), but I'm just excited, lol. Thanks for the great videos Nick!
That for sure can work! There are a TON of options, though, so you'd just have to keep in mind how much clicking you want to do, and how some keywords might interact with others. It's all in the wiki, but feel free to ask questions on the forum thread if you get stuck, need some clarification, or encounter a bug :)
@@davidmoorehead1865 @David Moorehead thank you for the reply David! I had considered the clicking through aspect (which maybe, in the end, it would be more helpful to make macros for the few spells I know my players use, aka Fireball lol), but I hadn't considered interacting keywords! I'll have to fiddle a little, which is definitely fun for me anyway. Really great looking tool. Thank you so much for all the hard work that went into making it!
this is a great video thanks. i have a question can we add sound effects too? there are bunch of sounds of spells in the jukebox can we add them to scripts too?
Glad you liked it! SmartAOE doesn't handle sound effects, but you could create a macro that calls SmartAOE, and then another line of the macro could call another script called Simple Sound, which can play audio. I have a video that shows how to use that script here - th-cam.com/video/2VJU5cz1r_g/w-d-xo.html Happy gaming!
@@NickOlivo thanks man im watchin most of your videos i need to learn how to write macros but im getting there :) aand i just found one of your videos creating macros :D real thanks
An amazing tutorial. I gave your Shatter macro a try and it worked out really well! I have some questions. I'm really new to making macros and all these syntax so bear with my amateur understanding. The table that populates in chat is very nifty but how much wiggle room do we have to changing it? Is the table static and therefore you must use the parameters set? I love how the targets' tokens are shown in the table as well but is that something can manipulate?
Glad you liked it! I'll defer to the script's author, David M, for question about the table. You can reach him by posting your question on this forum app.roll20.net/forum/post/10485883/script-smartaoe-graphical-interface-for-implementing-aoes-on-gridded-maps/?pagenum=6 Thanks for watching, and happy gaming!
You can change the appearance of the chat output (background colors or picture, font size and color, etc), the description field is optional, and you can remove the actual names of the tokens to avoid spoilers, but the general structure of the chat output is hardcoded.
Great video -excited to give this a try and will take a look at the wiki but my question how does this work for spells like haste or slow where you can select tokens to be affected by a spell, including friendlies, and what about spells where the target can choose to fail the save (rather than rolling against the SSDC?)
Spells with a large area that only target a certain number of creatures are still doable out of the box, but a bit clickier. Instead of performing a generic "trigger" (the !smarttrigger command) which would affect all tokens in the area, you can target individual tokens within the area one at a time by using !smartquery and supplying a token_id Example: !smartquery @{target|Choose a Target|token_id} See the wiki and/or forum posts for more details. If there are a large number of targets this might become tedious and you may want to just use the script for targeting purposes. Finally, friendlies that want to autofail would need to be handled manually even with this scenario (there is a --noSave command, but you couldn't mix/match if you did that). The script is a best effort to handle a big chunk of "typical" spell/AoE mechanics, but obviously it gets difficult to handle every exception. There are already >5600 lines of code in there as of v0.25, lol. Sometimes it may just be easier to handle it the "old way". Anyway, hope that helps!
I just installed and when I click the Trigger-All and Trigger-Target token action, I get the following errors. (From SmartAoE): Error: Cannot read property 'id' of null (From SmartAoE): Error: Cannot read property 'get' of undefined I uninstalled and reinstalled and same behavior. Ideas?
Hm, not much to go on. So, the controlToken Spawned and when you moved it, an AoE was generated, but you get errors when triggering it? I'm assuming you have a grid enabled on the map. Can you post the macro you are using (or are you using the Shatter macro from the video)?
@@davidmoorehead1865 Sorry, I am using the Shatter script, the AoEControlToken was created and have Grid enabled in the map. Yes when I click the either Trigger buttons I get a unique error for each button - Token Action.
@@bradpatterson8386 Dang. I could take a look for you if you want to PM me (through Roll20) an invite to your game and promote me to GM. You can find my profile on the forum thread that Nick linked in the description above. Might not get to it until later this evening though, as I'm going to be away from my computer for a few hours. I'm on EST.
Trying to get Cure Wounds to apply healing but not making much sense of the api wiki on it, could i please get some help. It drops the card in the chat box bow when it does the math it just shows as a ‐1
Healing is really strange due to a quirk with the Roll20 inline roll parser in how it handles negative numbers (if a negative number is the first number in an inline roll, the parser breaks). Assuming you are using the 5e OGL sheet, try this: --damageFormula1|[[0 + [[0 - ?{Cast at what level?|1|2|3|4|5|6|7|8|9}]]d8 - @{selected|wisdom_mod}]] Also, you will probably want to use --noSave|1 to avoid confusing rolls in the chat. See the Aura of Vitality example in the wiki for more info.
Another user reported this a while ago - the issue was corrected by ensuring the "Enable chat avatars" option was set to ON, from the in-game settings tab (gear icon near chat window). This setting affects the left margin of chat output. In the next release there will be an option to shift the output html accordingly if you prefer to have the chat avatars disabled.
Wonder if the spell slot changes can be implemented into this script from the ScriptCards API, that way it can check if your player can even cast Shatter first, and then update their spell slots afterwards.
You can theoretically hack it such that the saveFormula is the attack roll formula and the DC is the target's AC. This will only work for a single target attack, though, due to how the script is structured (only supports a single DC). Note that you'll also then have to apply damage to the correct token manually (since you'd be "reversing" the rolls and you don't want the caster damaging himself when he makes his saving throw [his "attack"]!), so IMO it's prob not going to be worth the time setting it up. The driving force behind the script was AoE interpretation, so certain constructs were set up with that in mind and it is not going to be ideal for every situation. Just another tool in the toolbox :) FWIW I just use std macros or scriptcards for these types of spells in my personal games.
@@davidmoorehead1865 So do I, but I really like the way yours draws the lines and identifies what's hit or not... oh well... I have enough use for the "normal" AoE effects anyway. Great work BTW!!
@@davidmoorehead1865 I have another ask - sorry! Trying to build a Dragonborn's breath weapon. The effects are easy (15' code of fire) but how do I code for a save DC of 8+PC's CON mod+PCs Proficiency Bonus (the target makes a DEX for half for this) and how do I vary the damage based on PC level (it does 2d6 for L1-L5, 3d6 for L6-10, 4d6 for L11-l15, and 5d6 for L16+)?
@@stevecansdale3070 The following assumes you are using the 5e OGL character sheet. NOTE: EDITED THE DAMAGE ROLL BELOW For the dc: [[8+@{selected|constitution_mod}+@{selected|pb}]] For the damage: [[[[1+ceil(@{selected|level}/5)]]d6]]
Nick, awesome video. I was wondering, is there a way to link it to the Token Action Script? Also, I suppose it has limitations regarding resistances and immunities, and vulnerabilities. I suppose every great thing has its limitations? Also, it the party is casting spells at other player characters, can it take into account proficiency in saving throws?
Just saw this. If you are playing 5e, the script automatically looks for npc_resistances, etc. and adjusts the damage accordingly. Also, the default --resistanceRule is already set to 0.5, so no need to set it explicitly if playing 5e. You only need to set these parameters if you are playing a non-5e game. The only issue you might run into is if the npc is resistant to a damage type *unless* from silvered or magic weapons or something similar. In that case, you would have to manually correct the damage. Sorry, it was just too complicated to try to create a generic parser for a freeform text field like that, that uses natural language. Hopefully it doesn't come up too often.
Nick, would it be ok if I mentioned your videos on the DA discord? So many people now have the roll20 pro account because of it and you have completely upped my roll20 game. Side question. I’m gathering the rolled effects won’t work with beyond20 because the player sheets aren’t filled in, correct?
Urzoth, I replied to your question on the forum thread, but will paste here for others. I have quite a few listed in a github repo here: github.com/djmoorehead/SmartAoE-Macros/tree/main though it's not a complete list. Generally though you can pretty easily modify what's there for other similar spells. Be sure to read the 000_README file first. I have put some notes at the top of each spell listing that should not be copied into your macros. Also, a couple of them might use a custom AoEControlToken "character" that you wouldn't have in your game (e.g. a multi-sided token with different art). Those examples are noted in the top notes section of the individual spells, though. Same goes for a couple that use custom StatusMarkers. Those would need to be modified for your specific game (replaced with another custom marker or with one of the default ones) Be sure to read the 000_README file first, as I have added some comments to each
Technically, you could use SmartAoE for single target attacks by setting the "DC" to the target's AC and the saveFormula to the attack roll, but imo opinion the scriptcards route is much cleaner and more versatile for this purpose.
This script looks so cool but its also 1000x more prep for a DM and feels like a bad idea for actual DM's for so little pay off. The older video with spawndefaultoken seems like a much faster and simpler way to handle spell aoe's.
A valid point about setup time. Like many scripts, YMMV, and could take a lot or a little time depending on how deep of a dive you want to do (and if it's all on you or if your players can share the workload). It's for sure a lot of syntax per macro, though they tend to follow similar patterns so once you have a few you're really only changing a small number of lines unless you really want a lot of customization in AoE colors/styles & chat appearance. If you have players that spam a lot of AoE's it could save a lot of time in the long run vs Spawn/rolling individual saving throws/applying damage against mobs. I wrote it (and Spawn), but still don't use it for *all* of our spells, lol. One of my players really got into it and set up a bunch for his character on his own, so that was nice. One thing that really motivated me to make it was cone and line spells: I wanted an objective way to determine which creatures were affected when cast in non-90/45deg directions, as I found templates lacking in these cases. Btw, I'm assembling a repository of spells for cut/paste, found here: github.com/djmoorehead/SmartAoE-Macros. As I make more and folks share theirs I'll add to it to hopefully reduce prep time for other users. Thanks for the feedback!
Hi there - yes, it depends on the game, but the ones I almost always have are tokenmod, turnmarker, group initiative, group check & apply damage, tokenaction, mapsizer, and welcome package.
What if some Targets have Advantage and others have Disadvantage in the same casting? Also a marker for a persistent spell like entangle would be cool.
Regarding the advantage/disadvantage, unfortunately, there's only so much a script that targets multiple creatures can do before it's no faster/more efficient than just rolling saves & damage for each of them individually. For the entangle marker, I think you could use the --conditionfail parameter described in the script's wiki for that, but the script's author could tell you for sure.
As Nick, mentioned there is only so far that automation can get you. However, note that there is an undocumented feature for 5e character sheets: if a target creature has the "magic resistance" trait (conferring advantage on saving throws against spells and other magical effects.), then the script will automatically roll their save with advantage. This just happens, without any need for additional macro syntax. Regarding condition markers for entangle, etc., Nick is correct in directing you to the --conditionFail command. Valid examples include: --conditionFail|red (red circle) --conditionFail|red@3 (red circle with numeric overlay) --conditionFail|skull,cobweb (two different markers) Note that custom markers can also be used, but you will have to include both the name and the number of the marker (e.g. name::####). These can be easily found within the token-mod documentation handout in the section describing status markers.
Hey Nick was wondering if yourself or any1 on here could help me with this Awesome Api iv downloaded both the Api mentioned then just to try it out i copy pasted ur Shatter spell macro as 1 of my players has the spell, but for some reason when the Aoe is over some enemies & i click on the trigger all button i get the animation but no card in the chat & if i cast it over an empty space i get the card in the chat but missing like a 1/4 of the card. Any suggestions would would be great thanks.
@@NickOlivo im still relatively new to all this but i dont think im getting any Api errors. The macro code im using is just a copy paste of ur own but just in case iv done something to it here it is . !smartaoe {{ --title|Shatter --leftsub|Slot level ?{Cast at what level?|2|3|4|5|6|7|8|9} --rightsub|DC @{selected|spell_save_dc} CON --titlecardbackground|linear-gradient(blue, cyan) --oddrowbackground|#00ccff --evenrowbackground|#edfcfc --oddrowfontcolor|#000000 --tablebgcolor|#edfcfc --controlTokName|AoEControlToken --controlTokSize|1 --aoeColor|#00ccff50 --aoeOutlineColor|#0099ff --aoeType|circle, float --radius|10ft --minGridArea|0.25 --minTokArea|0.25 --fx|burst-holy --dc|@{selected|spell_save_dc} --saveFormula|?{SaveType|Normal,5eCON|Advantage,|Disadvantage,} --damageFormula1|[[(?{Cast at what level?}+1)d8]] --damageType1|Thunder --instant|1 --autoApply|yes --bar|3 --zeroHPmarker|dead --desc|A sudden loud ringing noise, painfully intense, erupts from a point of your choice within range. Each creature in a 10-foot-radius sphere centered on that point must make a Constitution saving throw. A creature takes 3d8 thunder damage on a failed save, or half as much damage on a successful one. A creature made of inorganic material such as stone, crystal, or metal has disadvantage on this saving throw. A nonmagical object that isn’t being worn or carried also takes the damage if it’s in the spell’s area. }}
@@NickOlivo also here is a link to screen capture i took of the image card i get if it helps u in any way. drive.google.com/file/d/13pqQVTwwbUhEjubFgwIqnU1Jjfl2sfvQ/view?usp=sharing
@@ashwilson5387 I'm not sure if this is just the TH-cam comment editor eating the html replacements, but your saveFormula looks like you didn't use } for the ending bracket of the attribute in your query. Regarding triggering over empty squares, you should be seeing a Title, damage line (if any), and description (if any). I couldn't access your Google drive screen grab, so not sure what you are seeing.
You can! Similar to the SpawnDefaultToken script (if you are familiar with that one), you can set up the default token of a character sheet with a custom AoE image (like a fireball). Images with partial transparency work best (requires png format to support transparency). Then you can use the --controlTokName, --controlTokSize, and possibly the --controlTokSide (if multi-sided) commands in your macro. The default reticle control token will be replaced with the default token specified. Check out the "Ice Storm" example in the wiki :)
Sorry man but why is the card not shown in my table when i hit the Trigger-all? do i need another API to get cards? And damage isnt being applied either :(
Hi Joanf1978 - try changing the save formula line to this - --saveFormula|?{SaveType|Normal,5eCON|Advantage,|Disadvantage,} and let me know if that fixes it.
@@joanf1978 Nick's comment above (replacing his --saveFormula line) fixed that for another user for his Shatter example. The closing brackets within the query needed to use html replacements, which apparently got converted by his editor when he pasted the example to GitHub.
Im trying to make an Hunger of Hadar where the damage at start should trigger without saving trow and the damage at the end of the turn should apply only when a creature fail the saving throw (no half) im losing my mind on it :D My small brain have allow me to use the ice storm template as a baseline, make the token stay over time, fixing the damage type but no further XD
Hi Nick, Thank you for all your awesome videos, they all made my day ! I encountered an issue however when using these macros. They work when I use them, but when my players use them, they get this message in the chat: Something went wrong when processing rolls. The error message generated by Roll20 is: SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but "C" found. Would you have any idea as why is that the case ? and what does this message mean ? I've looked it up on the roll20 forums but couldn't find any message related to it. thank you so much for your help, and have a great day
Wow, that is one hell of an API script. Insanely skilled work - thank you for covering it!
Glad you liked the vid! Happy gaming!
I follow David M and his API's are amazing, he said you were going to make a video and I have been tuning in each day. Now I am truly amazed. Thank you. 😃
Glad you enjoyed it! Happy gaming!
Hey Nick
I love your videos, So glad you went to typing the code in word so we can see it better.
I have played D&D with the same group of guys since 1981. We just recently moved to VTT (Roll20) due to covid. I say all this because I appreciate all that you do. I am no stranger to computer code. I was doing coding before windows existed. Now I am old and legally blind (No center of vision) I also suffer from TBI so some of my past knowledge is kind of scrambled. I had a lot of trouble following when you were typing in the roll20 chat window. I also appreciate the cut and paste scripts and macros. I understand the process it just takes me a little longer to type it all in. So now I just need to get to work on setting up spells for my pc’s.
Hi Daryl - thanks for the kind words, I'm glad the videos have been helpful and I'll try to make future videos more accessible. Happy gaming!
This is awesome! Maybe in future versions they can add functionality that would determine angle limits based on token facing -- a must have for running naval battles (gotta have those broadsides!). Can't wait to see how this script keeps evolving over time!
Hmm, interesting. How do you determine token facing currently? Based on vision? It would have to be some property that the api has access to, whether on the token- or character- level. Just the appearance of a graphic wouldn't be enough.
@@davidmoorehead1865 -- There is technically already a 'facing' built into Roll20. When you interact with any token you'll get a box with drag-squares to resize it -- and, importantly, one at the top that can be used to rotate the token. This means that R20 itself is already keeping track of which direction is "forward" for a token. I would guess that there must be some way to use this information aside from just image rotation.
@@ryanedgerton1982 Right, there is a "rotation" property assigned to each token, so that is a viable method. Just wasn't sure what your method was. I'll think on it a bit - there's a few feature requests in the queue right now. At some point I'm going to add something like a --range or --maxRange command to ensure nobody drops a fireball from a mile away. I'll look into angle restrictions at that time and see if it all gels. Thanks for the idea!
@@davidmoorehead1865 But dropping a fireball from a mile away sounds soo fun! xD
Hell yeah, definitely adding this to my game. Thanks!
Glad you liked it! Happy gaming!
Great video! Thank you for your work, as always.
Very nice. Seems to be an improvement over the script cards for aoe, at least it seems to be a bit more user friendly.
Glad you liked it! Happy gaming!
Looks like you can do this with no rolls in to just highlight the targeted squares... that would be amazing, without requiring the library level effort in setup/maintenance.
Yep, no rolls required! A "simple" targeting aid was actually the original idea/scope of the script. Then after getting some feedback and ideas from my players and Patreon supporters, I just kept adding stuff, haha!
--> If you just want to use it for targeting, the script also automatically creates a macro during install called *AoEGenerator* that creates a chat menu with some commonly used AoE types. You can the delete ones you don't want (like PF ones if you play 5e) and/or edit them however you like!
@@davidmoorehead1865 Epic - thank you and well done. Also saves me implementing a chat menu from scratch (which is clearly going to end up as a universal macro for players!) 😋
Hi Nick, very cool video like always, i love your work. Thanks so much. I have a question, can i apply the empowered evocation feat from my players Mage to the spells he cast? somehow, the script doesn´t do it, but the click on the fireball itself without the script do it.
Any suggestion?
Thanks for the kind words! I'm not sure about the empowering bit, though, sorry. I'd say ask over here in the forums, and someone may be able to help - app.roll20.net/forum/category/46806 - best of luck, and happy gaming!
The script is system agnostic, so it will not automatically pick up features/traits from character sheets (with the undocumented exception of magic resistance for 5e). So, that would have to be included in your macro. You could either have a different version of the macro that is specific to your evoker that adds @{charName|intelligence_mod} to your damage, or use the same macro with an added query (not recommended), or possible write a scriptcard that somehow checks for this feature and adds it automatically if it exists (much more complicated). I'd choose option 1.
Can you please provide an example demonstrating how to use a spell that doesn't cause damage but instead alters the target's condition, similar to the sleep spell? Would something like that even be possible?
Hi there! This example (Faerie Fire) shows adding a status marker to targets wiki.roll20.net/Script:SmartAoE#Faerie_Fire_.285e.29 Best of luck, and happy gaming!
@@NickOlivo Thank you! Much appreciated!!
Hey Nick
Very nice video
Quick question, how would you write a script for magic missiles?
Cheers in advance
Glad you liked the vid! As for your question, you could take the code I did here - th-cam.com/video/jyLbR4unO7o/w-d-xo.html and then you'd need to add in the ability to provide targets, which are described here wiki.roll20.net/Macros#Targeted_Token_with_a_Macro. It'd take some work, but would definitely be possible.
@@NickOlivo cheers Nick,
I'll give it a go,
I'm still very new to Roll20
This doesn't appear to work anymore for setting custom "--saveformula" stuff. Every time I make a macro with a custom one (because I'm trying to make scorching ray so the players can just use that and it'll roll and figure out if it meets/beats the ac), it saves it as "--saveformula|". I assume this is because "" refers to scripting tags (as in JS tags, like ).
I'm not sure about that one, sorry. I'd say your best bet is to post over on the Roll20 forums and the script's author might be able to chime in and help.
I'm sure this is an easy answer, but i installed the script from the script library. when I try to test the shatter macro or burning hands macro, or really any effect from the auto installed macro it gives, i keep getting the same error. "Error: Character "AoEControlToken" must be in the journal with a default token" it generates two of those characters when i int=stall the script. i go in and make sure they have a default token. i even copy pasted the name from between the quotes and renamed them into that incase there was something missing. its repeated this 4 times over, and i cant get the script to work. For the life of me I cant get why it's not registering that I do indeed have a character named AoEControlToken.
Great roll20 sages and wizards of the posts, any advice for this humble n00b?
I'm not sure what might cause that, sorry. But if you post over on this forum -app.roll20.net/forum/category/46806 someone might be able to help. Good luck!
@@NickOlivo you responded so quickly to a video thats years old! that's incredible thank you so much. all of your videos are super informative and helpful and even pointing me in the right direction is a huge help. youre a rockstar. You get DM inspiration from me.
Haven't been able to go over the wiki yet (I'm still at work), but it looks like you could possibly work in a prompt for multiple lines of the macro, to make a more generic tool, unless I'm missing something? Like I could define the aoetype as a prompt, with the different options I want, and a prompt for the size?
I should probably just read the wiki (I will), but I'm just excited, lol.
Thanks for the great videos Nick!
I think that would work. Glad you liked the vids!
That for sure can work! There are a TON of options, though, so you'd just have to keep in mind how much clicking you want to do, and how some keywords might interact with others. It's all in the wiki, but feel free to ask questions on the forum thread if you get stuck, need some clarification, or encounter a bug :)
@@davidmoorehead1865 @David Moorehead thank you for the reply David! I had considered the clicking through aspect (which maybe, in the end, it would be more helpful to make macros for the few spells I know my players use, aka Fireball lol), but I hadn't considered interacting keywords!
I'll have to fiddle a little, which is definitely fun for me anyway. Really great looking tool. Thank you so much for all the hard work that went into making it!
this is a great video thanks. i have a question can we add sound effects too? there are bunch of sounds of spells in the jukebox can we add them to scripts too?
Glad you liked it! SmartAOE doesn't handle sound effects, but you could create a macro that calls SmartAOE, and then another line of the macro could call another script called Simple Sound, which can play audio. I have a video that shows how to use that script here - th-cam.com/video/2VJU5cz1r_g/w-d-xo.html Happy gaming!
@@NickOlivo thanks man im watchin most of your videos i need to learn how to write macros but im getting there :) aand i just found one of your videos creating macros :D real thanks
An amazing tutorial. I gave your Shatter macro a try and it worked out really well! I have some questions. I'm really new to making macros and all these syntax so bear with my amateur understanding.
The table that populates in chat is very nifty but how much wiggle room do we have to changing it? Is the table static and therefore you must use the parameters set? I love how the targets' tokens are shown in the table as well but is that something can manipulate?
Glad you liked it! I'll defer to the script's author, David M, for question about the table. You can reach him by posting your question on this forum app.roll20.net/forum/post/10485883/script-smartaoe-graphical-interface-for-implementing-aoes-on-gridded-maps/?pagenum=6
Thanks for watching, and happy gaming!
@@NickOlivo Alright! Thanks anyways Nick.
You can change the appearance of the chat output (background colors or picture, font size and color, etc), the description field is optional, and you can remove the actual names of the tokens to avoid spoilers, but the general structure of the chat output is hardcoded.
Great video -excited to give this a try and will take a look at the wiki but my question how does this work for spells like haste or slow where you can select tokens to be affected by a spell, including friendlies, and what about spells where the target can choose to fail the save (rather than rolling against the SSDC?)
Hi Richard! There's a Slow example here - github.com/djmoorehead/SmartAoE-Macros/tree/main
Spells with a large area that only target a certain number of creatures are still doable out of the box, but a bit clickier. Instead of performing a generic "trigger" (the !smarttrigger command) which would affect all tokens in the area, you can target individual tokens within the area one at a time by using !smartquery and supplying a token_id
Example:
!smartquery @{target|Choose a Target|token_id}
See the wiki and/or forum posts for more details. If there are a large number of targets this might become tedious and you may want to just use the script for targeting purposes. Finally, friendlies that want to autofail would need to be handled manually even with this scenario (there is a --noSave command, but you couldn't mix/match if you did that). The script is a best effort to handle a big chunk of "typical" spell/AoE mechanics, but obviously it gets difficult to handle every exception. There are already >5600 lines of code in there as of v0.25, lol. Sometimes it may just be easier to handle it the "old way". Anyway, hope that helps!
I just installed and when I click the Trigger-All and Trigger-Target token action, I get the following errors.
(From SmartAoE): Error: Cannot read property 'id' of null
(From SmartAoE): Error: Cannot read property 'get' of undefined
I uninstalled and reinstalled and same behavior. Ideas?
Hm, not much to go on. So, the controlToken Spawned and when you moved it, an AoE was generated, but you get errors when triggering it? I'm assuming you have a grid enabled on the map. Can you post the macro you are using (or are you using the Shatter macro from the video)?
@@davidmoorehead1865 Sorry, I am using the Shatter script, the AoEControlToken was created and have Grid enabled in the map.
Yes when I click the either Trigger buttons I get a unique error for each button - Token Action.
@@bradpatterson8386 Dang. I could take a look for you if you want to PM me (through Roll20) an invite to your game and promote me to GM. You can find my profile on the forum thread that Nick linked in the description above. Might not get to it until later this evening though, as I'm going to be away from my computer for a few hours. I'm on EST.
@@davidmoorehead1865 I sent you an invite....
Did you get a chance to look at this???
I promoted you to GM. Working overtime but off Thursday and Friday.
Trying to get Cure Wounds to apply healing but not making much sense of the api wiki on it, could i please get some help. It drops the card in the chat box bow when it does the math it just shows as a ‐1
This post might help. app.roll20.net/forum/post/9601612/struggling-using-the-chatsetattr-api-temporary-hps
@@NickOlivo this is my current formula for the math
--damageFormula1|[[(?{Cast at what level?})d8+ @{selected|spell_attack_bonus})]]
Healing is really strange due to a quirk with the Roll20 inline roll parser in how it handles negative numbers (if a negative number is the first number in an inline roll, the parser breaks). Assuming you are using the 5e OGL sheet, try this:
--damageFormula1|[[0 + [[0 - ?{Cast at what level?|1|2|3|4|5|6|7|8|9}]]d8 - @{selected|wisdom_mod}]]
Also, you will probably want to use --noSave|1 to avoid confusing rolls in the chat. See the Aura of Vitality example in the wiki for more info.
does this interfere with Groupcheck and apply damage
Nope, it's independent of those. Happy gaming!
Thumbs up, way up.
Thank you so much! Happy gaming!
Hey Nick,
I installed those two API script, but it doesn't create the character sheet and the macros tht goes with it. What did I do wrong?
Hi Pat - are you getting any error messages in the API console?
Script author here: If you continue to have issues, feel free to send me a PM on Roll20 and I'll see if we can figure it out.
@@NickOlivo , yes I have...;
(From SmartAoE): Unexpected argument identifier (title). Choose from: (range, aoetype, origin, minGridArea, minTokArea, fx, aoeColor),Unexpected argument identifier (leftsub). Choose from: (range, aoetype, origin, minGridArea, minTokArea, fx, aoeColor),Unexpected argument identifier (rightsub). Choose from: (range, aoetype, origin, minGridArea, minTokArea, fx, aoeColor),Unexpected argument identifier (titlecardbackground). Choose from: (range, aoetype, origin, minGridArea, minTokArea, fx, aoeColor),Unexpected argument identifier (oddrowbackground). Choose from: (range, aoetype, origin, minGridArea, minTokArea, fx, aoeColor),Unexpected argument identifier (evenrowbackground). Choose from: (range, aoetype, origin, minGridArea, minTokArea, fx, aoeColor),Unexpected argument identifier (oddrowfontcolor). Choose from: (range, aoetype, origin, minGridArea, minTokArea, fx, aoeColor),Unexpected argument identifier (tablebgcolor). Choose from: (range, aoetype, origin, minGridArea, minTokArea, fx, aoeColor),Unexpected argument identifier (controltokname). Choose from: (range, aoetype, origin, minGridArea, minTokArea, fx, aoeColor),Unexpected argument identifier (controltoksize). Choose from: (range, aoetype, origin, minGridArea, minTokArea, fx, aoeColor),Unexpected argument identifier (aoeoutlinecolor). Choose from: (range, aoetype, origin, minGridArea, minTokArea, fx, aoeColor),Unexpected argument identifier (radius). Choose from: (range, aoetype, origin, minGridArea, minTokArea, fx, aoeColor),Unexpected argument identifier (instant). Choose from: (range, aoetype, origin, minGridArea, minTokArea, fx, aoeColor),Unexpected argument identifier (autoapply). Choose from: (range, aoetype, origin, minGridArea, minTokArea, fx, aoeColor),Unexpected argument identifier (bar). Choose from: (range, aoetype, origin, minGridArea, minTokArea, fx, aoeColor),Unexpected argument identifier (zerohpmarker). Choose from: (range, aoetype, origin, minGridArea, minTokArea, fx, aoeColor)
I'm having trouble with the table not centering in the chat. It aligns to the left and cuts off the left edge from view. Any ideas?
Another user reported this a while ago - the issue was corrected by ensuring the "Enable chat avatars" option was set to ON, from the in-game settings tab (gear icon near chat window). This setting affects the left margin of chat output. In the next release there will be an option to shift the output html accordingly if you prefer to have the chat avatars disabled.
I am not seeing the script that you created for Shatter.
It's located here - gist.github.com/nolivo/003e3c03477523432b7e8a0655a675be#file-smartaoe_shatter Happy gaming!
Wonder if the spell slot changes can be implemented into this script from the ScriptCards API, that way it can check if your player can even cast Shatter first, and then update their spell slots afterwards.
Currently not supported, but resource management is one of the many things on my list to add. Be sure to "follow" the forum thread for updates!
fyi version 0.25 now supports spell slots!
I would assume that if you're using this, it showes to all of the players as your moving it around?
Yes, the areas are visible to everyone
Hey Nick/David, how do you code for spells like Guiding Bolt that need a roll to hit rather than a save?
You can theoretically hack it such that the saveFormula is the attack roll formula and the DC is the target's AC. This will only work for a single target attack, though, due to how the script is structured (only supports a single DC). Note that you'll also then have to apply damage to the correct token manually (since you'd be "reversing" the rolls and you don't want the caster damaging himself when he makes his saving throw [his "attack"]!), so IMO it's prob not going to be worth the time setting it up. The driving force behind the script was AoE interpretation, so certain constructs were set up with that in mind and it is not going to be ideal for every situation. Just another tool in the toolbox :) FWIW I just use std macros or scriptcards for these types of spells in my personal games.
@@davidmoorehead1865 So do I, but I really like the way yours draws the lines and identifies what's hit or not... oh well... I have enough use for the "normal" AoE effects anyway. Great work BTW!!
@@davidmoorehead1865 I have another ask - sorry! Trying to build a Dragonborn's breath weapon. The effects are easy (15' code of fire) but how do I code for a save DC of 8+PC's CON mod+PCs Proficiency Bonus (the target makes a DEX for half for this) and how do I vary the damage based on PC level (it does 2d6 for L1-L5, 3d6 for L6-10, 4d6 for L11-l15, and 5d6 for L16+)?
@@stevecansdale3070 The following assumes you are using the 5e OGL character sheet. NOTE: EDITED THE DAMAGE ROLL BELOW
For the dc: [[8+@{selected|constitution_mod}+@{selected|pb}]]
For the damage: [[[[1+ceil(@{selected|level}/5)]]d6]]
@@davidmoorehead1865 Works perfectly! Thank you Sir!!
Nick, awesome video. I was wondering, is there a way to link it to the Token Action Script? Also, I suppose it has limitations regarding resistances and immunities, and vulnerabilities. I suppose every great thing has its limitations? Also, it the party is casting spells at other player characters, can it take into account proficiency in saving throws?
Wait, it does have immunity and resistant rules... how would I add them to the script that you gave an example of (shatter)?
I believe you'd just add the following lines:
--resistAttr|npc_resistances
--resistanceRule|*0.5
Just saw this. If you are playing 5e, the script automatically looks for npc_resistances, etc. and adjusts the damage accordingly. Also, the default --resistanceRule is already set to 0.5, so no need to set it explicitly if playing 5e. You only need to set these parameters if you are playing a non-5e game. The only issue you might run into is if the npc is resistant to a damage type *unless* from silvered or magic weapons or something similar. In that case, you would have to manually correct the damage. Sorry, it was just too complicated to try to create a generic parser for a freeform text field like that, that uses natural language. Hopefully it doesn't come up too often.
@@davidmoorehead1865 thanks!!
Nick, would it be ok if I mentioned your videos on the DA discord? So many people now have the roll20 pro account because of it and you have completely upped my roll20 game. Side question. I’m gathering the rolled effects won’t work with beyond20 because the player sheets aren’t filled in, correct?
Hi Joel - sure, feel free to share the vids where ever you think they'd be helpful. And I think you're right about beyond20. Happy gaming!
Just posted it in the dm tools discussion. Hope it helps
Is there a link to pre-made macros for 5th edition spells?
Urzoth, I replied to your question on the forum thread, but will paste here for others.
I have quite a few listed in a github repo here: github.com/djmoorehead/SmartAoE-Macros/tree/main though it's not a complete list.
Generally though you can pretty easily modify what's there for other similar spells. Be sure to read the 000_README file first. I have put some notes at the top of each spell listing that should not be copied into your macros. Also, a couple of them might use a custom AoEControlToken "character" that you wouldn't have in your game (e.g. a multi-sided token with different art). Those examples are noted in the top notes section of the individual spells, though. Same goes for a couple that use custom StatusMarkers. Those would need to be modified for your specific game (replaced with another custom marker or with one of the default ones)
Be sure to read the 000_README file first, as I have added some comments to each
Is there a way to have a player click on a monster, attack and have that auto apply damage?
Yes, you could do that with the alterbars api - app.roll20.net/forum/post/4741812/alterbars-2-dot-0-new-and-improved/?pagenum=1
Technically, you could use SmartAoE for single target attacks by setting the "DC" to the target's AC and the saveFormula to the attack roll, but imo opinion the scriptcards route is much cleaner and more versatile for this purpose.
This script looks so cool but its also 1000x more prep for a DM and feels like a bad idea for actual DM's for so little pay off. The older video with spawndefaultoken seems like a much faster and simpler way to handle spell aoe's.
A valid point about setup time. Like many scripts, YMMV, and could take a lot or a little time depending on how deep of a dive you want to do (and if it's all on you or if your players can share the workload). It's for sure a lot of syntax per macro, though they tend to follow similar patterns so once you have a few you're really only changing a small number of lines unless you really want a lot of customization in AoE colors/styles & chat appearance. If you have players that spam a lot of AoE's it could save a lot of time in the long run vs Spawn/rolling individual saving throws/applying damage against mobs. I wrote it (and Spawn), but still don't use it for *all* of our spells, lol. One of my players really got into it and set up a bunch for his character on his own, so that was nice. One thing that really motivated me to make it was cone and line spells: I wanted an objective way to determine which creatures were affected when cast in non-90/45deg directions, as I found templates lacking in these cases. Btw, I'm assembling a repository of spells for cut/paste, found here: github.com/djmoorehead/SmartAoE-Macros. As I make more and folks share theirs I'll add to it to hopefully reduce prep time for other users. Thanks for the feedback!
What Scripts do you use in your DnD games? Does it vary depending on the game?
Hi there - yes, it depends on the game, but the ones I almost always have are tokenmod, turnmarker, group initiative, group check & apply damage, tokenaction, mapsizer, and welcome package.
@@NickOlivo Thanks!
What if some Targets have Advantage and others have Disadvantage in the same casting? Also a marker for a persistent spell like entangle would be cool.
Regarding the advantage/disadvantage, unfortunately, there's only so much a script that targets multiple creatures can do before it's no faster/more efficient than just rolling saves & damage for each of them individually. For the entangle marker, I think you could use the --conditionfail parameter described in the script's wiki for that, but the script's author could tell you for sure.
As Nick, mentioned there is only so far that automation can get you. However, note that there is an undocumented feature for 5e character sheets: if a target creature has the "magic resistance" trait (conferring advantage on saving throws against spells and other magical effects.), then the script will automatically roll their save with advantage. This just happens, without any need for additional macro syntax.
Regarding condition markers for entangle, etc., Nick is correct in directing you to the --conditionFail command. Valid examples include:
--conditionFail|red (red circle)
--conditionFail|red@3 (red circle with numeric overlay)
--conditionFail|skull,cobweb (two different markers)
Note that custom markers can also be used, but you will have to include both the name and the number of the marker (e.g. name::####). These can be easily found within the token-mod documentation handout in the section describing status markers.
Hey Nick was wondering if yourself or any1 on here could help me with this Awesome Api iv downloaded both the Api mentioned then just to try it out i copy pasted ur Shatter spell macro as 1 of my players has the spell, but for some reason when the Aoe is over some enemies & i click on the trigger all button i get the animation but no card in the chat & if i cast it over an empty space i get the card in the chat but missing like a 1/4 of the card. Any suggestions would would be great thanks.
Hi Ash - are you getting any errors in the API console? If not, can you post your macro code here?
@@NickOlivo im still relatively new to all this but i dont think im getting any Api errors. The macro code im using is just a copy paste of ur own but just in case iv done something to it here it is .
!smartaoe {{
--title|Shatter
--leftsub|Slot level ?{Cast at what level?|2|3|4|5|6|7|8|9}
--rightsub|DC @{selected|spell_save_dc} CON
--titlecardbackground|linear-gradient(blue, cyan)
--oddrowbackground|#00ccff
--evenrowbackground|#edfcfc
--oddrowfontcolor|#000000
--tablebgcolor|#edfcfc
--controlTokName|AoEControlToken
--controlTokSize|1
--aoeColor|#00ccff50
--aoeOutlineColor|#0099ff
--aoeType|circle, float
--radius|10ft
--minGridArea|0.25
--minTokArea|0.25
--fx|burst-holy
--dc|@{selected|spell_save_dc}
--saveFormula|?{SaveType|Normal,5eCON|Advantage,|Disadvantage,}
--damageFormula1|[[(?{Cast at what level?}+1)d8]]
--damageType1|Thunder
--instant|1
--autoApply|yes
--bar|3
--zeroHPmarker|dead
--desc|A sudden loud ringing noise, painfully intense, erupts from a point of your choice within range. Each creature in a 10-foot-radius sphere centered on that point must make a Constitution saving throw. A creature takes 3d8 thunder damage on a failed save, or half as much damage on a successful one. A creature made of inorganic material such as stone, crystal, or metal has disadvantage on this saving throw. A nonmagical object that isn’t being worn or carried also takes the damage if it’s in the spell’s area.
}}
@@NickOlivo also here is a link to screen capture i took of the image card i get if it helps u in any way. drive.google.com/file/d/13pqQVTwwbUhEjubFgwIqnU1Jjfl2sfvQ/view?usp=sharing
@@ashwilson5387 I'm not sure if this is just the TH-cam comment editor eating the html replacements, but your saveFormula looks like you didn't use } for the ending bracket of the attribute in your query.
Regarding triggering over empty squares, you should be seeing a Title, damage line (if any), and description (if any). I couldn't access your Google drive screen grab, so not sure what you are seeing.
The saveFormula would be:
--saveFormula|?{SaveType|Normal,5eCON|Advantage,|Disadvantage,}
Is there a way to add an image inside the AoE?
You can! Similar to the SpawnDefaultToken script (if you are familiar with that one), you can set up the default token of a character sheet with a custom AoE image (like a fireball). Images with partial transparency work best (requires png format to support transparency). Then you can use the --controlTokName, --controlTokSize, and possibly the --controlTokSide (if multi-sided) commands in your macro. The default reticle control token will be replaced with the default token specified. Check out the "Ice Storm" example in the wiki :)
Thanks, David!
Sorry man but why is the card not shown in my table when i hit the Trigger-all? do i need another API to get cards? And damage isnt being applied either :(
Do you have both SmartAoE *and* libInline intalled? If so, can you post your macro code, either here or in the forum thread?
Hi Joanf1978 - try changing the save formula line to this - --saveFormula|?{SaveType|Normal,5eCON|Advantage,|Disadvantage,} and let me know if that fixes it.
@@davidmoorehead1865 i do have both installed. your code works with the burning hands example you provide but not with nick's Shatter
@@NickOlivo Thenk youu very much! Whatever it was it worked. Congratz to both of you for your excelent work
@@joanf1978 Nick's comment above (replacing his --saveFormula line) fixed that for another user for his Shatter example. The closing brackets within the query needed to use html replacements, which apparently got converted by his editor when he pasted the example to GitHub.
Bahgawd!!!!
Im trying to make an Hunger of Hadar where the damage at start should trigger without saving trow and the damage at the end of the turn should apply only when a creature fail the saving throw (no half) im losing my mind on it :D My small brain have allow me to use the ice storm template as a baseline, make the token stay over time, fixing the damage type but no further XD
Hi Leakys - there are a bunch more examples here - github.com/djmoorehead/SmartAoE-Macros/tree/main Spirit Guardians might be a good one to look at.
@@NickOlivo thanks as always
ugh got too far into this and too interested before realising it was an API one.
Hi Nick, Thank you for all your awesome videos, they all made my day !
I encountered an issue however when using these macros. They work when I use them, but when my players use them, they get this message in the chat:
Something went wrong when processing rolls.
The error message generated by Roll20 is:
SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but "C" found.
Would you have any idea as why is that the case ? and what does this message mean ? I've looked it up on the roll20 forums but couldn't find any message related to it.
thank you so much for your help, and have a great day
I'm not sure about that one, sorry. I'd say post over in the Mod forums and see if the script's author can chime in.
@@NickOlivo alright, will do, thanks for your answer :)