This one is meant to transform how TP functions, specifically (in order of appearance in my code):
All Actors in the Party sharing the same TP value at all times;
Being able to change the Max TP through a variable;
Making the TP bar adjust to the new Max TP;
Being able to adjust the initial TP equation;
Turn on or off the TP charge rate;
However, my game (no other plugins on) does not recognize any of the changes I made.
Help? :D
Spoiler
Code:
//=============================================================================// TDW_TP_Changes.js//=============================================================================/*: * @plugindesc Makes some minor changes to how TP works. * @author Tyler Wright * * @param Max TP Variable ID * @desc The ID of the variable for storing the max TP you wish to have. Set to 0 to keep at default. * @default 0 * * @param Actors Share TP * @desc Should all Actors share the same TP? * NO - false YES - true * @default false * * @param TP Gain on Damage * @desc Should Actors gain TP when damage is taken? * NO - false YES - true * @default true * * @param Initial TP Equation * @desc Actors start battle with TP equal to this equation. Default: Math.randomInt(25) * @default Math.randomInt(25) * * @help This plugin does not provide plugin commands. */ (function() { var parameters = PluginManager.parameters('TDW_TP_Changes'); var variableId = Number(parameters['Max TP Variable ID'] || 0); var shareTP = String(parameters['Actors Share TP'] || 'false'); var chargeTP = String(parameters['TP Gain on Damage'] || 'true'); var initialTPEqn = Number(parameters['Initial TP Equation'] || 'Math.randomInt(25)'); //Shared TP var _Game_BattlerBase_setTp = Game_BattlerBase.prototype.setTp; Game_BattlerBase.prototype.setTp = function(tp) { _Game_BattlerBase_setTp.call(this, tp); if (eval(shareTP) && this.isActor()){ for (actor in $gameParty[]){ actor._tp = tp; actor.refresh(); } }else{ this._tp = tp; this.refresh(); } }; //TP Max Alterations var _Game_BattlerBase_maxTp = Game_BattlerBase.prototype.maxTp; Game_BattlerBase.prototype.maxTp = function() { _Game_BattlerBase_maxTp.call(this); if ($gameVariables.value(variableId).isInteger() && $gameVariables.value(variableId)!= 0){ return $gameVariables.value(variableID); }else{ return 100; } }; //TP Bar Rate Alterations var _Game_BattlerBase_tpRate = Game_BattlerBase.prototype.tpRate; Game_BattlerBase.prototype.tpRate = function() { _Game_BattlerBase_tpRate.call(this); if ($gameVariables.value(variableId).isInteger() && $gameVariables.value(variableId)!= 0){ return return this.tp / $gameVariables.value(variableID); }else{ return 100; } }; //TP Equation Alterations var initialTP = eval(initialTPEqn); var _Game_Battler_initTp = Game_Battler.prototype.initTp; Game_Battler.prototype.initTp = function() { _Game_Battler_initTp.call(this); this.setTp(initialTP); }; //TP Charge Rate Alterations var _Game_Battler_chargeTpByDamage = Game_Battler.prototype.chargeTpByDamage; Game_Battler.prototype.chargeTpByDamage = function(damageRate) { _Game_Battler_chargeTpByDamage.call(this, damageRate); var value = Math.floor(50 * damageRate * this.tcr); if (eval(chargeTP)){ this.gainSilentTp(value); } }; })();