Skip to content

Instantly share code, notes, and snippets.

@pota-gon
Created September 4, 2021 05:37
Show Gist options
  • Save pota-gon/cb80db2f556c4f7c9eefb923bfc81da5 to your computer and use it in GitHub Desktop.
Save pota-gon/cb80db2f556c4f7c9eefb923bfc81da5 to your computer and use it in GitHub Desktop.
RPGツクールMVの装飾品を2つにする
/*:
* @plugindesc 装飾品を増やすプラグイン
* @author 自分のアカウント名
* @help 装飾品を増やすプラグインです。
* @url
*/
(() => {
'use strict';
const _Game_Actor_equipSlots = Game_Actor.prototype.equipSlots;
Game_Actor.prototype.equipSlots = function() {
const slots = _Game_Actor_equipSlots.apply(this, arguments);
slots.push(5);
return slots;
};
const _Game_Actor_initEquips = Game_Actor.prototype.initEquips;
Game_Actor.prototype.initEquips = function(equips) {
_Game_Actor_initEquips.apply(this, arguments);
const slots = this.equipSlots();
for (let i = 0; i < slots.length; i++) {
let meta = this.actor().meta['装備' + (i + 1)];
if (meta) {
this._equips[i].setEquip(slots[i] === 1, parseInt(meta));
}
}
};
Window_EquipStatus.prototype.numVisibleRows = function() {
return 8;
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment