[MV] Change Max TP value plugin release

Landazar

Veteran
Veteran
Joined
Feb 16, 2018
Messages
179
Reaction score
55
First Language
Polish
Primarily Uses
RMMV
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):

Demo & How to use it:

Script & Download:
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
 
Last edited:

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
12,954
Reaction score
13,314
First Language
English
Primarily Uses
RMVXA
You forgot to put your terms of use on the front page. Can you edit it and add that in please? Thanks!
 

Landazar

Veteran
Veteran
Joined
Feb 16, 2018
Messages
179
Reaction score
55
First Language
Polish
Primarily Uses
RMMV
A little things updated in plugin
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Humans are fallible creatures, we all know that. It's when we're forced to look at ourselves that we start to disagree. :p
Expectation: Working on boss battle.
Reality: "Look at how awful are these code and database organization. Let me clean this mess", *yet, casually adding more modules that I have no idea if I would use it later*
Trying to learn to read Japanese so I read my manga. I like to buy them without all the edits made during translation.
The only thing getting me through today so far is coffee. And lots of it.
Amazing. I had seen it more than 10 years ago, but seeing Monster this year was an incredible experience. It was certainly one of the best endings I've ever seen in anime.

Forum statistics

Threads
97,852
Messages
947,383
Members
129,079
Latest member
DerLaPux
Top