the title might be a bit misleading but i couldnt find a way to phrase it better with a pretty broad problem like that
So essentially im using visustella mz with their tooltips plug in
I have set up a stackable damage overtime state through JS code in notetags that declares a local variable on the target of the state and adds to the variable each time the state is applied, this variable is then used for the slip damage formula
the variable value is also reduced by one every turn and the state is removed from the target if the stack is <1 but this part is not really relevant
here is the code for it as it might be important for understanding the issue im having
So this is all great and works exactly the way i want it to however, i want to display the amount of stacks any given target with this state has through State Tooltips plug in from visustella like this:
here im just storing the local variable value into a game variable which im then pulling in the tooltip text through a textcode, its just a make shift solution that works only if there is 1 target affected by it and thats the problem
because the text of the tooltip is determained in the notetags of this single particular state and i need it to somehow display different unique information for different targets affected with this same state
i didnt find a way for it to display local variables directly so i went and set up my own textcode \BurnStacks in visustella MessageCore plug in that would use JS code to determain the value that is displayed when this textcode is called
im not very experienced with JS so heres where i kinda ran into a dead end
What kind of JS code can i use to get the value from local variables on each enemy into the text of a tooltip so that when you hover over diffent enemies it would display their individual amount of burn stacks?
it makes sense to me to potentially through troop event, set up an array dedicated to burn stacks into which the state would be able to store the local variable value from each enemy which the could be accessed by the script of the textcode
but i kinda have no clue how to tell it to pull a particular index depending on the target you are HOVERING over
im prepared for there to just not be a real solution to this, and am completely open to it if you have ideas on how to achieve this type of effect through different means
this is a pretty big post, so even if you dont have much help to offer, thanks a lot for taking the time to read it
So essentially im using visustella mz with their tooltips plug in
I have set up a stackable damage overtime state through JS code in notetags that declares a local variable on the target of the state and adds to the variable each time the state is applied, this variable is then used for the slip damage formula
the variable value is also reduced by one every turn and the state is removed from the target if the stack is <1 but this part is not really relevant
here is the code for it as it might be important for understanding the issue im having
Code:
<JS On Add State>
target.BurnStack ??= 0;
target.BurnStack += $gameVariables.value(2);
$gameVariables.setValue(1, target.BurnStack);
</JS On Add State>
<JS HP Slip Damage>
damage = Math.floor(b.BurnStack);
</JS HP Slip Damage>
<JS Post-Regenerate>
target.BurnStack --;
$gameVariables.setValue(1, target.BurnStack);
if (target.BurnStack < 1) {
target.removeState (455);
}
</JS Post-Regenerate>
<JS Slip Refresh>
So this is all great and works exactly the way i want it to however, i want to display the amount of stacks any given target with this state has through State Tooltips plug in from visustella like this:
here im just storing the local variable value into a game variable which im then pulling in the tooltip text through a textcode, its just a make shift solution that works only if there is 1 target affected by it and thats the problem
because the text of the tooltip is determained in the notetags of this single particular state and i need it to somehow display different unique information for different targets affected with this same state
i didnt find a way for it to display local variables directly so i went and set up my own textcode \BurnStacks in visustella MessageCore plug in that would use JS code to determain the value that is displayed when this textcode is called
im not very experienced with JS so heres where i kinda ran into a dead end
What kind of JS code can i use to get the value from local variables on each enemy into the text of a tooltip so that when you hover over diffent enemies it would display their individual amount of burn stacks?
it makes sense to me to potentially through troop event, set up an array dedicated to burn stacks into which the state would be able to store the local variable value from each enemy which the could be accessed by the script of the textcode
but i kinda have no clue how to tell it to pull a particular index depending on the target you are HOVERING over
im prepared for there to just not be a real solution to this, and am completely open to it if you have ideas on how to achieve this type of effect through different means
this is a pretty big post, so even if you dont have much help to offer, thanks a lot for taking the time to read it