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 AoE spells using powercards

Good afternoon,

I was wondering if anyone had advice on how to use powercards for spells such as Moonbeam and Fireball and such. Anything that causes an AoE the same way that we can build them using sound and vfx for ranged spells such as Ray of frost. Any help would be appreciated. Thanks.

November 01 (1 year ago)

Edited November 01 (1 year ago)

I wouldn't use PowerCards.  Instead look at ScriptCards (PowerCards replacement) and SmartAOE. 

November 01 (1 year ago)
Andrew R.
Pro
Sheet Author

Yes, because ScriptCards is being actively developed, not just maintained, and by the same person. It has many things that PowerCards will never do. 

November 02 (1 year ago)

I am actually working on a ScriptCard to handle this sort of thing without SmartAOE to see if it can all be done within ScriptCards but it's still very rough.

I'll add it below just in case anyone might find some value in it while it's still in a rough spot. The example below is for Entangle, which will summon a template token next to the caster and then ScriptCard re-entry button to click when the caster has placed the template. The below script uses a library function to determine the overlap but Kurt J has put an improved function in his System Neutral ScriptCard library. When the button is clicked the script determines which tokens are inside the area and will whisper to the DM a list of tokens in the area with buttons to roll saves individually or a single button to roll them all at once. This will also provide buttons to apply token markers for the condition if the save isn't successful and has a variable to auto-apply the condition marker.

There are a lot of improvements still to be made, I want to grab all the information from the spell attributes so that this can be made more universally, for one thing. The below example is for AoE invoke condition so I'll also need to work on the damage AoE spells like Fireball. Hopefully those are more straightforward since the spellattributes for the damage spells have most of that information populated where the condition spells like Entangle, Fairie Fire, or Hypnotic Pattern only really have that in the descriptions.

Anyway, like I said this isn't a completed and ready to go ScriptCard but perhaps it can give you some ideas and you can steal a couple things for your own use.

