[MV] Change Max TP value plugin release

LJP_maxTP.js
Landazar's Java (script) plugin Max TP
version 1.0.0.2 (Landazar's first plugin ever!!)
​
Introduction:
This simple plugin changes actor's max TP value from constant value 100 to something more

Terms of Use:
This plugin is free both in commercial and non-commercial products, no fees, no credits, nothing, it's public, free and open.
You can:
- modify it
- share it
- use it
- play with it
- anything you wish.


Features:
- Change actor's max TP from constat 100 to custom variable with extra parameters
- Increase max TP when actor level's up or in any other key moment in you game

Screenshot(s):
Spoiler
ljp.jpg

Demo & How to use it:


Script & Download:
Spoiler
Code:
/*:
 *
 * @plugindesc This is the simpliest way to change max TP value for actor
 * @author Landazar
 *
 * @param TP Base Value
 * @desc Base value of TP (default 25) you can put any other value
 * Negative values are forbidden!
 * @default 25
 * default: 25
 *
 * @param ID of parameter variable
 * @desc Variable is included to alter max TP
 * Negative values are forbidden!
 * @default 1
 * default: 1
 *
 * @param Multiplicator value
 * @desc Use this to multiply final TP result
 * Negative values are forbidden!
 * @default 2
 * default: 2
 *
 * @param Reductor value
 * @desc Use this to lower TP if you think you get to high value
 * Negative values are forbidden! Allowed values: from 1 to 10
 * @default 4
 * default: 4
 * @help This plugin can alter maxTP value of your actor to any desired value.
 * To alter max TP value by game progression you must define a variable
 * wich will alter TP, then in parameters put it ID to get formula working
 * e.g your var you want use is: '#0005: MaxTPalter', so in parameter you type 5
 * rest numbers is you desire, however
 * I wouldn't recommend huge numbers ( > 10000 )
 * view how to use it --> https://youtu.be/lnxO33zt3bA
 *
 * WARNING! Any attempt to use negative values will result
 * automaticly converting them to positive values!
 *
 * WARNING!! Any attempt to use strings in plugin parameters
 * will result setting default parameters inside funtion's code!
*/

(function() {
    Game_BattlerBase.prototype.maxTp = function() {
   
        /* Build Variables and setup const values */
       
            const DEFAULT_BASE             = 25;
            const DEFAULT_MULTIPLY         = 2;
            const PI                     = 3.14;
       
            /* Math.abs will convert negative values to positive values */
       
            var params                    = PluginManager.parameters('LJP_maxTP');
            var BaseVal                    = Number(Math.abs(params['TP Base Value']));
            var Multiplier                = Number(Math.abs(params['Multiplicator value']));
            var Reductor                = Number(Math.abs(params['Reductor value']));
            var vLvID                    = Number(Math.abs(params['ID of parameter variable']));
            var exVar                    = $gameVariables.value(vLvID);
       
        /* End of Vars */
   
        /* Protect formula from string values (if any string found, set default number value */
   
        if ( isNaN(BaseVal) )                                                { BaseVal = DEFAULT_BASE; }
        if ( isNaN( Multiplier ) )                                            { Multiplier = DEFAULT_MULTIPLY; }
        if ( isNaN( Reductor ) || (Reductor <= 0) || (Reductor > 10) )        { Reductor = DEFAULT_MULTIPLY * 2; }
   
   
    return Math.ceil( (BaseVal + ( exVar * Multiplier ) + ( ( BaseVal / 2) * (exVar * PI) ) * PI) / Reductor );
    };
})();

Direct download (pastebin) (after download rename file to LJP_maxTP.js)

F.A.Q:
- So far none.

Thanks:
- @caethyril
- @Aloe Guvner

Author notes:
- This is first plugin ever wrote by me
- Updates? Maybe.

Changelog:
1.0.0.2
- Bugfix to string parameters (strings are no longer allowed)
- Bugfix to negative numbers (values below 0 are automaticly converted to positive values)
- Bugfix to zero values will be set to their defaults.
- Added new parameter - reductor - reduce MaxTP if you think it is too big
- Added link to Youtube video

1.0.0.1 - First Release
You forgot to put your terms of use on the front page. Can you edit it and add that in please? Thanks!
A little things updated in plugin
So grateful for this plugin!
why the final return value is:
return Math.ceil( (BaseVal + ( exVar * Multiplier ) + ( ( BaseVal / 2) * (exVar * PI) ) * PI) / Reductor );

why there is such complicated value? and why PI involved??

Original thread: https://forums.rpgmakerweb.com/threads/mv-change-max-tp-value-plugin-release.95497/