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

Is there a way to subtract an amount from an attribute when a checkbox in the character sheet is clicked?

I am making a character sheet for a game and there is this system called XP and ideally I would want some way so when a player clicks on check boxes i have set up in the character sheet, some amount will be subtracted from the XP attribute. I looked just to have this be something on the sheet itself or a macro but it seems this can only be done with api scripts. if you have some way i can do it without the API that would be the best, but all help is appriciated
1510428208
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
If the interaction is only on the sheet, then you can do it with sheetworkers.
1510470109
vÍnce
Pro
Sheet Author
Seems like you could use a radio with various values that could subtract from another attribute.  basic example -10:<input name="attr_xp-pen" type="radio" value="10"> -20:<input name="attr_xp-pen" type="radio" value="20"> -30:<input name="attr_xp-pen" type="radio" value="30"> <br> XP:<input name="attr_xp" type="text" value="0"> Current XP:<input name="attr_xp-current" value="(@{xp}-@{xp-pen})" disabled>