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

Token-Mod inside Scriptcards

I am coverting some of my class ability macros to Scriptcards, but ran into an issue where I can't get the Token-mod call to pass through to the Target.  Can anyone point out what is wrong with the way to Token-mod line is formatted?   !?{Number of points to Heal|@{selected|class_resource}} !scriptcard  {{   --#title|Lay on Hands   --#sourceToken|@{selected|token_id}   --#targetToken|@{target|Who is Healed|token_id}   --#emoteText|*@{selected|token_name} uses Lay on Hands to heal @{target|Who is Healed|token_name}.* --:VARIABLE DEFINITIONS|   --=Used|?{Number of points to Heal}   --=Available|@{selected|class_resource}   --=Remaining|[$Available] - [$Used] --:USE THE SKILL|   --+Healing Points Used|[$Used]   --+Healing Points Remaining|[$Remaining]   --@modattr|_silent _name @{selected|token_name} _class_resource|-?{Number of points to Heal}   --@token-mod| _ids @{target|Who is Healed|token_id} _set bar1_value|+?{Number of points to Heal}! --X|End Macro }}
1626490144
timmaugh
Pro
API Scripter
You need the --ignore-selected argument to activate the--ids argument. Otherwise it tries to act on the selected token.
Make sure the option "Players can Ids" is turned on.   Calling token-mod from within scriptcards looses the GM flag in the chat message. Use this command to show and set the current configuration setting: !token-mod --help
timmaugh said: You need the --ignore-selected argument to activate the--ids argument. Otherwise it tries to act on the selected token. Changing the line to include the _ignore-selected did not do the trick.  It must be something else preventing it from firing on the target.   --@token-mod| _ignore-selected _ids @{target|Who is Healed|token_id}  _set bar1_value|+?{Number of points to Heal}!
1626529640
timmaugh
Pro
API Scripter
Like Will said, you also have to have the players-can-ids setting set to ON.
Yep.  That was the problem.  I forgot this was a copy of my game for testing and hadn't turn that on in the Test version.  Duh.  Thanks.  All working now.