I am a Newbie as far as using API scripts are concerned.
Here is what I am trying to accomplish.
One of my players wants to play a Banner / Hulk type
character in D&D 5e Storm Kings Thunder. The idea is to use two different
tokens that are connected to their own independent character sheets. The Banner
type is set up as an artificer. The Hulk is set up as a Barbarian
The rules around changing from one character to the other is
the topic.
When the Hulk character is in battle, every time he gets hit
by a critical hit he has to make a wisdom saving throw versus a DC, that decrements
by 2 every time he gets hit with a crit. The idea is that starting off in a
battle his chances of NOT changing back to his other character are really good,
but as the battle goes on, every time the Hulk gets hit by a crit it becomes
easier for him to revert back.
The simplest solution to this would be to create a custom
variable in the character sheet for persisting the DC value. Then have one
macro to reset the DC (whenever the Hulk appears) and another macro to
decrement the DC field while the Hulk is in battle.
The solution does not need to be event driven based on the
roll of critical hits. I am fine with triggering this with a macro manually.
My thought is if I can figure out how to handle the
transformation from the Hulk back to Banner, that I would be able to figure out
myself how to handle the transformation from Banner to the Hulk in a similar
fashion.
The main goal is to not have to keep track of the DC
manually on paper during a battle everytime it changes for a crit against the
Hulk.
Is there a particular API that I would need to activate in
order to be able to update a variable on a character sheet or is there a different
way to accomplish this?
If there is not an existing API that would enable this, does
anyone have an API snipet that would enable the updating of a custom variable on
the character sheet?