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

Trying to add to my PowerCard Magic Missile Script

Hey everyone, I have been trying to figure out how I can get my current version of magic missile in PowerCards to see that it can choose from higher levels spell slots, as well as remove the spell slot of that level from the players 5e character sheet. The Code that I am using right now is this: !power {{ --?? [[@{selected|lvl1_slots_expended}]] == 0 ?? skipto|EndOfCard --api_setattr|_silent _name @{selected|character_name} _modb _lvl1_slots_expended|-1 --titlefontshadow|none --format|Conditions --corners|10 --name|Magic Missle --leftsub|Ranged Spell Attack --rightsub|120 ft Range --emote|@{selected|character_name} cast a spell at --charid|@{selected|character_id} --target_list|@{target|token_id} --Stats :| **Evocation** | **1 Action** | **Target** --npc_qualities_summary|@{selected|character_id} --Projectile 1 :|[[ [$Dmg1] 1d4+1 ]] versus @{target|1 Target|token_name} --Projectile 2 :|[[ [$Dmg2] 1d4+1 ]] versus @{target|2 Target|token_name} --Projectile 3 :|[[ [$Dmg3] 1d4+1 ]] versus @{target|3 Target|token_name} --alterbar1|_target|@{target|1 Target|token_id} _bar|1 _amount|-[^Dmg1] _show|all --alterbar2|_target|@{target|2 Target|token_id} _bar|1 _amount|-[^Dmg2] _show|all --alterbar3|_target|@{target|3 Target|token_id} _bar|1 _amount|-[^Dmg3] _show|all --Description :|^*You create three glowing blue magic force darts. Each dart hits a creature of your choice that you can see and within the spell's range. Each projectile deals 1d4 + 1 force damage to its target. The darts hit simultaneously, and can hit one or more creatures.^^ At higher levels. When you cast this spell using a spell slot of 2nd level or higher, it creates an additional dart for each slot level above 1st level. --:EndOfCard| --?? [[@{selected|lvl1_slots_expended}]] == 0 ?? |You have no more slots of this level. }} This is what It looks like right now:  Any advise would be greatly apricated. Ive just started learning PowerCards over the weekend and its been a fast crash course.
1670914018
Andrew R.
Pro
Sheet Author
If you've just started with PowerCards I recommend you switch to ScriptCards, which is actively developed and not just in maintenance. I converted all my 13th Age PowerCards macros to ScriptCards easily. 
1670934318
David M.
Pro
API Scripter
I'd second Andrew's suggestion, since you're probably not too  invested in Powercards yet. Here's an example of a basic magic missile macro using Scriptcards. This one doesn't apply damage, but there are a few different ways to do so either by calling alterbars, tokenMod, or directly changing the token bars. There are lots of examples of that on the wiki. Oh wait, I just remembered there is a "bells and whistles" 5e magic missile example in Kurt's github repo here . Some stuff you may or may not want to keep, including playing jukebox sfx tracks and adding line fx. This example auto applies the damage, including accounting for resistances & vulnerabilities.
Thanks, Ill give scripcards a look at