Even though these videos are a couple years old,.. they are fantastic for information. I've actually searched for almost this exact function, obviously not using the right search words. I'm just amazed to see Your sub #s are not a lot higher... we need to change that. Great video!! Thanx Muchly!!!
Absolutely, they helped me go from just using the API companion to having very well put together games using a plethora of API scripts that has improved the foundation of my games, and my players have had an amazing time.
Just wanted to say a huge thank you for all the work you do putting these together. They're clear, concise, and extremely helpful for GM's new to Roll20 like myself. Keep up the great work Nick!
Ditto the comments by everyone else here. Your API tutorials are hands down THE best. Though I've been able to glean a good deal from the PowerCard wiki (and most other API script tutorials), your explanations are INCREDIBLY clear. What would take me an hour to read and understand, then use, I get in minutes with your videos. Please keep making them.
Fantastic video as always. Powercard is the most epic Api ever. And what would be great is a nice video on "Pcm helper" that automaticaly generate Powercards for Npc's actions etc. Still having issues with that one and the forum is not helping much. I can hardly understand why this script is not more popular, it could be so freaking usefull :p
Excellent tutorial. I've done all my coding in C#, and avoided JavaScript, but your series of videos has been a great help in understanding what can be done. Looking forward to many more.
Absolutely love your videos! You explain each line of your APIs and macros; rather than just saying 'copy it from the description'. It means that I know exactly how to adjust it for my needs, rather than having to work out each line on my own. On a side note, I don't think that people should be complaining when you don't tell them they need a pro subscription to use APIs. I watched a couple of videos before I realised that; didn't make them any less informative, or entertaining....and I'm now Pro. Now looking for a spell casting monster to test this out :)
This is amazing. Exactly what I want to incorporate into my game. I appreciate you going thru all the details. The API itself also seems well written and expansive.
Another great video, Nick. One thing you might want to note is that similar to using conditionals for a critical hit you might want to have a conditional for rolling a "1" (assuming you are playing with the rule that a 1 always misses). At higher levels of D&D 5e it is possible with a good enough bonus on an attack for a rolled 1 + bonuses to exceed the target's AC. Which would result in a "hit" in most macros when it ought to result in a "miss". Not a common situation, but mentioning it for completeness...
Another GREAT video, sir! Excellent information. It's consice, fun to learn, easy to follow along, and straight to the good stuff! Can't wait to see more PowerCard videos from you if you are so inclined. Once again. Thank you. Please make more.
I got excited by the name PowerCards, thinking it was something like HyperCard. I'm impressed you are able to use these add-ons, but I have no appetite for something with syntax like "this ?? means if, that ?? means then." OMG scripting could be so much easier. I do appreciate your videos, even if the scripts are not my cup of tea.
3 роки тому
So much love this macros and stuff!!! Would love a revision if possible... Thanks a lot Mr. Olivo! Regards from Tabasco, México [Land of The Olmecs]!
Interesting thing to note on the behavior of the VFX... I thought I had written the code incorrectly as I was listening to the video and the visual effects were not functioning. Within the comments another person mentioned the players needing to be on the active player page. So it occurred to me that even though I WAS on the active player page - somehow something was not "refreshing" properly. I went to the page toolbar and reloaded my active player map... and then the script worked perfectly. I am not sure what it is that needs to be "refreshed" here - but I suggest that everyone refresh their active player page before testing their scripts as well.
This is a wonderful tutorial. I have seen a problem that I'm not sure how to fix. You have the same problem in the Video. Hobgoblin Captains AC is 17 Powercard shows 12. It is doing this for all of the monsters so far.
Wow, wow, and just wow. Doing more research there are 2 AC stat blocks, and both are different on all monster npc sheets. Short of going through and changing every monster sheet, the only solution I came up with was to change the reference to npc_ac. just means They can't use it against other players.
After many years of watching UA-cam videos on multiple subjects, your channel is only the third channel to which I have ever subscribed. I love your videos. You're presentation is clear, simple and easy to understand. You also have the perfect teacher video voice. Thank you.
Hi Nick, this is great mate. Really appreciate it. I found it worked fine for player character sheets but the AC value was incorrect and defaulted for NPC character sheets. Where you call to "target|AC" its needs to be "target|npc_ac" to call the correct AC from a token that assigned an NPC character sheet. This meant though that any attack would hit a token with the player character sheet. I have bar 2 set to AC for all tokens in my campaign setting. I ended up calling "target|bar2". This meant it took the value from the bar and since I set up all my tokens with the AC in bar 2 it resolved the issue for me.
You're videos have made me a better Roll20 GM. I have one question/request, have you ever thought of doing a video on you're favourite Roll20 token assets? There are so many of them, it can be hard to decide. Particularly spell tokens? Often times tokens end up looking a lot different than their preview, especially animated ones judging by the weather pack I bought which looked a lot better in use. I know it is very different to what you usually do, but it could be a nice, possibly easy, video to put together.
Heya, Nick. Now that you've moved on to Scriptcards, any chance you'll come back to these Powercard videos and do a conversion vid? I'm personally struggling with figuring out the code conversion. Luckily Power and Script play nice together but as you pointed out, Script has a ton more functionality and I'd like to make use of some of that!
I don't have plans to do conversions right now, but some of the folks over on this forum app.roll20.net/forum/category/46806 might be able to help out if you're stuck on something. Thanks for watching and happy gaming!
I am following along and at the 8:21 mark when I try to add the line that calculates damage if the attack roll hits doesn't work for me. IS there another step I am missing? Is there an additional thing to setting up powercards? I have it added but don't see it in the game to select as a macros?
I've recently discovered your channel and, wow! Cool stuff, well explained, extremely clear. Looking forward for more content. Thank you for your effort. Just one question. I've checked the documentation, and it seems that a lot of options are only available for DD 5e. Will your macro work with PF Community Sheet, or other systems? If not, what is exactly "5e only"? Cheers from Italy.
Hi Valerio - glad you like the videos! From what I understand, many of the API scripts can work with other systems, but you're right, what I'm showing here is specific to D&D 5e. You can see how to refer to various attributes, such as Armor Class, Initiative, etc, by hovering over the attribute on the character sheet, and then you can call that attribute as part of the Power Card.
But let's take this a little bit further... Add this script and Penn & Teller come to your house to teach you real magic and the DM's thermostat at his house drops by 20 degrees.
If you're casting ray of frost on multiple targets is there a way of automatically designating the turn order marker to a specific target For example if you target the hobgoblin the turn order would have hobgoblin_slowed added to the turn order?
Looking at the "Alterbars" API script I see things like: // VERSION INFO and // FUNCTION DECLARATION. Do I copy and paste those right along with the rest of the script? I have never seen them in script before, so I don't know.
I also wanted to add that it looks like @{target|AC} only works for targeting PCs; if you're targeting an NPC with this Ray Of Frost, for some reason, it defaults to output of 12. I'm sure there's a cleaner way to do this, but I found that using @{target|npc_AC} works for me.
Hey, first: awesome explained stuff! But one question that I could not find in the wiki: do you know if there is a way to check for resistances and immunities and reduce the damage that is dealt to the token accordingly?
That's a great question. I haven't tested this thoroughly, but it looks like you can key off of the npc_immunities or npc_resistances attributes. So if you were fighting white dragon, which is immune to cold, you could have this line --?? @{target|npc_immunities} == cold ?? No Effect!|It shrugs off the cold (That's assuming you're using the 5e character sheet, and you're attacking an NPC like a monster, of course.) And thank you for fielding some of the other questions on this thread, much obliged! :)
Hey Nick, thanks for a great video. Can you roll multiple attacks with the powercard API? I am looking for a macro to roll several attack rolls and damage at once. Like the group assaults a castle, and 50 archers fire on them. Do you have a video covering that?
Hi Balt - you can have multiple rolls in there. I don't have a video that covers that topic, but this forum post may help you. app.roll20.net/forum/post/9516681/powercard-and-multiple-attacks
I have a player in a game I gm that has a cursed harp that allows for them to transform into a variety of fiends. Their form is chosen by a roll and whether they have control or not is also chosen by a roll. I'm currently using the wildshape api to transform them between the forms but do you think it would be possible to automatically change their form this way? I guess it would just need to trigger the wildshape api but not sure what that would look like.
I think that would be possible. It would be something like api_wildshape followed by whatever parameters you need to perform the transformation. This link has more information wiki.roll20.net/Script:PowerCards#Advanced_API_Usage
Quick question about the damage roll, when the character levels and the spell does more damage do you have to manually modify the macro to roll more damage? ex. from 2d8 to 3d8. I'm assuming that you would but i'm just checking.
Is there an possibility to add Images to the Power Card? So he cast Ray of Frost, that a Ray of Frost appears in the Chat or something like that? And maybe shows a status marker for slow?
Thank you for creating such understandable, yet in-depth videos, they are a great help. One question. Is there a reason you didn't set a "hit" variable rather than copying the test to hit code over and over. For example, If the attack is a hit, then set an "isHit" variable to 1 or true. Then multiple times you could simply put ?? [isHit]=1 ?? ....... This is the way I would have coded it in my programming days. Then if you need to change the test to hit for any reason, you only change it in the initial variable set. Just curious.
@@NickOlivo Unfortunately I don't have a pro account yet, but I still enjoy watching the videos on advanced macros and api stuff. Thanks for your great video format, you do a great job of explaining. We all know there are tons of programming languages and they all have their owns syntax. At least I am fairly proficient with javascript, so things make sense, well some anyway. Keep up the great work.
This is very cool! Is there a way to access the target's resistances? If the target were resistant to cold, Ray of Frost would do less damage, but as written the macro would still deduct the full damage from that target. It would be very cool to check the target's list of resistances to see if "cold" is there. Is that possible? I wonder, because it seems like NPC resistances are stored differently from PC ones, which might make the detection harder. Hmm.
Not sure, to be honest. It'd depend on the character sheet, and you're right, NPCs and PCs sometimes have their attributes stored differently. Let me know if you figure that out.
I'm trying to make a macro for NPC's . For melee and probably crossbow that roll damage vs Ac but I don't need the FX or Sound EFX. Tried altering the macro you show but it gets hung up some where . I copied and pasted the macro and changed the wording from the spell text to a shortsword attack but all of the the macro shows up in the chat box . Ideas?
Great video! I'm trying to stream line the play for my players who are new to online. Can this only be done with spells or can you make melee attack macros?
Great Video! Thank you very much for your great work !!!!!!! One question....Are the variables like $ATK oder $DMG pre-defined or can i make my own variables with powercards?
But I do have another issue where the visual effect doesn't seem to be working, even when I copy your script from Git directly. not sure what that is about.
Hi JC - I've had trouble every now and then where the fx doesn't fire right away, and then a few minutes later a whole bunch of them go off at once. I'd say refresh the page a few times and see fi that helps.
@@NickOlivo I kinda found my issue, it's the Roll20AM script. It keeps throwing a syntax error and crashing the API every once in a while, preventing the it from working. When I restart the API sandbox it will work... for a while until it crashes again at random, if I disable the AM script, the API is stable (but can't use this script as the sounds don't work). I saw someone on the forum post a similar issue and I put a message in stating I was having a similar issue.
I'm very new to Roll20 and have found these videos invaluable. I have a question though, how would you set up an attack that does multiple types of damage, say, piercing and poison?
YOU ARE THE BEST MACRO TEACHER UGH IT MAKES THING SO MUCH EASIER! Side note: i was wondering, could there be a way for you to make a macro button that would help casters see their spells, and cast them easily? I have a bunch of spell casters in my games and i would love to make things easier for them :3 much appreciated!
The TokenAction script would probably be your best bet there. I've got a video that shows how to use it here - ua-cam.com/video/FPqvEYPJDnc/v-deo.html - but once it's installed, you'd just highlight your player's token and type !ta into the chat box, and that should give them a button that lets them see all their spells & cast from that list.
One thing you might look at is the following PowerCard tag: --spell_list|@{selected|character_id} It will list all the spells for a player with clickable buttons. By default it casts the spell straight from the character sheet, but it allows you to change the configuration so the buttons cast the whatever spell macro you have developed. I've combined that tag in with some other information for a single powercard that works like a "spell book" in chat. Sample code for a 5th level Wizard is: --tokenid|@{selected|token_id} --whisper|@{selected|character_name},GM --format|Spells --name|Spell Book --leftsub|@{selected|character_name} --rightsub|Caster Level @{selected|caster_level} ~C@{selected|class_display}~C --Spell Save DC|[[@{selected|spell_save_dc}]] ^^**Spell Attack Bonus** [[@{selected|spell_attack_bonus}]] ^^**Number of Cantrips Known:** [[4]] ^^**Number of Prepared Spells:** [[@{selected|intelligence_mod} + @{selected|level} ]] --!AvailableSpell|~C ** Available Spell Slots **~C **Level 1:** [[@{selected|lvl1_slots_expended}]] of [[@{selected|lvl1_slots_total}]] Remaining ^^**Level 2:** [[@{selected|lvl2_slots_expended}]] of [[@{selected|lvl2_slots_total}]] Remaining ^^**Level 3:** [[@{selected|lvl3_slots_expended}]] of [[@{selected|lvl3_slots_total}]] Remaining --spell_list|@{selected|character_id}
Thank you for the excellent video. I am having trouble getting the " --vfx_opt|@{selected|token_id} @{target|token_id} beam-frost" line to work. The rest of the macro works perfectly, but no visual "beam-frost" happens. I used the "beam-frost" from bar and that works. Have you seen this? Do you have a suggestion?
Thanks for the kind words, Brian! I have seen this happen before, where sometimes the effects don't fire. I've found refreshing the browser usually helps, though a couple of times I've had to log out/back in again. Hope that helps, and happy gaming!
wait, apparently by default, tracks you upload are set to loop in the jukebox setting. I just needed to toggle that off. I have never used it so I didn't know.
Awesome video Nick.. how would you modify this script to roll damage if no roll is done to hit the target's AC but against a failed DEX save vs a caster Spell DC.
Here is some of the powercard I use for the damage caused by moonbeam: --name|Moonbeam -- Effect|The target must make a constitution saving throw (**DC @{selected|spell_save_dc}**) or take damage. -- Saving Throw|[[ [$ConSav] 1d20 + @{target|constitution_mod} ]] -- ?? $ConSav >= @{selected|spell_save_dc} ?? Saved|No damage taken -- ?? $ConSav < @{selected|spell_save_dc} ?? Damage:|[[@{selected|moonbeam_status}d10]] radiant damage Its a constitution saving throw, but you should get the idea. (the field "moonbeam_status" is something I set in a precursor casting macro so that when the damage is calculated later we know what level it is cast at and how many d10 to apply; you can replace that call with just a "2d10" or whatever your damage roll should be)
Hey, I love your videos, I learned a lot. Just a question for a pro. Is it possible to analyse a roll twice? I run a shadowrun-like system which uses d6 >=5 for success. But I also want to know how many of that rolls were a 6 and give out the number seperatly. Like: Roll 3 D6 test -> Rolls 2 ;5 ;6 -> Printout 2 Successes (>=5) and 1 Critical Roll (=6)
I'm not aware of a way to do exactly what you're looking for, sorry. You could do something like this - /r 3d6>5, which prints out the number of successes, but it won't specifically call out the number of crits.(Though the crit would be highlighted in green). The folks on this forum might be able to help you out more. app.roll20.net/forum/category/19
@@NickOlivo That is how I currently do it. Print out Sucesses in the macro but have to look manually to count crit rolls - which is kind of shit ^^. I may open a topic to ask the question there. Thank you for your time and thoughts. I am very new to RollD20 since the start of Covid..
I'm not sure about that one, sorry. Your best bet would be to post on the forums, someone there should be able to help - app.roll20.net/forum/category/46806
hey is there anyway you could show how to get this to track spells with 5e ogl sheet api and maybe ammo for bows etc using ammo api and set up damage that scales as cantrips overcast spells?
Thanks for the great video. I have the macro - up to and including the sfx working just fine. But I cannot get the vfx command to display anything. I've double checked for spelling mistakes, I've downloaded and used the script direct from github without change, but I can't get it to work. Best I can do is use the equivalent fx command outside of the }} at the end.
Thanks for the kind words! Honestly, I can't remember where I found the freeze ray effect. The musical samples came from the UA-cam platform. But there are a ton of places online where you can get effects.
QQ - Anyone know if there's a community repository of powercards for spells? Essentially a crowdsourced place for basic spells that can be copied and pasted into our own games?
So I'm trying to create a firebolt spell right now and when I try using my audio or try using the vfx it never works... I've got the api scripts and I don't know what to do...
@@NickOlivo I am also struggling to get the visuals to work. I tried this fix and it stops my powercard macro from working at all. I have to disable the roll20AM script to get it working again. Any advise?
Wow absolutely love you videos. Have learned tons. Have they changed powercards for VFX etc? I cant seem to get it to do the call. Tried making it myself. then tried importing your code. Still no vfx. Tired just the vfx call incase I messed up somewhere, cant seem to get it to go.....
@@NickOlivo Strangely it works if I put a pace in after the | and before the @{selected|token_id} call. I cant find that its required, but it started working after that fix. Sometime it might be 5 seconds as the servers are getting slow slow
You could add --whisper|GM to the powercard, and that would only show the card's output to the GM, but I'm not aware of a way to suppress an individual line from the card.
@@NickOlivo follow up question. Could this be built to increase the damage based on character level or would you need to edit the code as the character levels up?
@@drshark61 That may be possible. There's a level attribute that you can query on a given character, so you could build logic around that, but it would depend on how elaborate the calculation would need to be.
@@NickOlivo another follow up. Sorry, I'm sure being a pest, but your videos have been a huge help. With the power cards is there a way for it to reduce spell slots by one when one is cast? Or does this happen automatically?
For this, you'll need another API script called ChatSetAttr, which is part of the Roll20 script library. Then you can add a line to your powercard that looks something like what's described here - app.roll20.net/forum/post/8807123/chatsetattr-spell-slot-expended-help#post-8829805
I have no idea how coding works, and find this all very cool. Just wondering if in the coding it'd be possible to put a conditional ?? on hit, so that when you roll to hit, it doesn't display the target's AC but instead just displays the wording "Hit", or "Miss"?
Didn't test it but this should do the trick. The only downside of this is that the hit and miss will show up in a new line. Maybe you can write all of it in one line (and delete the -- in the beginning of lines 2 and 3). But I didn't test this, so not sure if this would work.
@@MaierFlorian Dude you are awesome. This looks incredible! Mega props to you, hope this gets incorporated into the actual API script with credit to you :O
I've never tried that - but you might be able to it by using the --api command in conjunction with another script like RecursiveTables (app.roll20.net/forum/post/2845333/script-recursivetables-expands-inline-rolls-in-rollable-table-results/?pagenum=1)
actually i figured it out. i made my own rollable table that shoots a little insult at my players if they miss and all i had to do was start with my if/then statement put in my header and then just go [[ name of table ]] and it worked perfectly so my line looked like this ?? $atk > @{target|AC} ?? miss|[[ taunt ]] and it was perfeck
Yep, that's all possible. If you look around the PowerCards forums on Roll20, you'll find tons of different macros people have written for various spells.
@@ZmanGamesp As in, make your own fire or laser type effect? Yes, that can be done. This article talks about how to do that - wiki.roll20.net/Fx_Tool#Custom_FX_Tool and this site lets you play with the various settings to preview what an effect would look like - wiki.roll20.net/fxplayground/ That said, I seem to recall seeing something about custom effects for sci fi games over on the Roll20 reddit, so you may want to check over there, too.
Nick, love the channel and I am a happy supporter on Patreon. I cannot get the sound effect to work in my script. Any suggestions? If it does not make noise it is not the end of the world, I just want to figure it out.
Do you have the sound file loaded into the AM player? If you haven't taken that step, it won't work. Instruction on how to do so are in the play wiki and help menu.
Thanks for the kind words, Steven! Try typing !roll20AM --config and then click the import jukebox link. Then see if your sound plays properly. Good luck!
Completly new to this and find these videos very helpful. I have managed to re-create the above on an Eldritch Blast, works fine, but the sound...no jose it wont play. I have Roll20AM installed, uploaded a spellshot.wav file to my jukebox tracks, plays fine when clicked but not in the macro. The syntax is : --soundfx|_audio,play,nomenu|spellshot ...INT save failed...so any help would be appriciated. Please and thank you.
@PrinceGolis Can you post your vfx line? FYI, here's my Eldritch Blast script: github.com/rhelwig/roll20-scripts-powercards/blob/master/Macros/Spells/EldritchBlast.txt I'm putting my scripts all up here: github.com/rhelwig/roll20-scripts-powercards but I'm still working out some details on how I'm going to proceed. For example, I'm working on tracking Hunter's Mark, Hex, and Hexblade's Curse. It'll be dang cool once I'm done.
@PrinceGolis One thing I often see commented is that the VFX only displays on the active player page, so if you're trying to do it on another page then yeah, it won't show. But I also have found many times when it just takes forever to actually play. Sometimes it's because my internet sucks, but maybe they're also a bit bogged down on their server.
Not sure, sorry. I'd say post over on this forum and the script's author should be able to help. app.roll20.net/forum/post/4225825/script-update-tokenmod-an-interface-to-adjusting-properties-of-a-token-from-a-macro-or-the-chat-area#post-9790227
This is really great stuff. But in reality it doesn't suffice. What if the hobgoblin has resistance against the damage? Or if there is advantage/disadvantage? So though it is really sophisticated stuff there are too many possibiltieswhat might alter the conditions. Things become very complex then.
That's true, it can get very complex, and in some cases it's not worth trying to automate around every possibility. That said, the powercards api is very extensive, and you could probably handle resistance and stuff like that with additional coding.
LOVING the videos, is there any way you could write into this code to have the AC check whispered instead so that the players can see my monster's AC? This would make this PERFECT!
You can have the entire powercard whispered to the GM using the --whisper flag (described in more detail here - wiki.roll20.net/Script:PowerCards) but there isn't a way to just have the AC whispered.
Nick, I don't know if you're still out there alive and kicking but I thought I'd give you a try since the Wiki thread for PowerCards has been locked. I'm trying to apply the Burst-Charm effect to the target of a charm attack. I've got the --vfx_opt|@{target|token_id} burst-charm in the power card but the effect doesn't work. If I try to manually trigger the burst-charm effect it works so I know it's not that. I followed and studied your tutorial letter by letter and cannot get it to work. Can you think of something I might be missing? I'll include the code that I'm trying below: !power {{ --name|Opponent Casts Spell --rightsub|Gird your loins --leftsub|Duration 24 hours --Result:| @{target|character_name} needs to make a WILL Saving Throw --vfx_opt|@{target|token_id} burst-charm }} Thanks if you can help
Hi There - I ran into this behavior once when the Player Ribbon was on a different page than the one I was using. Try moving your ribbon to that page and see if that helps. Good luck!
@@jaggsbs4066 It does work although I've gotten mixed success with it so I'm still looking for the pattern as to why sometimes it works and other times it doesn't
There's an example of a scenario pretty close to what you want on this page, wiki.roll20.net/Script:PowerCards under the "SkipTo and Labels" heading. Happy gaming!
@@NickOlivo I've been playing with the macros and having a lot of fun. But I have a couple of questions as a result. 1. Why are there different NPC sheets/sets of attributes? For example, you use 'pb_bonus' and a few of my npcs/monsters use that but most just use 'pb'. From what i can tell there's ~4 different types of sheets, with 1 being quite common, another being somewhat common and 1 or 2 being very rare. Which is super annoying. 2. Is there anyway to call the weapon type? I've had to go through and manually edit all my macros for piercing, slashing etc. I'm guessing there won't be as the macro doesn't really know which weapon on the npc sheet is being used. But is there something like '--bludgeoning_attack' instead of just '--attack'? 3. Which leads on to my last question. Is there a big list of callable/referencable tags anywhere? I know most of the common ones (from mining them from other people's macros, including yours) like 'target' 'selected', 'token', 'token_id', 'character_name' etc. But is there is a nice big list somewhere? There's some posts on the Roll20 forums asking t he same thing, which get pointed to partial/incomplete lists, which is better than nothing. But I'd love a nice big list in a single location...
You can read attributes like the spell save DC directly from a character sheet - so if you wanted to read in the DC from a character named Darla Rickenbocker, that would look like this: @{darla rickenbocker|spell_save_dc}. You could then output that information in the card.
@@NickOlivo sweet, thanks for reaching across time. been watching a lot of your vids (just upgraded the account) and i think im beginning to understand how all this works
How would i add poficency bonus + dex bonus to script if i wasnt using spell attack? I can get the Dex bonus but dont know how to add Prof bonus with it. Thanks again your videos are sooo helpfull!!!
That's a fantastic video! thx. BUT the visual fx doesn't work in my macro! I just copy&paste but it still doesn't work. Does anyone have the same problem? And maybe a solution?
Hi, here is a challenge for you, I would love it if you could something similar for Magic Missile. Where of course you can split up your targets and damage AND declare a level mod to the spell which in turn adds yet more missiles.
that's jurst 2 more dropdown prompts like the advantage thing. One for the level (and using this value to determine the Number for the Damage-Dice) and the second one for asking how many foes to attack - this will explode your script though, because you will have to add numbers to the @target depending on that choice, forcing you to copy/paste all lines that uses the target-id for all options available and adding one more target each time.
@@MaierFlorian its not that simple actually. If you have five missiles you can in theory hit five targets, or two targets where one target gets two missiles and the second gets three missiles. Or in fact target one gets one missile and target two gets four missiles and any combination between those.
@@chrisg8646 oh, you are right, my mistake. Well, maybe you can make the script something like force the player to click 5 targets (or how many you have depending on the spell slot choice), and every target that is clicked more than once will get hit by the amount of missiles you've clicked. But in fact I think this gets so tedious that it is easier to just let the player say what he/she wants to do and the DM manually changes the hit points accordingly in this case.
@@MaierFlorian the easiest work around would probably be one missile macro and use one at a time regards of level and targets. But I thought I would throw out the challenge. Coz I like Nick's stuff.
I have something planned for next month that I thought would do what you're looking for, but the more I read this, the more I realize this is different. You're right, the easiest way would be a macro that handles one missile/target/damage at a time. Designating different targets would require multiple @{target} actions, like @Florian Maier said.
Amazing. I have increased so much DM capability by watching just a few of your videos. I appreciate the walkthroughs with the coding as well. I do have a request/challenge. I can't figure out how to do it... I want to build a powercard script for DMing where regardless of what token I select, I can generically roll "meleeweaponname1", "meleeweaponname2", "rangedweaponname1", along with 1d20 + "meleeattackstat1" + PB. I can click a token, click the macro, and it will pull up the attacks... choose, and it rolls the damage appropriately... I attempted to make a ?{} to run filling the name, and attack stats based off @{selected|meleeweaponname1} and [[ 1d20 + @{selected|meleeattackstat1} + @{selected|pb}]]... it did not work. I am very new to coding, would appreciate either a point in the right direction, an answer, or where to find the solution if it already exists... Thank you!!
You can also create a spell book card that will call all your spells generates a list of all your spells by lev aka !power {{ --whisper|gm|player --name|List Spells --button|Show Spells|!power {{ --name|@{selected|character_name}'s Spells --header|Spell Level --class|spell-list --1st Level Spells|@{selected|repeating_spell-1_$0_spellname}| @{selected|repeating_spell-1_$1_spellname}| @{selected|repeating_spell-1_$2_spellname}| @{selected|repeating_spell-1_$3_spellname}
Looks like it's been removed from the one click install section. The creator may be replacing/updating it. It's still available on GitHub gist.github.com/vicberg/6635c77f7f730529ccf83f64819297c0
Your videos are excellent and very helpful. For me the video does not display, the npc qualities summary only prints out the command and a token id, and the initiative tracker does not display the slow countdown. !power {{ --name|Ray of Frost --leftsub|Ranged Spell Attack --rightsub|60 ft Range --npc_qualities_summary @{target|character_id} --Attack:|[[ [$Atk] ?{Attack|Standard,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{spell_attack_bonus} ]] vs AC @{target|npc_AC} --?? $Atk >= @{target|npc_AC} AND $Atk.base 20 ?? Damage:|[[ [$Dmg] 2d8 ]] --?? $Atk.base == 20 ?? Critical Hit|[[ [$CritDmg] 4d8 ]] --soundfx|_audio,play,nomenu|freezeRay --vfx_opt|@{selected|token_id} @{target|token_id} beam-frost --?? $Atk >= @{target|npc_AC} ?? Slowed:|Target's speed is reduced by 10 ft until start of your next turn --?? $Atk >= @{target|npc_AC} ?? api_token-mod|_ids @{target|token_id} _ignore-selected _set statusmarkers|tread --?? $Atk >= @{target|npc_AC} ?? api_act|-1 1 _Slow --?? $Atk >= @{target|npc_AC} AND $Atk.base 20 ?? alterbar1|_target|@{target|token_id} _bar|1 _amount|-[^Dmg] _show|all --?? $Atk.base == 20 ?? alterbar2|_target|@{target|token_id} _bar|1 _amount|-[^CritDmg] _show|all }} What am I doing wrong?
of course this is possible if you want it. However, learning it by yourself will in most cases lead to hard to maintain code, but if you just want some special small things for your roll20 campaing, this should not be a big problem :)
You totally can. I'm self-taught. :) One of my hopes for this video series is that it'll give folks who've never coded before the confidence to start tinkering. Read everything you can, watch tutorial videos, and tinker. :)
Hey there I think your videos are really cool and helpful. Did you ever think about making any for Foundry VTT, it's a really highly customizable virtual tabletop that I think could really use some creators like you covering it.
Dude, Roll 20 should be paying you bro! Nice video
They do. It's called sponsorships.
Even though these videos are a couple years old,.. they are fantastic for information. I've actually searched for almost this exact function, obviously not using the right search words. I'm just amazed to see Your sub #s are not a lot higher... we need to change that. Great video!! Thanx Muchly!!!
Like 10 seconds in, and I'm freaking jazzed. Love your macro and API videos. THE best.
Absolutely, they helped me go from just using the API companion to having very well put together games using a plethora of API scripts that has improved the foundation of my games, and my players have had an amazing time.
Just wanted to say a huge thank you for all the work you do putting these together. They're clear, concise, and extremely helpful for GM's new to Roll20 like myself. Keep up the great work Nick!
Thank you for the kind words!
Ditto the comments by everyone else here. Your API tutorials are hands down THE best. Though I've been able to glean a good deal from the PowerCard wiki (and most other API script tutorials), your explanations are INCREDIBLY clear. What would take me an hour to read and understand, then use, I get in minutes with your videos.
Please keep making them.
Fantastic video as always. Powercard is the most epic Api ever. And what would be great is a nice video on "Pcm helper" that automaticaly generate Powercards for Npc's actions etc. Still having issues with that one and the forum is not helping much. I can hardly understand why this script is not more popular, it could be so freaking usefull :p
"But with PowerCards, you can!" might be my favorite thing you said this whole video.
i love how you've taken the time to explain this in stages. very good teacher! thanks for all the fantastic videos
Excellent tutorial. I've done all my coding in C#, and avoided JavaScript, but your series of videos has been a great help in understanding what can be done. Looking forward to many more.
Absolutely love your videos! You explain each line of your APIs and macros; rather than just saying 'copy it from the description'. It means that I know exactly how to adjust it for my needs, rather than having to work out each line on my own. On a side note, I don't think that people should be complaining when you don't tell them they need a pro subscription to use APIs. I watched a couple of videos before I realised that; didn't make them any less informative, or entertaining....and I'm now Pro.
Now looking for a spell casting monster to test this out :)
Thanks for the kind words, Leon! I'm glad you found the video helpful.
This is amazing. Exactly what I want to incorporate into my game. I appreciate you going thru all the details.
The API itself also seems well written and expansive.
Another great video, Nick.
One thing you might want to note is that similar to using conditionals for a critical hit you might want to have a conditional for rolling a "1" (assuming you are playing with the rule that a 1 always misses). At higher levels of D&D 5e it is possible with a good enough bonus on an attack for a rolled 1 + bonuses to exceed the target's AC. Which would result in a "hit" in most macros when it ought to result in a "miss". Not a common situation, but mentioning it for completeness...
That's a great point, Scott. Thanks!
Another GREAT video, sir! Excellent information. It's consice, fun to learn, easy to follow along, and straight to the good stuff! Can't wait to see more PowerCard videos from you if you are so inclined. Once again. Thank you. Please make more.
Glad you're finding them helpful, Andrew!
I got excited by the name PowerCards, thinking it was something like HyperCard. I'm impressed you are able to use these add-ons, but I have no appetite for something with syntax like "this ?? means if, that ?? means then." OMG scripting could be so much easier. I do appreciate your videos, even if the scripts are not my cup of tea.
So much love this macros and stuff!!!
Would love a revision if possible... Thanks a lot Mr. Olivo!
Regards from Tabasco, México [Land of The Olmecs]!
Interesting thing to note on the behavior of the VFX... I thought I had written the code incorrectly as I was listening to the video and the visual effects were not functioning. Within the comments another person mentioned the players needing to be on the active player page. So it occurred to me that even though I WAS on the active player page - somehow something was not "refreshing" properly. I went to the page toolbar and reloaded my active player map... and then the script worked perfectly. I am not sure what it is that needs to be "refreshed" here - but I suggest that everyone refresh their active player page before testing their scripts as well.
Awesome stuff. Love your videos. really useful and well explained. Thank you!
This is a wonderful tutorial. I have seen a problem that I'm not sure how to fix. You have the same problem in the Video. Hobgoblin Captains AC is 17 Powercard shows 12. It is doing this for all of the monsters so far.
I believe I figured it out. The stat is listed as npc_AC on cards. not sure where it pulls just AC from.
Wow, wow, and just wow. Doing more research there are 2 AC stat blocks, and both are different on all monster npc sheets. Short of going through and changing every monster sheet, the only solution I came up with was to change the reference to npc_ac. just means They can't use it against other players.
Yeah, I think that's the best bet.
After many years of watching UA-cam videos on multiple subjects, your channel is only the third channel to which I have ever subscribed.
I love your videos.
You're presentation is clear, simple and easy to understand. You also have the perfect teacher video voice.
Thank you.
Thanks for the kind words, Michael!
Hi Nick, this is great mate. Really appreciate it. I found it worked fine for player character sheets but the AC value was incorrect and defaulted for NPC character sheets. Where you call to "target|AC" its needs to be "target|npc_ac" to call the correct AC from a token that assigned an NPC character sheet. This meant though that any attack would hit a token with the player character sheet. I have bar 2 set to AC for all tokens in my campaign setting. I ended up calling "target|bar2". This meant it took the value from the bar and since I set up all my tokens with the AC in bar 2 it resolved the issue for me.
That's a great tip, Julian!
Excellent video, really useful, many thanks for sharing
You're videos have made me a better Roll20 GM. I have one question/request, have you ever thought of doing a video on you're favourite Roll20 token assets? There are so many of them, it can be hard to decide. Particularly spell tokens? Often times tokens end up looking a lot different than their preview, especially animated ones judging by the weather pack I bought which looked a lot better in use.
I know it is very different to what you usually do, but it could be a nice, possibly easy, video to put together.
I'm glad the videos are helpful! I personally haven't used spell tokens before, but I do occasionally review adventures and other add-ons.
This man goes beyond plus ultra.
Nick, thanks so much for your work sir.
Man your videos are aware
Heya, Nick. Now that you've moved on to Scriptcards, any chance you'll come back to these Powercard videos and do a conversion vid? I'm personally struggling with figuring out the code conversion. Luckily Power and Script play nice together but as you pointed out, Script has a ton more functionality and I'd like to make use of some of that!
I don't have plans to do conversions right now, but some of the folks over on this forum app.roll20.net/forum/category/46806 might be able to help out if you're stuck on something. Thanks for watching and happy gaming!
I am following along and at the 8:21 mark when I try to add the line that calculates damage if the attack roll hits doesn't work for me. IS there another step I am missing? Is there an additional thing to setting up powercards? I have it added but don't see it in the game to select as a macros?
I've recently discovered your channel and, wow! Cool stuff, well explained, extremely clear. Looking forward for more content. Thank you for your effort. Just one question. I've checked the documentation, and it seems that a lot of options are only available for DD 5e. Will your macro work with PF Community Sheet, or other systems? If not, what is exactly "5e only"? Cheers from Italy.
Hi Valerio - glad you like the videos! From what I understand, many of the API scripts can work with other systems, but you're right, what I'm showing here is specific to D&D 5e. You can see how to refer to various attributes, such as Armor Class, Initiative, etc, by hovering over the attribute on the character sheet, and then you can call that attribute as part of the Power Card.
But let's take this a little bit further... Add this script and Penn & Teller come to your house to teach you real magic and the DM's thermostat at his house drops by 20 degrees.
That's the next video ;)
If you're casting ray of frost on multiple targets is there a way of automatically designating the turn order marker to a specific target
For example if you target the hobgoblin the turn order would have hobgoblin_slowed added to the turn order?
you can use @{target|name} (I think it's name, if not use google for the exact property) and add it to the name setting for the turnorder
@@MaierFlorian You can either use @{target|token_name} or @{target|character_name} depending on your preference.
Looking at the "Alterbars" API script I see things like: // VERSION INFO and // FUNCTION DECLARATION. Do I copy and paste those right along with the rest of the script? I have never seen them in script before, so I don't know.
Those are read-only, just there as a guide. I like to keep them, but it wont harm anything if you ignore them in your copy of the scrip
Where did you get all your FX sounds? I have checked in the Jukebox provided music and there is not anything close to that.
I've picked them up from various places over the years. Some of them came off of a sound effect CD that I picked up back in like 1999 lol
I also wanted to add that it looks like @{target|AC} only works for targeting PCs; if you're targeting an NPC with this Ray Of Frost, for some reason, it defaults to output of 12. I'm sure there's a cleaner way to do this, but I found that using @{target|npc_AC} works for me.
Hey, first: awesome explained stuff! But one question that I could not find in the wiki: do you know if there is a way to check for resistances and immunities and reduce the damage that is dealt to the token accordingly?
That's a great question. I haven't tested this thoroughly, but it looks like you can key off of the npc_immunities or npc_resistances attributes.
So if you were fighting white dragon, which is immune to cold, you could have this line
--?? @{target|npc_immunities} == cold ?? No Effect!|It shrugs off the cold
(That's assuming you're using the 5e character sheet, and you're attacking an NPC like a monster, of course.) And thank you for fielding some of the other questions on this thread, much obliged! :)
How would you have the macro stop and ask for a players input on whether they would like to use shield and then recalculate the attack?
Hey Nick, thanks for a great video. Can you roll multiple attacks with the powercard API? I am looking for a macro to roll several attack rolls and damage at once. Like the group assaults a castle, and 50 archers fire on them. Do you have a video covering that?
Hi Balt - you can have multiple rolls in there. I don't have a video that covers that topic, but this forum post may help you. app.roll20.net/forum/post/9516681/powercard-and-multiple-attacks
I have a player in a game I gm that has a cursed harp that allows for them to transform into a variety of fiends. Their form is chosen by a roll and whether they have control or not is also chosen by a roll. I'm currently using the wildshape api to transform them between the forms but do you think it would be possible to automatically change their form this way? I guess it would just need to trigger the wildshape api but not sure what that would look like.
I think that would be possible. It would be something like api_wildshape followed by whatever parameters you need to perform the transformation. This link has more information wiki.roll20.net/Script:PowerCards#Advanced_API_Usage
@@NickOlivo Thank you. I'll give it a look and see if I can figure it out.
Quick question about the damage roll, when the character levels and the spell does more damage do you have to manually modify the macro to roll more damage? ex. from 2d8 to 3d8. I'm assuming that you would but i'm just checking.
Yep, that's exactly right.
Love the video, but i was wondering if there is a way for rouges to query "if advantage add sneak roll"?
This forum post has some information on how some people handled that - app.roll20.net/forum/post/4285059/script-powercards-3-thread-4/?pagenum=12
Is there an possibility to add Images to the Power Card? So he cast Ray of Frost, that a Ray of Frost appears in the Chat or something like that? And maybe shows a status marker for slow?
Thank you for creating such understandable, yet in-depth videos, they are a great help. One question. Is there a reason you didn't set a "hit" variable rather than copying the test to hit code over and over. For example, If the attack is a hit, then set an "isHit" variable to 1 or true. Then multiple times you could simply put ?? [isHit]=1 ?? ....... This is the way I would have coded it in my programming days. Then if you need to change the test to hit for any reason, you only change it in the initial variable set. Just curious.
To be completely honest, Jim, that didn't occur to me. Give that a shot and let me know how it goes. Thanks for watching, and happy gaming!
@@NickOlivo Unfortunately I don't have a pro account yet, but I still enjoy watching the videos on advanced macros and api stuff. Thanks for your great video format, you do a great job of explaining. We all know there are tons of programming languages and they all have their owns syntax. At least I am fairly proficient with javascript, so things make sense, well some anyway. Keep up the great work.
This is very cool! Is there a way to access the target's resistances? If the target were resistant to cold, Ray of Frost would do less damage, but as written the macro would still deduct the full damage from that target. It would be very cool to check the target's list of resistances to see if "cold" is there. Is that possible? I wonder, because it seems like NPC resistances are stored differently from PC ones, which might make the detection harder. Hmm.
Not sure, to be honest. It'd depend on the character sheet, and you're right, NPCs and PCs sometimes have their attributes stored differently. Let me know if you figure that out.
SO I was wondering why you use alterbar when you can use token-mod since you already using it to apply marker?
I'm trying to make a macro for NPC's . For melee and probably crossbow that roll damage vs Ac but I don't need the FX or Sound EFX. Tried altering the macro you show but it gets hung up some where . I copied and pasted the macro and changed the wording from the spell text to a shortsword attack but all of the the macro shows up in the chat box . Ideas?
Great video! I'm trying to stream line the play for my players who are new to online. Can this only be done with spells or can you make melee attack macros?
You can do this with melee stuff too, sure.
Great Video! Thank you very much for your great work !!!!!!! One question....Are the variables like $ATK oder $DMG pre-defined or can i make my own variables with powercards?
Thanks for the kind words, Steve. You can define your own variable names. Happy gaming!
But I do have another issue where the visual effect doesn't seem to be working, even when I copy your script from Git directly. not sure what that is about.
Hi JC - I've had trouble every now and then where the fx doesn't fire right away, and then a few minutes later a whole bunch of them go off at once. I'd say refresh the page a few times and see fi that helps.
@@NickOlivo I kinda found my issue, it's the Roll20AM script. It keeps throwing a syntax error and crashing the API every once in a while, preventing the it from working. When I restart the API sandbox it will work... for a while until it crashes again at random, if I disable the AM script, the API is stable (but can't use this script as the sounds don't work). I saw someone on the forum post a similar issue and I put a message in stating I was having a similar issue.
Glad you were able to isolate the cause. Hopefully the script's author will be able to fix it.
I'm very new to Roll20 and have found these videos invaluable. I have a question though, how would you set up an attack that does multiple types of damage, say, piercing and poison?
YOU ARE THE BEST MACRO TEACHER UGH IT MAKES THING SO MUCH EASIER!
Side note: i was wondering, could there be a way for you to make a macro button that would help casters see their spells, and cast them easily? I have a bunch of spell casters in my games and i would love to make things easier for them :3 much appreciated!
The TokenAction script would probably be your best bet there. I've got a video that shows how to use it here - ua-cam.com/video/FPqvEYPJDnc/v-deo.html - but once it's installed, you'd just highlight your player's token and type !ta into the chat box, and that should give them a button that lets them see all their spells & cast from that list.
One thing you might look at is the following PowerCard tag:
--spell_list|@{selected|character_id}
It will list all the spells for a player with clickable buttons. By default it casts the spell straight from the character sheet, but it allows you to change the configuration so the buttons cast the whatever spell macro you have developed.
I've combined that tag in with some other information for a single powercard that works like a "spell book" in chat. Sample code for a 5th level Wizard is:
--tokenid|@{selected|token_id}
--whisper|@{selected|character_name},GM
--format|Spells
--name|Spell Book
--leftsub|@{selected|character_name}
--rightsub|Caster Level @{selected|caster_level} ~C@{selected|class_display}~C
--Spell Save DC|[[@{selected|spell_save_dc}]]
^^**Spell Attack Bonus** [[@{selected|spell_attack_bonus}]]
^^**Number of Cantrips Known:** [[4]]
^^**Number of Prepared Spells:** [[@{selected|intelligence_mod} + @{selected|level} ]]
--!AvailableSpell|~C ** Available Spell Slots **~C
**Level 1:** [[@{selected|lvl1_slots_expended}]] of [[@{selected|lvl1_slots_total}]] Remaining
^^**Level 2:** [[@{selected|lvl2_slots_expended}]] of [[@{selected|lvl2_slots_total}]] Remaining
^^**Level 3:** [[@{selected|lvl3_slots_expended}]] of [[@{selected|lvl3_slots_total}]] Remaining
--spell_list|@{selected|character_id}
@@scottpisani75 This! ^
@@scottpisani75 Thankyou so much!! This really helped alot!
Thank you for the excellent video. I am having trouble getting the " --vfx_opt|@{selected|token_id} @{target|token_id} beam-frost" line to work. The rest of the macro works perfectly, but no visual "beam-frost" happens. I used the "beam-frost" from bar and that works. Have you seen this? Do you have a suggestion?
Thanks for the kind words, Brian! I have seen this happen before, where sometimes the effects don't fire. I've found refreshing the browser usually helps, though a couple of times I've had to log out/back in again. Hope that helps, and happy gaming!
Nick, when I try making the ray of frost, the audio keeps looping over and over, any ideas as to what is causing that?
wait, apparently by default, tracks you upload are set to loop in the jukebox setting. I just needed to toggle that off. I have never used it so I didn't know.
Good to know, thanks!
Awesome video Nick.. how would you modify this script to roll damage if no roll is done to hit the target's AC but against a failed DEX save vs a caster Spell DC.
Here is some of the powercard I use for the damage caused by moonbeam:
--name|Moonbeam
-- Effect|The target must make a constitution saving throw (**DC @{selected|spell_save_dc}**) or take damage.
-- Saving Throw|[[ [$ConSav] 1d20 + @{target|constitution_mod} ]]
-- ?? $ConSav >= @{selected|spell_save_dc} ?? Saved|No damage taken
-- ?? $ConSav < @{selected|spell_save_dc} ?? Damage:|[[@{selected|moonbeam_status}d10]] radiant damage
Its a constitution saving throw, but you should get the idea. (the field "moonbeam_status" is something I set in a precursor casting macro so that when the damage is calculated later we know what level it is cast at and how many d10 to apply; you can replace that call with just a "2d10" or whatever your damage roll should be)
Hey, I love your videos, I learned a lot. Just a question for a pro. Is it possible to analyse a roll twice? I run a shadowrun-like system which uses d6 >=5 for success. But I also want to know how many of that rolls were a 6 and give out the number seperatly. Like: Roll 3 D6 test -> Rolls 2 ;5 ;6 -> Printout 2 Successes (>=5) and 1 Critical Roll (=6)
I'm not aware of a way to do exactly what you're looking for, sorry. You could do something like this - /r 3d6>5, which prints out the number of successes, but it won't specifically call out the number of crits.(Though the crit would be highlighted in green). The folks on this forum might be able to help you out more. app.roll20.net/forum/category/19
@@NickOlivo That is how I currently do it. Print out Sucesses in the macro but have to look manually to count crit rolls - which is kind of shit ^^. I may open a topic to ask the question there. Thank you for your time and thoughts. I am very new to RollD20 since the start of Covid..
And now I'm trying to figure out how to make this work with the Official PAthfinder sheet because while I'm playing 5e ATM I'm running PF1e, haha!
How do I address the issue of characters having temporary HP, what would need to be updated to reflext firstly the temp HP and then the regular hp
I'm not sure about that one, sorry. Your best bet would be to post on the forums, someone there should be able to help - app.roll20.net/forum/category/46806
hey is there anyway you could show how to get this to track spells with 5e ogl sheet api and maybe ammo for bows etc using ammo api and set up damage that scales as cantrips overcast spells?
Thanks for the great video. I have the macro - up to and including the sfx working just fine. But I cannot get the vfx command to display anything. I've double checked for spelling mistakes, I've downloaded and used the script direct from github without change, but I can't get it to work. Best I can do is use the equivalent fx command outside of the }} at the end.
Hello im curious wwere you got your sound/sounds from. Love your videos man keep up the good work
Thanks for the kind words! Honestly, I can't remember where I found the freeze ray effect. The musical samples came from the UA-cam platform. But there are a ton of places online where you can get effects.
QQ - Anyone know if there's a community repository of powercards for spells? Essentially a crowdsourced place for basic spells that can be copied and pasted into our own games?
So I'm trying to create a firebolt spell right now and when I try using my audio or try using the vfx it never works... I've got the api scripts and I don't know what to do...
Try typing !roll20AM --config and then click the import jukebox link. Then see if your sound plays properly. Good luck!
@@NickOlivo Thanks all fixed now!
@@NickOlivo I am also struggling to get the visuals to work. I tried this fix and it stops my powercard macro from working at all. I have to disable the roll20AM script to get it working again. Any advise?
Is there a library of power cards for spells or attacks, or other actions?
Not that I'm aware of, sorry.
The audio effect keeps repeating for me. Know how to fix this?
Wow absolutely love you videos. Have learned tons. Have they changed powercards for VFX etc? I cant seem to get it to do the call. Tried making it myself. then tried importing your code. Still no vfx. Tired just the vfx call incase I messed up somewhere, cant seem to get it to go.....
To the best of my knowledge, nothing's changed. Can you use the FX tool on the toolbar without issue?
@@NickOlivo Strangely it works if I put a pace in after the | and before the @{selected|token_id} call. I cant find that its required, but it started working after that fix. Sometime it might be 5 seconds as the servers are getting slow slow
Could you use the "Silent" feature to hide the vs AC so your players don't know the monster's AC? If so what would that look like?
You could add --whisper|GM to the powercard, and that would only show the card's output to the GM, but I'm not aware of a way to suppress an individual line from the card.
@@NickOlivo follow up question. Could this be built to increase the damage based on character level or would you need to edit the code as the character levels up?
@@drshark61 That may be possible. There's a level attribute that you can query on a given character, so you could build logic around that, but it would depend on how elaborate the calculation would need to be.
@@NickOlivo another follow up. Sorry, I'm sure being a pest, but your videos have been a huge help. With the power cards is there a way for it to reduce spell slots by one when one is cast? Or does this happen automatically?
For this, you'll need another API script called ChatSetAttr, which is part of the Roll20 script library. Then you can add a line to your powercard that looks something like what's described here - app.roll20.net/forum/post/8807123/chatsetattr-spell-slot-expended-help#post-8829805
I have no idea how coding works, and find this all very cool. Just wondering if in the coding it'd be possible to put a conditional ?? on hit, so that when you roll to hit, it doesn't display the target's AC but instead just displays the wording "Hit", or "Miss"?
sure, just don't put the "vs AC ..." stuff in there and add another line with the condition if hit then "Hit" and one line if not hit then "Miss".
@@MaierFlorian Thank you very much! I'll have to go about and teach myself how that would look in code form or ask a friend but that's super helpful!
@@willteggin4455 hopefully youtube won't mess up the line:
--Attack:|[[ [$Atk] ?{Attack|Standard, 1d20|w/Advantage, 2d20kh1|w/Disadvantage, 2d20kl1}+@{spell_attack_bonus}]]
--?? $Atk >= @{target|AC} ?? Hit!
--?? &Atk < @{target|AC} ?? Miss.
Didn't test it but this should do the trick. The only downside of this is that the hit and miss will show up in a new line. Maybe you can write all of it in one line (and delete the -- in the beginning of lines 2 and 3). But I didn't test this, so not sure if this would work.
@@MaierFlorian Dude you are awesome. This looks incredible! Mega props to you, hope this gets incorporated into the actual API script with credit to you :O
is there any way to make the power card roll off a rollable table and post the outcome?
I've never tried that - but you might be able to it by using the --api command in conjunction with another script like RecursiveTables (app.roll20.net/forum/post/2845333/script-recursivetables-expands-inline-rolls-in-rollable-table-results/?pagenum=1)
actually i figured it out. i made my own rollable table that shoots a little insult at my players if they miss and all i had to do was start with my if/then statement put in my header and then just go [[ name of table ]] and it worked perfectly so my line looked like this
?? $atk > @{target|AC} ?? miss|[[ taunt ]]
and it was perfeck
The way the attacks show up with the colors in the chat window - is that the PowerCard API or is that another API?
That's just powercards.
What about effects that hit multiple targets?
Howabout for Fireball, Lightning Bolt, ect.....the most common spells
Yep, that's all possible. If you look around the PowerCards forums on Roll20, you'll find tons of different macros people have written for various spells.
@@NickOlivo I'm looking into this for a Star Wars campaign, how hard is it to design a visual effect from scratch?
@@ZmanGamesp As in, make your own fire or laser type effect? Yes, that can be done. This article talks about how to do that - wiki.roll20.net/Fx_Tool#Custom_FX_Tool and this site lets you play with the various settings to preview what an effect would look like - wiki.roll20.net/fxplayground/ That said, I seem to recall seeing something about custom effects for sci fi games over on the Roll20 reddit, so you may want to check over there, too.
Where's a good place to send you annoying questions about macros and using the api? Thanks!!
there is a macro to automatically deal damage to a selected enemy, with direct attack from the character sheet. as was done on this powercard.
Cool! Can you send me a link?
@@NickOlivo no that is a question.
Not that I'm aware of.
@@NickOlivo I am working on It...
Also do you have a similar macro for melee attacks?
I don't have anything pre-done for melee attacks, but the process would be very similar to what's in the video.
Nick, love the channel and I am a happy supporter on Patreon. I cannot get the sound effect to work in my script. Any suggestions? If it does not make noise it is not the end of the world, I just want to figure it out.
Do you have the sound file loaded into the AM player? If you haven't taken that step, it won't work. Instruction on how to do so are in the play wiki and help menu.
Thanks for the kind words, Steven! Try typing !roll20AM --config and then click the import jukebox link. Then see if your sound plays properly. Good luck!
Completly new to this and find these videos very helpful. I have managed to re-create the above on an Eldritch Blast, works fine, but the sound...no jose it wont play. I have Roll20AM installed, uploaded a spellshot.wav file to my jukebox tracks, plays fine when clicked but not in the macro. The syntax is : --soundfx|_audio,play,nomenu|spellshot ...INT save failed...so any help would be appriciated. Please and thank you.
Try typing !roll20AM --config and then click the import jukebox link. Then see if your sound plays properly. Good luck!
@@NickOlivo YES YES aaaand Yes! You have yourself a patreon! Thank you!
@@NickOlivo LOL, I wish I had seen this comment 4 hours ago.
@PrinceGolis Can you post your vfx line?
FYI, here's my Eldritch Blast script: github.com/rhelwig/roll20-scripts-powercards/blob/master/Macros/Spells/EldritchBlast.txt
I'm putting my scripts all up here: github.com/rhelwig/roll20-scripts-powercards
but I'm still working out some details on how I'm going to proceed. For example, I'm working on tracking Hunter's Mark, Hex, and Hexblade's Curse. It'll be dang cool once I'm done.
@PrinceGolis One thing I often see commented is that the VFX only displays on the active player page, so if you're trying to do it on another page then yeah, it won't show.
But I also have found many times when it just takes forever to actually play. Sometimes it's because my internet sucks, but maybe they're also a bit bogged down on their server.
Just added tokenmod api and my game just crashes, is this my computer not being powerful enough? Chat won't load when I type !tokenmod --help
Not sure, sorry. I'd say post over on this forum and the script's author should be able to help. app.roll20.net/forum/post/4225825/script-update-tokenmod-an-interface-to-adjusting-properties-of-a-token-from-a-macro-or-the-chat-area#post-9790227
This is really great stuff. But in reality it doesn't suffice. What if the hobgoblin has resistance against the damage? Or if there is advantage/disadvantage? So though it is really sophisticated stuff there are too many possibiltieswhat might alter the conditions. Things become very complex then.
That's true, it can get very complex, and in some cases it's not worth trying to automate around every possibility. That said, the powercards api is very extensive, and you could probably handle resistance and stuff like that with additional coding.
LOVING the videos, is there any way you could write into this code to have the AC check whispered instead so that the players can see my monster's AC? This would make this PERFECT!
You can have the entire powercard whispered to the GM using the --whisper flag (described in more detail here - wiki.roll20.net/Script:PowerCards) but there isn't a way to just have the AC whispered.
Nick,
I don't know if you're still out there alive and kicking but I thought I'd give you a try since the Wiki thread for PowerCards has been locked. I'm trying to apply the Burst-Charm effect to the target of a charm attack. I've got the --vfx_opt|@{target|token_id} burst-charm
in the power card but the effect doesn't work. If I try to manually trigger the burst-charm effect it works so I know it's not that. I followed and studied your tutorial letter by letter and cannot get it to work. Can you think of something I might be missing? I'll include the code that I'm trying below:
!power {{
--name|Opponent Casts Spell
--rightsub|Gird your loins
--leftsub|Duration 24 hours
--Result:| @{target|character_name} needs to make a WILL Saving Throw
--vfx_opt|@{target|token_id} burst-charm
}}
Thanks if you can help
Hi There - I ran into this behavior once when the Player Ribbon was on a different page than the one I was using. Try moving your ribbon to that page and see if that helps. Good luck!
Hey Jeff Harbin just wanting to know if Nick's solution worked cause I'm wanting to try that out as well.
@@jaggsbs4066 It does work although I've gotten mixed success with it so I'm still looking for the pattern as to why sometimes it works and other times it doesn't
is there a way to combine this with !ta ?
camm you make a video only for melee atack with calculete hit, damage and aply the damage in other token. Please.
There's an example of a scenario pretty close to what you want on this page, wiki.roll20.net/Script:PowerCards under the "SkipTo and Labels" heading. Happy gaming!
Awesome macro, thanks! But the github code is incomplete/a partial version. Seems to be from roughly half way through the video
Whoops - sorry about that. I've just updated the code.
@@NickOlivo I've been playing with the macros and having a lot of fun. But I have a couple of questions as a result.
1. Why are there different NPC sheets/sets of attributes? For example, you use 'pb_bonus' and a few of my npcs/monsters use that but most just use 'pb'. From what i can tell there's ~4 different types of sheets, with 1 being quite common, another being somewhat common and 1 or 2 being very rare. Which is super annoying.
2. Is there anyway to call the weapon type? I've had to go through and manually edit all my macros for piercing, slashing etc. I'm guessing there won't be as the macro doesn't really know which weapon on the npc sheet is being used. But is there something like '--bludgeoning_attack' instead of just '--attack'?
3. Which leads on to my last question. Is there a big list of callable/referencable tags anywhere? I know most of the common ones (from mining them from other people's macros, including yours) like 'target' 'selected', 'token', 'token_id', 'character_name' etc. But is there is a nice big list somewhere? There's some posts on the Roll20 forums asking t he same thing, which get pointed to partial/incomplete lists, which is better than nothing. But I'd love a nice big list in a single location...
what would you add for a save DC?
You can read attributes like the spell save DC directly from a character sheet - so if you wanted to read in the DC from a character named Darla Rickenbocker, that would look like this: @{darla rickenbocker|spell_save_dc}. You could then output that information in the card.
@@NickOlivo sweet, thanks for reaching across time. been watching a lot of your vids (just upgraded the account) and i think im beginning to understand how all this works
How would i add poficency bonus + dex bonus to script if i wasnt using spell attack? I can get the Dex bonus but dont know how to add Prof bonus with it. Thanks again your videos are sooo helpfull!!!
You can access the proficiency bonus on a 5e character sheet using @{pb}
@@NickOlivo it works great!!! Appreciate it!
That's a fantastic video! thx.
BUT the visual fx doesn't work in my macro! I just copy&paste but it still doesn't work.
Does anyone have the same problem? And maybe a solution?
Doesn't work in mine either: --vfx_opt|@{selected|token_id} @{target|token_id} beam-frost
Hi, here is a challenge for you, I would love it if you could something similar for Magic Missile. Where of course you can split up your targets and damage AND declare a level mod to the spell which in turn adds yet more missiles.
that's jurst 2 more dropdown prompts like the advantage thing. One for the level (and using this value to determine the Number for the Damage-Dice) and the second one for asking how many foes to attack - this will explode your script though, because you will have to add numbers to the @target depending on that choice, forcing you to copy/paste all lines that uses the target-id for all options available and adding one more target each time.
@@MaierFlorian its not that simple actually. If you have five missiles you can in theory hit five targets, or two targets where one target gets two missiles and the second gets three missiles. Or in fact target one gets one missile and target two gets four missiles and any combination between those.
@@chrisg8646 oh, you are right, my mistake. Well, maybe you can make the script something like force the player to click 5 targets (or how many you have depending on the spell slot choice), and every target that is clicked more than once will get hit by the amount of missiles you've clicked. But in fact I think this gets so tedious that it is easier to just let the player say what he/she wants to do and the DM manually changes the hit points accordingly in this case.
@@MaierFlorian the easiest work around would probably be one missile macro and use one at a time regards of level and targets. But I thought I would throw out the challenge. Coz I like Nick's stuff.
I have something planned for next month that I thought would do what you're looking for, but the more I read this, the more I realize this is different. You're right, the easiest way would be a macro that handles one missile/target/damage at a time. Designating different targets would require multiple @{target} actions, like @Florian Maier said.
Amazing. I have increased so much DM capability by watching just a few of your videos. I appreciate the walkthroughs with the coding as well.
I do have a request/challenge. I can't figure out how to do it...
I want to build a powercard script for DMing where regardless of what token I select, I can generically roll "meleeweaponname1", "meleeweaponname2", "rangedweaponname1", along with 1d20 + "meleeattackstat1" + PB. I can click a token, click the macro, and it will pull up the attacks... choose, and it rolls the damage appropriately...
I attempted to make a ?{} to run filling the name, and attack stats based off @{selected|meleeweaponname1} and [[ 1d20 + @{selected|meleeattackstat1} + @{selected|pb}]]... it did not work.
I am very new to coding, would appreciate either a point in the right direction, an answer, or where to find the solution if it already exists...
Thank you!!
You can also create a spell book card that will call all your spells generates a list of all your spells by lev aka !power {{ --whisper|gm|player --name|List Spells --button|Show Spells|!power {{ --name|@{selected|character_name}'s Spells --header|Spell Level --class|spell-list --1st Level Spells|@{selected|repeating_spell-1_$0_spellname}| @{selected|repeating_spell-1_$1_spellname}| @{selected|repeating_spell-1_$2_spellname}| @{selected|repeating_spell-1_$3_spellname}
I cant find Roll20AM????????????????????????
Looks like it's been removed from the one click install section. The creator may be replacing/updating it. It's still available on GitHub gist.github.com/vicberg/6635c77f7f730529ccf83f64819297c0
@@NickOlivo I figured it out thank you!
Your videos are excellent and very helpful. For me the video does not display, the npc qualities summary only prints out the command and a token id, and the initiative tracker does not display the slow countdown.
!power {{
--name|Ray of Frost
--leftsub|Ranged Spell Attack
--rightsub|60 ft Range
--npc_qualities_summary @{target|character_id}
--Attack:|[[ [$Atk] ?{Attack|Standard,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{spell_attack_bonus} ]] vs AC @{target|npc_AC}
--?? $Atk >= @{target|npc_AC} AND $Atk.base 20 ?? Damage:|[[ [$Dmg] 2d8 ]]
--?? $Atk.base == 20 ?? Critical Hit|[[ [$CritDmg] 4d8 ]]
--soundfx|_audio,play,nomenu|freezeRay
--vfx_opt|@{selected|token_id} @{target|token_id} beam-frost
--?? $Atk >= @{target|npc_AC} ?? Slowed:|Target's speed is reduced by 10 ft until start of your next turn
--?? $Atk >= @{target|npc_AC} ?? api_token-mod|_ids @{target|token_id} _ignore-selected _set statusmarkers|tread
--?? $Atk >= @{target|npc_AC} ?? api_act|-1 1 _Slow
--?? $Atk >= @{target|npc_AC} AND $Atk.base 20 ?? alterbar1|_target|@{target|token_id} _bar|1 _amount|-[^Dmg] _show|all
--?? $Atk.base == 20 ?? alterbar2|_target|@{target|token_id} _bar|1 _amount|-[^CritDmg] _show|all
}}
What am I doing wrong?
Have you gotten an answer or have fixed the issue? I'm having the same problem and my code is cut and pasted onto Note ++ before ROLL20's handout.
man, I need to learn to code. I wonder if I could learn without going to school
of course this is possible if you want it. However, learning it by yourself will in most cases lead to hard to maintain code, but if you just want some special small things for your roll20 campaing, this should not be a big problem :)
You totally can. I'm self-taught. :) One of my hopes for this video series is that it'll give folks who've never coded before the confidence to start tinkering. Read everything you can, watch tutorial videos, and tinker. :)
@@NickOlivo I just want to take it beyond value substitution, copying and pasting...and learn syntax! Thanks Nick
Hey there I think your videos are really cool and helpful. Did you ever think about making any for Foundry VTT, it's a really highly customizable virtual tabletop that I think could really use some creators like you covering it.
I really hope roll20 is paying you
Man this macro language is awful... Why on earth it couldn't be just JavaScript I'll never understand...