RPG Maker Forums

ChangeMaxLevel - 2015-11-19

Creator name: Alec

Overview
Allows you to change maximum level.

Features
- Able to change max level with a parameter
- Short code

Code:
//=============================================================================
// ChangeMaxLevel.js
//=============================================================================
//
//Copyright (c) 2015 Alec
//This software is released under the MIT License.
//http://opensource.org/licenses/mit-license.php
 
/*:
 * @plugindesc Change maximum level
 * @author Alec
 *
 * @param newMaxLevel
 * @desc Set max level
 * @default 99
 */
/*:ja
 * @plugindesc 最大レベルを変更します
 * @author Alec
 *
 * @param newMaxLevel
 * @desc 最大レベル
 * @default 99
 */
 
 
(function() {
    Game_Actor.prototype.maxLevel = function() {
        var parameters = PluginManager.parameters('ChangeMaxLevel');
        var newMaxLevel  = Number(parameters['newMaxLevel'] || 0);
        console.log(parameters);
        console.log(newMaxLevel);
        return newMaxLevel;
    };
 
    Game_Actor.prototype.paramBase = function(paramId) {
        if (this._level < this.currentClass().params[paramId].length) {
            return this.currentClass().params[paramId][this._level];
        }
        else {
            var maxLevel = this.currentClass().params[paramId].length - 1;
            var sub = this.currentClass().params[paramId][maxLevel] - this.currentClass().params[paramId][0];
            return this.currentClass().params[paramId][maxLevel] + sub / maxLevel * (this._level - maxLevel);
        }
    };
 
})();
Credit and Thanks: Alec

Terms of Use- Free for commercial and non-commercial use.

License - MIT License: http://opensource.org/licenses/mit-license.php

You can download js file from the thread attachment or Dropbox link: https://www.dropbox.com/s/vcjblyeduf2um5l/ChangeMaxLevel.js?dl=1

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,037
Messages
1,018,464
Members
137,821
Latest member
Capterson
Top