じ☆ve冰风 发表于 2026-7-26 17:03:30

Change Max Level

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.length) {
            return this.currentClass().params;
      }
      else {
            var maxLevel = this.currentClass().params.length - 1;
            var sub = this.currentClass().params - this.currentClass().params;
            return this.currentClass().params + 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


本贴来自国际rpgmaker官方论坛作者:ovate处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/change-max-level.94492/
页: [1]
查看完整版本: Change Max Level