In my project I need to replace fixed Value of MaxTP to something more flexible, so I decided "I make a plugin" by looking through all .js files in RMMV I managed to make something may look like plugin...
I don't know very well JavaScript, but I wish to learn JS. I deducted that in this form after installing plugin my Hero's Max TP value will be 255, but after game launch, his maxTP remains default wich is 100. What went wrong in this code?
Code:
/*:
*
* @plugindesc This is the simpliest way to change max TP value for actor
* @author Landazar
*
* @help This plugin does not provide plugin commands.
*
* @param MAX TP Value
* @desc e.g this.level * 10 (or even fixed value)
* Default: 255
* @default 255
*
*/
(function() {
var parameters = PluginManager.parameters('LJP_maxTP');
var maxTP = number(parameters['MAX TP Value']);
Game_BattlerBase.prototype.maxTp = function() {
return maxTP;
};
})();
I don't know very well JavaScript, but I wish to learn JS. I deducted that in this form after installing plugin my Hero's Max TP value will be 255, but after game launch, his maxTP remains default wich is 100. What went wrong in this code?