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

Assistance calling token mod from within PowerCards

Hello I made the following script, but I am having difficulty using the --api_ tag to call Token Mod. My script is as follows: !power {{ --name|Cure Light Wounds         --format|@{selected|character_name} --leftsub| Standard Action --rightsub| Touch Spell --tokenid|@{selected|token_id} --target_list|@{target|token_id} --emote|@{selected|character_name} touches @{target|token_name} and wispers 'Versvesh Bekir Irisv'         --Healing given| [[ [$heal] 1d8 + ( { 5 , @{selected|Level} }kl1) ]]         --api_token-mod|_ids @{target|token_id} _set bar1_value|+[[^heal]] }} When replacing [^heal] with any random dice, the problem still occurs. When I try the following, it works fine: !token-mod {{                --ids @{target|token_id}                  --set bar1_value|+[[1d8]] }} I did wonder whether I might be either using the --api_ tag incorrectly, or if it hasn't been installed correctly e.c. I want to be able to use conditionals inside my script, hence why I wanted to call token mod in the script above. In the above example, I want to make it so that the spell will either heal for 1d8+caster level, or deal damage for the same amount if the target is undead. Thanks in advance for any help anyone can provide ^.^
Hey Andrew,  Let me see if I can help. The one thing that I think is causing your issue is in your last line where you call token-mod, you have double brackets around your Roll ID instead of single brackets. So it should be:          --api_token-mod|_ids @{target|token_id} _set bar1_value|+[^heal]
1598582088

Edited 1598583240
Hi Erik  Thanks for the response. I tried the suggested change, but the problem still persists unfortunately. I also tried disabling all other scripts with the exception of Token Mod and PowerCards, although that didn't solve the problem. I forgot to say in my previous post, I am using the Pathfinder character sheets. I'm unsure whether the --api_ tag only works with 5e character sheets.
Nope, Tokenmod through Powercards works fine with other systems. I use it for PF2 myself.  Are you getting any error messages? Is anything displaying in the chat? Here is what I used based on your code. Obviously, I don't have the appropriate format. :) !power {{     --name|Cure Light Wounds --tokenid|@{selected|token_id}  --target_list|@{target|token_id} --emote|@{selected|character_name} touches @{target|token_name} and whispers 'Versvesh Bekir Irisv'   --Healing given| [[ [$heal] 1d8 + ( { 5 , @{selected|Level} }kl1) ]]   --api_token-mod|_ids @{target|token_id} _set bar1_value|+[^heal] }} Then here is what I see in my chat: 
1598653652

Edited 1598653718
Hi Erik Once again, thanks for the response ^.^ I seem to have solved the problem thanks to your assistance. When you said the script was working fine, I assumed the problem might have either been with the scripts (due to myself not having installed them correctly), or my browser. So, I disabled all other scripts again, and went to adjust the token mod version when I saw the option to allow players to use --ids, which was unselected. I remember reading about needing to allow players to use --ids on the wiki, and thought I had set the 'Player-can-ids' configuaration to on using '!token-mod --configure players-can-ids|on' (but apparently I hadn't).