Landazar

Veteran
Veteran
Joined
Feb 16, 2018
Messages
179
Reaction score
56
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):
ljp.jpg

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
13,767
Reaction score
14,524
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
56
First Language
Polish
Primarily Uses
RMMV
A little things updated in plugin
 

jakefagan

Warper
Member
Joined
Apr 11, 2017
Messages
4
Reaction score
1
First Language
English
Primarily Uses
RMMV
So grateful for this plugin!
 

RyanYe

RPG Game Lover
Veteran
Joined
Dec 31, 2020
Messages
82
Reaction score
12
First Language
English
Primarily Uses
RMMV
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??
 

Latest Threads

Latest Posts

Latest Profile Posts

Voting for the second round of the Map Madness Tournament is now live! Vote for your favorite in each matchup! https://forums.rpgmakerweb.com/index.php?forums/map-madness-2021-polls.187/
Just bought the Visustella All Waves bundle... Time to go IN!!
Oh, I was just confirmed I'll be doing small online classes during june - july, on one side I'm nervous and looking forward it, on the other one: I've became the very thing I swore to destroy. :kaodes:
Work starts today at 2pm. I hate jeans, but the dress code says I have to wear them... That's how I discovered I was a plus size. Shopping for my first pair of jeans.
Anyhow, I'll post a new video on TheDazzlingsAreBack as soon as I'm able to.
dEj6ha4.png

WIP :)
Added some cliffs / walls / roofs to the tilesheet and am currently working on roof objects to make them prettier and more variable. And of course, windows and doors that fit to the game's style.
I also adjusted the grass color but i have some issues with my display, so if it looks weird, please let me know :)

Forum statistics

Threads
110,572
Messages
1,054,299
Members
143,685
Latest member
Yatsuzuka_Kou
Top