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

Modify attributes with Power Card and Macro

January 16 (4 years ago)

Hello everyone! I'm currently playing as a master with the Interlock system, using the Tony R. Cyberpunk 2020 sheet for characters. I'm trying to make my players use the sheet as little as possible, and I was wondering if I can modify attributes values from a macro/power card. I'm trying to add function from The Aaron's !ammo API in a PowerCard Text, but I cannot make it works. That's what I've tried, and doesn't work:

 !power {{
--name|@{selected|character_name} Status
--leftsub|HP
--rightsub|Condition
--HP:| @{selected|hp}
--?? @{selected|hp} == 40 ?? Condition:|Uninjured !ammo @{selected|character_id} LightlyWounded 0 }}
}}

That's what i'm trying to do: Tony R. Cyberpunk 2020 sheet calculates malus from status condition adding a lot of "wound" attributes to a relate dice roll. For example, Serious condition apply a -2 to Reflex related rolls, but also a -1 to Saving Throw. In the character sheet, as I apply the Serious condition, it modifies the LightlyWounded and SeriousWound  attributes from 0 to 1, the SeriousWound attribute from 0 to 2, and the Wound attribute from 1 to 1.011. Those values relate to the Reflex and Saving Throw stat in their own specific way. What I'm trying to do is relate an HP Attribute assigned to the token to those "wound" attributes, so as a player modifies the HP and click on a STATUS macro/power card, the attributes modifies automatically based on how much HP the character has.

I've tried also to use the !setattr API, with no success.

Is there a solution to my problem?

January 16 (4 years ago)
Andreas J.
Forum Champion
Sheet Author
Translator

You can use other API inside PowerCard commands with https://wiki.roll20.net/PowerCard#Advanced_API_Usage

Your code doesn't seem to use the right syntax for this to work.


The example uses TokenMod, but it should be pretty easy to try using !ammo or ChatSetAttr instead.

--api_token-mod|_ids @{selected|token_id} _ignore-selected _set statusmarkers|blue



January 16 (4 years ago)

Andreas, problem is I want to use a lot of codes, since I have to modify a lot of attributes. Also I need the conditional, since there are breaking points in HP progression for starting determinate conditions. How can I make it work?

January 16 (4 years ago)
Kraynic
Pro
Sheet Author

You might want to take this to the api forum and find the active PowerCards thread.  It gets a fair amount of traffic and then you will know that people actually using that api script will be looking at your post.

January 16 (4 years ago)
ok, thank you so much Kraynic