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

Yet more powercards help please :) Token Mod Usage

Me again :) Can't get the token mod api to work within a powercard (red lines below) everything else works. Please tell me what I'm doing wrong! Many thanks in advance. John !power {{   --name|@{character_name} casts Hold Person   --leftsub|2nd Level Enchantment^^Range: 60ft   --soundfx|_audio,play,nomenu|Hold Person   --Wisdom Save:|[[ [$sav] 1d20 + @{target|wisdom_save_bonus} ]] vs DC @{selected|spell_save_dc}   --?? $sav >= @{selected|spell_save_dc} ?? !Saved:|@{target|npc_name} overcomes the spell!   --?? $sav < @{selected|spell_save_dc} ?? !Success:|@{target|npc_name} is Held!   --?? $sav < @{selected|spell_save_dc} ?? api_token-mod| _ids @{target|token_id} _ignore-selected _set statusmarkers|dd-condition-paralyzed   --?? $sav < @{selected|spell_save_dc} ?? !concentration:|@{selected|character_name} is concentrating.   --?? $sav < @{selected|spell_save_dc} ?? api_token-mod| _ids @{selected|token_id} _set statusmarkers|blue }} !modattr --charid @{selected|character_id} --lvl2_slots_expended|-1 --silent 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;}
1615895766
The Aaron
Roll20 Production Team
API Scripter
Does it work for you but not for players? If so, turn on players can ids in the help. 
That made the @selected one work but not the target one. I think that is probably because it doesn't like spaces in the token marker names and I can fix that so thank you :)
Hey John,&nbsp; In PowerCards, the tags have to be unique so you can't have just api_token-mod twice. You will need to append a same name tag modifier ( <a href="https://wiki.roll20.net/Script:PowerCards#Tag_Modifiers" rel="nofollow">https://wiki.roll20.net/Script:PowerCards#Tag_Modifiers</a> ) for both to work, else the card just processes the last one.&nbsp; Try this: &nbsp;&nbsp;--?? $sav &lt; @{selected|spell_save_dc} ?? api_token-mod *1 | _ids @{target|token_id} _ignore-selected _set statusmarkers|dd-condition-paralyzed &nbsp;&nbsp;--?? $sav &lt; @{selected|spell_save_dc} ?? !concentration:|@{selected|character_name} is concentrating. &nbsp;&nbsp;--?? $sav &lt; @{selected|spell_save_dc} ?? api_token-mod *2 | _ids @{selected|token_id} _set statusmarkers|blue