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

Power Card Macro Help Inlinereplace

Hello, I have been trying to figure out why this macro has not been evaluating correctly.  The problem is that the attack misses Damage is still being applied or the attack misses and the "Misses!" message is not appearing or the attack hits and no damage is rolled/applied (also the evaluation for the VFX doesnt seem to be working for me). I dont know if I am missing something really simple or if I have hosed this whole thing up or I just dont understand the logic. Here is the macro any thoughts?: !power {{ --replacespell|@{selected|character_id}|Acid Splash --replaceattrs|S-|@{selected|character_id} --inlinereplace|NPCSV|[[?{Confirm Attack|Yes,1d20+@{target|wisdom_mod}|No,30} ]] --charid|@{selected|character_id} --tokenid|@{selected|token_id} --target_list|@{target|token_id} --emote|@{selected|token_name} ^^ attacks ^^ @{target|token_name} --format|spattack --name|~SP-NAME$ --leftsub|Spell Save Attack --rightsub|~SP-RANGE$ --Level:|~SP-LEVEL$ --Casting Time:|~SP-CASTINGTIME$ --Save Needed:|~SP-SAVE$ ~S-SSDC$ --Save Rolled:|~NPCSV$ --?? ~NPCSV$ < ~S-SSDC$ AND ~NPCSV$ <> 1 ?? Damage:|[[ [$Dmg] { [[ [[ {floor((@{selected|level}+1)/6)+1,4}kl1 ]]d6]] } ]] --?? ~NPCSV$ == 1 ?? Critical Hit:|[[ [$CritDmg] { [[ [[ {floor((@{selected|level}+1)/6)+1,4}kl1 ]]d6]] * 2 } ]] --?? ~NPCSV$ >= ~S-SSDC$ ?? Miss:|**@{selected|token_name} Misses!** --?? ~NPCSV$ < ~S-SSDC$ ?? vfx_opt|@{target|token_id} burst-acid --?? ~NPCSV$ < ~S-SSDC$ ?? alterbar1|_target|@{target|token_id} _bar|1 _amount|-[^Dmg] _show|all --?? ~NPCSV$ == 1 ?? alterbar1|_target|@{target|token_id} _bar|1 _amount|-[^CritDmg] _show|all --Description:|~SP-DESCRIPTION$ --Higher Level:|~SP-ATHIGHER$ }}
It seems that the problem is that the inlinereplace ~NPCSV$ seems be recalculated after in each instance.  This is happening in another one of my macros as well, what I am doing wrong here? !power {{ --replacespell|@{selected|character_id}|Eldritch Blast --replaceattrs|S-|@{selected|character_id} --tokenid|@{selected|token_id} --inlinereplace|GDMDmg|[[?{Active GDM|Yes,@{selected|global_damage_mod_roll}|No,0d0} ]]  --emote|@{selected|character_name} attacks with:  --format|spellattack  --name|~SP-NAME$  --leftsub|~SP-SCHOOL$ spell  --rightsub|~SP-RANGE$   --Attack:|[[ [$Atk] ?{Attack|Standard,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{selected|spell_attack_bonus} ]] vs AC @{target|AC} --?? $Atk.base == 1 OR $Atk.total < @{target|AC}?? !Miss:|**@{selected|character_name} Misses!**  --?? $Atk >= @{target|AC} AND $Atk.base <> 20 ?? Damage:|[[ [$Dmg] 1d10+@{selected|charisma_mod} + ~GDMDmg$ ]]  --?? $Atk.base == 20 ?? Critical Hit|[[ [$CritDmg] 2d10+@{selected|charisma_mod} + (~GDMDmg$ * 2) ]]  --vfx_opt|@{selected|token_id} @{target|token_id} beam-magic   --?? $Atk >= @{target|AC} ?? Agonizing Blast:|Charisma Modifier Added To Damage  --?? $Atk >= @{target|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 --?? ~GDMDmg$ <> 0 AND $Atk >= @{target|AC} ?? Modifier Damage:| ~GDMDmg$ @{selected|global_damage_mod_type}  included in damage }}