//============================================================================= // RPG Maker MZ - LevelLimit // // Copyright 2024 min-pub. All rights reserved. // This source code or any portion thereof must not be // reproduced or used without licensed in any manner whatsoever. //============================================================================= /*: * @target MZ * @plugindesc 最大レベル設定(上限突破) * @author 四号戦車 * @base PluginCommonBase * @base PluginUtils * @orderAfter PluginCommonBase * @orderAfter PluginUtils * * @param maxLevel * @text 最大レベル * @desc 最大レベルを指定します。 * 100以上の指定が可能です。 * @type number * @default 99 * @min 1 * * @help LevelLimit.js * * Version: 0.0.1 * * 最大レベルを100以上に設定出来ます。 * */ (() => { "use strict"; //======================================================================== // プラグイン定義 //======================================================================== const pluginName = "LevelLimit"; const script = document.currentScript; const param = PluginManagerEx.createParameter(script); //======================================================================== // 定数定義 //======================================================================== //======================================================================== // コアスクリプト変更部 (Game_Actor) //======================================================================== const _Game_Actor_paramBase = Game_Actor.prototype.paramBase; Game_Actor.prototype.paramBase = function(paramId) { if (this._level >= 100) { const u_levelParam = this.currentClass().params[paramId][99]; const d_levelParam = this.currentClass().params[paramId][94]; const level = (this._level - 99) * ((u_levelParam - d_levelParam) / 5) + u_levelParam; return Math.round(level); } else { return _Game_Actor_paramBase.apply(this, arguments); } }; const _Game_Actor_maxLevel = Game_Actor.prototype.maxLevel; Game_Actor.prototype.maxLevel = function() { return !this._maxLevel && param.maxLevel ? param.maxLevel : _Game_Actor_maxLevel.apply(this, arguments); }; })();