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

Powercards Help (Again!) Toll the Dead

I am trying to make a powercard for Toll the Dead. It doesn't work yet but I think I'm getting close. Here's the outline: !power {{   --name|Toll the Dead   --leftsub|Necromancy Cantrip   --rightsub|Range:60ft   --soundfx|_audio,play,nomenu|Bell   --Wisdom Save:|[[ [$sav] 1d20 + @{target|wisdom_save_bonus} ]] vs Spell Save DC @{selected|spell_save_dc}   --?? $sav >= @{selected|spell_save_dc} ?? Wisdom Save Successful!   --?? $sav < @{selected|spell_save_dc} ?? AND @{target|bar1} < @{target|bar1|max} ?? [[ [$dmg1] 1d12 ]]   --?? $sav < @{selected|spell_save_dc} ?? AND @{target|bar1} == @{target|bar1|max} ?? [[ [$dmg1] 1d8 ]]   --alterbar1|_target|@{target| token_id} _bar|1 _amount|-[^dmg1] _show|all }} I think I need to substitute the pipe in bar1|max for something else but underscore doesn't work. I may be wrong in trying to use two different conditional statements to differently define the same variable string ($dmg) Can anyone help me to correct it, please? Many thanks in advance. John Normal 0 false false false EN-GB X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri",sans-serif; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;}
1615052038

Edited 1615054544
I added a couple of different Gifs depending on the damage outcome. Pet Justice! Lol !power {{ &nbsp; --name|Toll the Dead --hroll|[[ [$dmg1] 1d12 ]] [[ [$dmg2] 1d8 ]] &nbsp; --tokenid|@{selected|token_id} &nbsp; --targetlist|@target|token_id} &nbsp; --leftsub|Necromancy Cantrip &nbsp; --rightsub|Range:60ft &nbsp; --soundfx|_audio,play,nomenu|Bell &nbsp; --Wisdom Save:|@{target|character_name} makes a Wisdom Saving Throw of [[ [$sav] 1d20 + @{target|wisdom_save_bonus} ]] vs @{selected|character_name}'s Spell Save DC @{selected|spell_save_dc} &nbsp; --?? $sav.total &gt; @{selected|spell_save_dc} ?? !miss|The spell fails. &nbsp; --?? $sav.total &lt;= @{selected|spell_save_dc} AND @{target|bar1} &lt;&gt; @{target|bar1|max} ?? !Damage Roll|@{target|character_name} takes [^dmg1] damage! --?? $sav.total &lt;= @{selected|spell_save_dc} AND @{target|bar1} &lt;&gt; @{target|bar1|max} ?? --alterbar*1|_target|@{target| token_id} _bar|1 _amount|-[^dmg1] _show|all &nbsp; --?? $sav.total &lt;= @{selected|spell_save_dc} AND @{target|bar1} &lt;&gt; @{target|bar1|max} ?? !image|[x]( <a href="https://www.google.com/search?q=bell+toll+gif&amp;client=firefox-b-1-m&amp;sxsrf=ALeKk02eDUi-1FXJeQwz2RYyg72hQYkRoA:1615054105152&amp;source=lnms&amp;tbm=isch&amp;sa=X&amp;ved=0ahUKEwjdv-uxoZzvAhUPElkFHUb6CR8Q_AUIBigB&amp;biw=360&amp;bih=612#&amp;biw=360&amp;bih=612" rel="nofollow">https://www.google.com/search?q=bell+toll+gif&amp;client=firefox-b-1-m&amp;sxsrf=ALeKk02eDUi-1FXJeQwz2RYyg72hQYkRoA:1615054105152&amp;source=lnms&amp;tbm=isch&amp;sa=X&amp;ved=0ahUKEwjdv-uxoZzvAhUPElkFHUb6CR8Q_AUIBigB&amp;biw=360&amp;bih=612#&amp;biw=360&amp;bih=612</a> ) &nbsp; --?? $sav.total &lt;= @{selected|spell_save_dc} AND @{target|bar1} == @{target|bar1|max} ?? !Damage Roll*2|@{target|character_name} takes [^dmg2] damage! --?? $sav.total &lt;= @{selected|spell_save_dc} AND @{target|bar1} == @{target|bar1|max} ?? --alterbar*1|_target|@{target| token_id} _bar|1 _amount|-[^dmg2] _show|all &nbsp; --?? $sav.total &lt;= @{selected|spell_save_dc} AND @{target|bar1} == @{target|bar1|max} ?? !Image2|[x]( <a href="https://www.google.com/search?q=bell+toll+gif&amp;client=firefox-b-1-m&amp;sxsrf=ALeKk02eDUi-1FXJeQwz2RYyg72hQYkRoA:1615054105152&amp;source=lnms&amp;tbm=isch&amp;sa=X&amp;ved=0ahUKEwjdv-uxoZzvAhUPElkFHUb6CR8Q_AUIBigB&amp;biw=360&amp;bih=612#&amp;biw=360&amp;bih=612" rel="nofollow">https://www.google.com/search?q=bell+toll+gif&amp;client=firefox-b-1-m&amp;sxsrf=ALeKk02eDUi-1FXJeQwz2RYyg72hQYkRoA:1615054105152&amp;source=lnms&amp;tbm=isch&amp;sa=X&amp;ved=0ahUKEwjdv-uxoZzvAhUPElkFHUb6CR8Q_AUIBigB&amp;biw=360&amp;bih=612#&amp;biw=360&amp;bih=612</a> ) &nbsp;}} I made an error and amended it, edit. I don't use alterbars, so you may want to reference the powercards wiki for the correct API tag &gt; Advanced API Usage Section
&nbsp; You are using alterbar1 twice instead of alterbar1 and alterbar2. You are also using $dmg1 twice instead of $dmg1 and $dmg2. Essentially they are overwriting the earlier versions. Use the four lines below to replace the final three lines of your script. Also you didn't have conditionals on your alterbar command line so it was being enforced regardless of saves.&nbsp; --?? $sav &lt; @{selected|spell_save_dc} ?? AND @{target|bar1} &lt; @{target|bar1|max} ?? [[ [$dmg1] 1d12 ]] --?? $sav &lt; @{selected|spell_save_dc} ?? AND @{target|bar1} == @{target|bar1|max} ?? [[ [$dmg2] 1d8 ]] --?? $sav &lt; @{selected|spell_save_dc} ?? AND @{target|bar1} &lt; @{target|bar1|max} ?? alterbar1|_target|@{target| token_id} _bar|1 _amount|-[^dmg1] _show|all --?? $sav &lt; @{selected|spell_save_dc} ?? AND @{target|bar1} == @{target|bar1|max} ?? alterbar2|_target|@{target| token_id} _bar|1 _amount|-[^dmg2] _show|all
Thank you for the input guys. One step closer I think. Peacekeeper - I thought perhaps I might need separate damage strings, in fact I did in the original draft so, it's helpful to confirm. Kyle - Yours is much more elaborate than mine :) I can't get either of these to work becuase the pipe symbol in "bar1|max" makes powercards look for a second target called bar1. (I learned that this happens when I made a powercard to allow you to target different tokens with each missile in my magic missile powercard) The only way to make this work is to find a substitue for the pipe symbol so that powercards will still recognise what value I'm directing it to. I'll post the final powercard here if I can crack that last piece of the puzzle.
This powercard works with substitute values I added to the character sheet (after I fixed all the stupid syntax errors I had put into it!!) The only problem is the names of the attributes interfering with powercards... !power {{ &nbsp; --name|Toll the Dead &nbsp; --leftsub|Necromancy Cantrip &nbsp; --rightsub|Range:60ft &nbsp; --soundfx|_audio,play,nomenu|Bell &nbsp; --Wisdom Save:|[[ [$sav] 1d20 + @{target|wisdom_save_bonus} ]] vs Spell Save DC @{selected|spell_save_dc} &nbsp; --?? $sav.total &gt;= @{selected|spell_save_dc} ?? |Wisdom Save Successful! &nbsp; --?? $sav.total &lt; @{selected|spell_save_dc} AND @{target|HPTEST1} &lt; @{target|HPTEST2} ?? Damage:|[[ [$dmg1] 1d12 ]] Necrotic &nbsp; --?? $sav.total &lt; @{selected|spell_save_dc} AND @{target|HPTEST1} == @{target|HPTEST2} ?? Damage:|[[ [$dmg2] 1d8 ]] Necrotic &nbsp; --?? $sav.total &lt; @{selected|spell_save_dc} AND @{target|HPTEST1} &lt; @{target|HPTEST2} ?? alterbar1|_target|@{target|token_id} _bar|1 _amount|-[^dmg1] _show|all &nbsp; --?? $sav.total &lt; @{selected|spell_save_dc} AND @{target|HPTEST1} == @{target|HPTEST2} ?? alterbar2|_target|@{target|token_id} _bar|1 _amount|-[^dmg2] _show|all }} Normal 0 false false false EN-GB X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri",sans-serif; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;}
Finally worked it out :) Now I can try out some of Kyle's embelishments :) !power {{ &nbsp; --name|Toll the Dead &nbsp; --leftsub|Necromancy Cantrip &nbsp; --rightsub|Range:60ft &nbsp; --soundfx|_audio,play,nomenu|Bell &nbsp; --Wisdom Save:|[[ [$sav] 1d20 + @{target|target1|wisdom_save_bonus} ]] vs Spell Save DC @{selected|spell_save_dc} &nbsp; --?? $sav.total &gt;= @{selected|spell_save_dc} ?? |Wisdom Save Successful! &nbsp; --?? $sav.total &lt; @{selected|spell_save_dc} AND @{target|target1|bar1} &lt; @{target|target1|bar1|max} ?? Damage:|[[ [$dmg1] 1d12 ]] Necrotic &nbsp; --?? $sav.total &lt; @{selected|spell_save_dc} AND @{target|target1|bar1} == @{target|target1|bar1|max} ?? Damage:|[[ [$dmg2] 1d8 ]] Necrotic &nbsp; --?? $sav.total &lt; @{selected|spell_save_dc} AND @{target|target1|bar1} &lt; @{target|target1|bar1|max} ?? alterbar1|_target|@{target|target1|token_id} _bar|1 _amount|-[^dmg1] _show|all &nbsp; --?? $sav.total &lt; @{selected|spell_save_dc} AND @{target|target1|bar1} == @{target|target1|bar1|max} ?? alterbar2|_target|@{target|target1|token_id} _bar|1 _amount|-[^dmg2] _show|all }} Normal 0 false false false EN-GB X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri",sans-serif; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;}