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

Creating Firball Macro with Power Card API

Hey guys,

I recently got into the Power Card API and I realised it had some really cool functions for adding sounds and effects for my players spells. 
For example, I was using following macro for a Warlock to use his Eldritch Blast.

!power {{

--name|Eldritch Blast

--leftsub|Ranged Spell Attack

--rightsub|120 ft Range

--Attack:|[[ [$Atk] ?{Attack|Standard,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{spell_attack_bonus} 

]] vs AC @{target|AC}

--?? $Atk >= @{target|AC} AND $Atk.base <> 20 ?? Damage:|[[ [$Dmg] 2d10 ]]

--?? $Atk.base == 20 ?? Critical Hit|[[ [$CritDmg] 4d10 ]]

--soundfx|_audio,play,nomenu|blast1

--vfx_opt|@{selected|token_id} @{target|token_id} beam-charm

--?? $Atk >= @{target|AC} AND $Atk.base <> 20 ?? alterbar1|_target|@{target|token_id} _bar|1 _amount|-[^Dmg] _show|all

--?? $Atk >= @{target|AC} AND $Atk.base == 20 ?? alterbar2|_target|@{target|token_id} _bar|1 _amount|-[^CritDmg] _show|all

}}


I was wondering, if it possible to creat something similar for other spells, specifclly for spells that don't target a token. I was hoping to create a macro that lets my wizard cast a fireball. I know how to roll the damage and send me the spell description and even add a sound, but I was wondering if there is a way to let me target a visual effect on the map. So that my wizard can just say he casts fireball, click a point on the map and explosion happens there.

I was also wondering if it is possible to let a token appear with (preferably the same) klick. I would love a template of the fireball appear the moment I select that macro on the point where i clicked, so I can see who would be targeted by the spell. Right now I am using a torch token with an aura of 20 ft. to show the area of the spell. Would love to not have to drag that out every time, but let it just appear when he casts it.

Just know that I am new to APIs and I don't understand most of it yet. :)

June 18 (5 years ago)
David M.
Pro
API Scripter

I'm pretty sure that the only valid target is a token, rather than an untethered point on the map.

However, you might want to check out this very well done tutorial from Nick Olivo:

https://www.youtube.com/watch?v=S_D0QrIE1Zo

He goes through how to create a custom API script to make a Spiritual Weapon token appear (along with a holy energy special effect) adjacent to a token with a single click. Might give you some ideas... 

Thank you so much! That is pretty much excatly what I wanted. 

Now I used Nick Olivio's script to let me create a fireball token with the correct radius so my player can easly place his fireball. And then I am using a power card so he can select this placed token and let the fireball have a sound and visual effect as well as the spell description and damge roll. It is not the cleanest solution but it does the trick! Thanks alot!!!

June 18 (5 years ago)

Edited June 18 (5 years ago)
I spent an incredible time adding scripts and macros, creating Powercards to manage this kind of effect on Roll20 ... And then I went on Foundry VTT: Now when one of my players launches a fireball it automatically create an area of ​​effect (blocked by the walls) which automatically selects the targets, rolls the save die and applies the damage accordingly. Without a single line of code. Easy
June 21 (5 years ago)
Victor B.
Pro
Sheet Author
API Scripter

Use group check and apply damage.  There's no bells and whistles with graphics or sounds, but I can have someone cast a fireball and resolve it in seconds.  Apply damage is an add on to Group Check, and it's great.