!scriptcard {{
    +++dnd5elib;tokenActions;5eConditions+++
    --#title|Spell Template Test
    --#nominmaxhighlight|1

    --/|Variables to set
    --&persistTemplate|false
    --&saveType|Str
    --&Condition|Restrained
    --&rollAdvantage|true
    --&autoApplyCondition|false
    --&displayRolls|true

    --&TID|@{selected|token_id}
    --#sourceToken|[&TID]
    --&CharID|[*S:character_id]

    --&FeatureName|Entangle
    --/|SummonTemplate
    --@forselected|Spawn _offset|2,0 _name|[&FeatureName] _size|4,4 _order|toBack

    --#reentrant|[&FeatureName][&CharID]
    --#whisper|self
    --+|[rbutton]Template Placed::ExecTemplate;[&FeatureName][/rbutton]

    --:Done|

    --X|

    --:ExecTemplate|FeatureName
        --#hidecard|1
        -->GetTokenIDbyCharacterName|[&FeatureName];TemplateTID
        --?"[&TemplateTID]" -eq "NotFoundError"|[
            --*ERROR|Could not find a token for [&FeatureName]
            -->Done|
        --]|
        --~ExecTNum|array;pagetokens;execTArr;[*C:playerpageid];char
        --&TokensInAreaList|
        --%tcheck|foreach;execTArr
            --?"[&tcheck]" -eq "[&TemplateTID]"|%
            -->DoTokensOverlap|[&tcheck];[&TemplateTID];execOverlapVar
            --?"[&execOverlapVar]" -eq "true"|[
                --?"X[&TokensInAreaList]" -ne "X"|&TokensInAreaList;[&TokensInAreaList],
                --&TokensInAreaList|[&TokensInAreaList][&tcheck]
                --*[*[&tcheck]:t-name]|[r][rbutton][&saveType] Save::RollSave;[&tcheck]%[&saveType]%[*S:spell_save_dc][/rbutton] [rbutton]Ping::PingToken;[&tcheck][/rbutton][/r]
            --]|
        --%|
        --*All tokens|[rbutton][&saveType] Saves::RollForAll;[&TokensInAreaList][/rbutton]
        --?"[&persistTemplate]" -ne "true"|[
            --@tclean|_id [&TemplateTID]
        --]|
    --<|

    --X|

    --:PingToken|TargetTokenID
        --#hidecard|1
        --vtoken|[&reentryval] ping

        --/|Added Done here cause for some reason there was a weird interaction with immune creatures
        --/|where Ping would then roll and display the roll results if clicked after their individual roll
        -->Done|
    --<|

    --X|

    --:RollForAll|
        --#hidecard|1
        --~|array;fromstring;rsAllArr;,;[&reentryval]
        --*[&Condition] Save DC|[roll][*S:spell_save_dc][/roll]
        --%rAllID|foreach;rsAllArr
            -->RollSave|[&rAllID]%[&saveType]%[*S:spell_save_dc]
        --%|
        --*[&Condition] Description|[br][c][rbutton:Show Players Condition Description]Show Desc::ShowConditionDescription;[&Condition]%0[/rbutton] [rbutton:Whisper to GM Condition Description]Whisper Desc::ShowConditionDescription;[&Condition]%1[/rbutton][/c]
    --<|

    --X|

    --:RollSave|
        --#hidecard|1
        --?"X[%1%]" -eq "X"|¶ms;[&reentryval]|¶ms;[%1%]
        --~rollSaveParam|string;split;%;[¶ms]
        --&rsTID|[&rollSaveParam1]
        --&rsSaveType|[&rollSaveParam2]
        --?"[&rsSaveType]" -eq "Str"|&rsAbilityName;strength
        --?"[&rsSaveType]" -eq "Dex"|&rsAbilityName;dexterity
        --?"[&rsSaveType]" -eq "Con"|&rsAbilityName;constitution
        --?"[&rsSaveType]" -eq "Wis"|&rsAbilityName;wisdom
        --?"[&rsSaveType]" -eq "Int"|&rsAbilityName;intelligence
        --?"[&rsSaveType]" -eq "Cha"|&rsAbilityName;charisma
        --&rsSaveDC|[&rollSaveParam3]

        --?"[&Condition]X" -ne "X"|>CheckConditionImmunity;[&rsTID];CondImmune
        --?"[&CondImmune]" -eq "true"|[
            --*[*[&rsTID]:t-name]|is [b]immune[/b] to [&Condition]. Skipping save rolls
            --<|Returns if called via RollForAll
            -->Done|
        --]|

        --?"[*[&rsTID]:npc]" -eq 1|[
            --~rsMods|math;max;[*[&rsTID]:npc_[&rsSaveType(tolowercase)]_save];[*[&rsTID]:[&rsAbilityName]_save_bonus]
            --=rsRoll|1d20 + [$rsMods] [MOD]
            --?"[&rollAdvantage]" -eq "true"|=rsAdvRoll;1d20 + [$rsMods]
        --]|[
            -->Lib5E_Active_Global_Save_Modifiers|[*[&rsTID]:t-represents];rsGSM
            --=rsRoll|1d20 + [*[&rsTID]:[&rsAbilityName]_save_bonus] [MOD] [&rsGSM]
            --?"[&rollAdvantage]" -eq "true"|=rsAdvRoll;1d20 + [*[&rsTID]:[&rsAbilityName]_save_bonus] [MOD] [&rsGSM]
        --]|

        --?"[&displayRolls]" -eq "true" -and "X[%1%]" -eq "X"|*[&Condition] Save DC;[roll][&rsSaveDC][/roll]

        --?"[&displayRolls]" -eq "true"|[
            --*[*[&rsTID]:t-name]|Roll [$rsRoll] Adv/Dis [$rsAdvRoll]
        --]|

        --?[$rsRoll.Total] -ge [&rsSaveDC]|[
            --&rsResult|succeeded
            --?"[&rollAdvantage]" -eq "true" -and [$rsAdvRoll.Total] -lt [&rsSaveDC]|&rsResult;succeededmixed
        --]|[
            --&rsResult|failed
            --?"[&rollAdvantage]" -eq "true" -and [$rsAdvRoll.Total] -ge [&rsSaveDC]|&rsResult;failedmixed
        --]|

        --&msg|[b]Result: [&rsResult][/b]

        --?"[&autoApplyCondition]" -eq "true"|[
            --?"[&rsResult]" -eq "failed" -or "[&rsResult]" -eq "failedmixed"|&msg;[&msg][br]Auto-Applied [&Condition] per settings.
            --#parameterdelimiter|$$$
            --?"[&rsResult]" -eq "failed" -or "[&rsResult]" -eq "failedmixed"|&msg$$$[&msg] [r][rbutton]Remove [&Condition]::RemoveConditionMarker;[&Condition]%[&rsTID][/rbutton][/r]
            --#parameterdelimiter|;
            --?"[&rsResult]" -eq "failed" -or "[&rsResult]" -eq "failedmixed"|>Lib5eCond_AddConditionMarker;[&Condition];[&rsTID]
        --]|[
            --&msg|[&msg] [r][rbutton]Apply [&Condition]::AddConditionMarker;[&Condition]%[&rsTID][/rbutton][/r]
        --]|

        --*[*[&rsTID]:t-name]|[&msg]
        --?"X[%1%]" -eq "X"|*[&Condition] Description;[br][c][rbutton:Show Players Condition Description]Show Desc::ShowConditionDescription;[&Condition]%0[/rbutton] [rbutton:Whisper to GM Condition Description]Whisper Desc::ShowConditionDescription;[&Condition]%1[/rbutton][/c]
    --<|

    --X|

    --:CheckConditionImmunity|TokenID;StringVariableToSet
        --&CondImmuneTemp|false
        --?"[*[%1%]:npc]" -eq 1|[
            --?"[*[&rsTID]:npc_condition_immunities]" -inc "[&Condition(tolowercase)]"|&CondImmuneTemp;true
        --]|[
            --?"[*[&rsTID]:[&Condition(tolowercase)]_immunity]" -eq "1"|&CondImmuneTemp;true
        --]|
        --&[%2%]|[&CondImmuneTemp]
    --<|

    --X|

    --:AddConditionMarker|Condition;TokenID
        --~AddCondParams|string;split;%;[&reentryval]
        -->Lib5eCond_AddConditionMarker|[&AddCondParams1];[&AddCondParams2]
    --<|

    --X|

    --:RemoveConditionMarker|Condition;TokenID
        --~RemoveCondParams|string;split;%;[&reentryval]
        -->Lib5eCond_RemoveCondition|[&RemoveCondParams1];[&RemoveCondParams2]
    --<|

    --X|

    --:ShowConditionDescription|Condition;WhisperSetting
        --~ShowParams|string;split;%;[&reentryval]
        -->Lib5eCond_GetConditionDescription|[&ShowParams1];CondDesc
        --?"[&ShowParams2]" -eq 0|[
            --#hidecard|0
            --#whisper|0
            --#title|Condition Description
            --#emoteText|[&Condition]
            --+[&ShowParams1]|[&CondDesc]
        --]|[
            --#hidecard|1
            --*[&ShowParams1]|[&CondDesc]
        --]|
    --<|
    
    --X|

}}

Thanks for all the help, I am still very new to using the API scripts in roll20 so I am sure that it is going to take some time to learn and work out the kinks but I will take a look into scriptcards and SmartAOE as you all have suggested. Thanks again.