Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //=============================================================================
- // Maliki's YF Item Core Extension - Changable Instance Item Maxes
- // Mal_ItemCore_Ext_Changable_Max.js
- // version 1.0
- //=============================================================================
- /*:
- * @plugindesc ver1.0 - Allows you to change the Max number of Instance Items, Weapons, or Armors in game.
- * @author Maliki79
- *
- * @help For maximum compatibility, put this plugin DIRECTLY UNDER YF'S ITEM CORE PLUGIN!
- * In order to use this plugin, you simply have to make the following script calls:
- * $gameParty.changeInstItemMax(x);
- * $gameParty.changeInstWeaponMax(x);
- * $gameParty.changeInstArmorMax(x);
- * With x being an integer.
- *
- * Also, make sure you have the item category set to feature instance items from the original plugin's parameters, or you may cause a crash.
- * Note that using this plugin, you can put a negative value reducing the amount of Instance Items in a category.
- * For the most part there shouldn't be any issues, but make sure not to set the amount so that the items number goes below 1.
- */
- Game_Party.prototype.changeInstItemMax = function(amount) {
- this.insItemMax = this.insItemMax || 0;
- number = Math.floor(amount) || 0;
- this.insItemMax += number;
- }
- Game_Party.prototype.changeInstWeaponMax = function(amount) {
- this.insWeaponMax = this.insWeaponMax || 0;
- number = Math.floor(amount) || 0;
- this.insWeaponMax += number;
- }
- Game_Party.prototype.changeInstArmorMax = function(amount) {
- this.insArmorMax = this.insArmorMax || 0;
- number = Math.floor(amount) || 0;
- this.insArmorMax += number;
- }
- Game_Party.prototype.getIndependentItemTypeMax = function(item) {
- if (!item) return 0;
- if (DataManager.isItem(item)) return Yanfly.Param.ItemMaxItems + (this.insItemMax || 0);
- if (DataManager.isWeapon(item)) return Yanfly.Param.ItemMaxWeapons + (this.insWeaponMax || 0);
- if (DataManager.isArmor(item)) return Yanfly.Param.ItemMaxArmors + (this.insArmorMax || 0);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement