[MV] Change Max TP value plugin release
LJP_maxTP.jsLandazar'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
Demo & How to use it:
Spoiler
https://www.youtube.com/embed/lnxO33zt3bA
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
本贴来自国际rpgmaker官方论坛作者:Landazar处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/mv-change-max-tp-value-plugin-release.95497/
页:
[1]