Currently like VXA, MV has it to where your default TP starts at a random amount each battle.
I would like to change it so that your default TP starts at 0 each battle.
Can anyone guide me to where I can change this? Thank you.
Can anyone help me change default TP?
● ARCHIVED · READ-ONLY
-
-
By default, MV has this...
Game_Battler.prototype.initTp = function() { this.setTp(Math.randomInt(25));};So just change that to:
Game_Battler.prototype.initTp = function() { this.setTp(0);};Or add a new plugin with just that... -
It works, thank you.
-
Where is that?
-
I think that's in rpg_objects.js
-
Well, I've been interested in starting to make plugins, so I made a small-scale, quick-n-dirty one for this.
//=============================================================================// JahwsUF - Battle Stat Manager// JAH_BattleStatManager.js// Version: 1.00//=============================================================================var JahwsUF = JahwsUF || {};//=============================================================================/*: * @plugindesc v1.00 Used for configuring otherwise-hardcoded battle stats. * @author JahwsUF * * @param Critical Multiplier * @desccritical hit dmg = base damage * this multiplier * Default: 3 * @default 3 * * @param Min Initial TP * @desc Minimum amount of TP a character may have at the start of battle. * Default: 0 * @default 0 * * @param Max Initial TP * @desc Maximum amount of TP a character may have at the start of battle. * Default: 25 * @default 25 */JahwsUF.Parameters = PluginManager.parameters('JAH_BattleStatManager');JahwsUF.Param = JahwsUF.Param || {};JahwsUF.Param.CriticalMultiplier = Number(JahwsUF.Parameters['Critical Multiplier']);JahwsUF.Param.MaxInitialTP = Number(JahwsUF.Parameters['Max Initial TP']);JahwsUF.Param.MinInitialTP = Number(JahwsUF.Parameters['Min Initial TP']);// Replaces the original implementation from rpg_objects.js.Game_Action.prototype.applyCritical = function(damage) { return damage * JahwsUF.Param.CriticalMultiplier;};// Replaces the initial TP assignment function from rpg.objects.js.Game_Battler.prototype.initTp = function() { range = JahwsUF.Param.MaxInitialTP - JahwsUF.Param.MinInitialTP; this.setTp(Math.randomInt(range) + JahwsUF.Param.MinInitialTP);};You can use this to alter the base critical hit multiplier and control the range of randomness for TP - setting the min and max to the same value will result in TP always having that value at the battle's start. (This way, it can also be something other than zero, and configurable per game/project.)
Just put that code in its own text file under the plugins folder, then rename the file JAH_BattleStatManager.js and it becomes a useable plugin. -
I'm gonna sound stupid here, but how do we change the script into those plugin files? Cause in the last game we just copy pasted but this seems more complicated.
I also noticed it's not letting me open the plugins.
Okay I finally figured it out!