MZ Using a variable to set max TP in Enhanced TP System plugin

In this plugin: http://www.yanfly.moe/wiki/Enhanced_TP_System_VisuStella_MZ

You have the option to set the maxTP for a mode. I want that maxTP to be a variable (so it can be upgraded).

I have tried to search around and I am sure it is super simple, but I can't figure out quite how to do it.

I tried to use $gameVariables.value(14) and it just zeroed out my TP. I then tried to use

$gameVariables.setValue(14) and got NaN haha.

Is there any javascript formula I can use that will deliver the variable? Or if there is some other way I am supposed to address it.

Thanks!
I tried to use $gameVariables.value(14) and it just zeroed out my TP. I then tried to use
not to sound condescending, but you did set variable 14 beforehand, right? using that function without setting the value beforehand will return a 0

$gameVariables.setValue(14) and got NaN haha.
that function doesnt return a value, it sets one. if you give that to code expecting a value, it wont be able to do anything with it
not to sound condescending, but you did set variable 14 beforehand, right? using that function without setting the value beforehand will return a 0
Yup, at the start of the game I have a common event that plays that sets the variable of that to 100. I also have variables in the skill tree that increase that variable's value. That is what you meant right? Just to make sure there isn't some OTHER thing I need to do to set that variable that I am missing XD (script wise)

that function doesnt return a value, it sets one. if you give that to code expecting a value, it wont be able to do anything with it

Those were just the only two values I was able to find in my search. So I tested both just to see if I was misunderstanding what they do. I wasn't sure if maybe I am supposed to use both in some sort of formula, but I couldn't figure that out.

Basically, if I did it correctly with the first one and that returned nothing, then perhaps its just not allowable in that plugin. I assumed it would be since they tend to let you use javascript. BUT... I just needed to know if I was doing it right. Like maybe I am supposed to do something with an =. But I'm not sure how. Would it be like a.tp = $gameVariables.value(14)?
Like maybe I am supposed to do something with an =. But I'm not sure how. Would it be like a.tp = $gameVariables.value(14)?
Looking at the webpage for the plugin, the example just has "100", so I doubt a equals sign would do anything desirable here.

Id say go back to the first method and test the variable value ingame just to make sure theres no problem there.
Then if that falls through, try changing the Tp mode for the actor and put it back.
The max tp formula is possibly only being ran at specific times, and the first time might be during actor initialization - before that common event runs. It might recalculate for your actor after a mode swap
Looking at the webpage for the plugin, the example just has "100", so I doubt a equals sign would do anything desirable here.

Id say go back to the first method and test the variable value ingame just to make sure theres no problem there.
Then if that falls through, try changing the Tp mode for the actor and put it back.
The max tp formula is possibly only being ran at specific times, and the first time might be during actor initialization - before that common event runs. It might recalculate for your actor after a mode swap
Got it figured out! Thanks!

Original thread: https://forums.rpgmakerweb.com/threads/using-a-variable-to-set-max-tp-in-enhanced-tp-system-plugin.169576/