Changing each actor's max TP

Okay, so to start off, I found this code in RPG_object.js:

Game_BattlerBase.prototype.tpRate = function() {

    return this.tp / 100;
I found that by changing the 100, I could change the max TP every actor can have. However, I want to have it so that each actor has a different max tp.

For example, I want actor 1 to have a maximum of 50 tp while 2 and 3 stay at 100.

And though it's a bit different, is there a kind of script call that could change an actor's tp at will? If just this could be answered, then ignore the above.

Thanks in advance.
That would require a plugin to directly change the actor's tp, and probably the TP rate. it wouldn't be difficult, and could even be done with a script command, but a plugin would be shorter.

For a script command, you can directly set TP by doing something like this (untested):

Code:
$gameParty.members[index you want to use, leader is 0, others go up by 1].tp = value
That would require a plugin to directly change the actor's tp, and probably the TP rate. it wouldn't be difficult, and could even be done with a script command, but a plugin would be shorter.

For a script command, you can directly set TP by doing something like this (untested):

$gameParty.members[index you want to use, leader is 0, others go up by 1].tp = value
I keep getting a typeError. "Cannot set property 'tp' of undefined". I do understand where you are going with this and played around with the code a little, but I can't seem to find what works.
I keep getting a typeError. "Cannot set property 'tp' of undefined". I do understand where you are going with this and played around with the code a little, but I can't seem to find what works.

try $gameParty.battleMembers instead.
try $gameParty.battleMembers instead.
Same error.  😅:   

Original thread: https://forums.rpgmakerweb.com/threads/changing-each-actors-max-tp.46950/