- Joined
- Aug 17, 2017
- Messages
- 27
- Reaction score
- 17
- First Language
- English
- Primarily Uses
- RMMV
Draconis Inventory Limitations v1.2
by DraconisKnight
Introduction:by DraconisKnight
I made this plugin for my own project after finding other limited inventory plugins, such as the one by Mr. Trivel. I couldn't get how I wanted my inventory to work since I was wanting to use a variable and items to control my max limit.
With Inventory Limitations, you can use variables to limit and adjust the cap with usage of items. All it takes is setting your variables up and events that either increase or decrease the max limit.
Features:
- Limiting your party's inventory with $gameVariables
- Making it were a stack can equal a space with the Exempt note tag
- Three options: Numerical, Mathematical, and $data
- Numerical: <Exempt: 0> and <Exempt: 1>
- <Exempt: 0> makes all items in that stack count towards the inventory cap.
- <Exempt: 1> tells the plugin not to count that item. This one is best used on key items.
- Mathematical: <Exempt: $gameVariables.value(i) -1>
- $gameVariables.value(i) would equal the variable assigned to the number of that particular item the party has in possession. The minus one in the equation will deduce one item for the inventory count. The rest will be exempt.
- $data
- Added to the help file by Zarsla. They use data straight from the database. To use this option, use the following note tags as each will be for their respective category in your project database.
- <Exempt: $gameParty.numItems($dataItems(i))> or <Exempt: $gameParty.numItems($dataItems(i)) - 1>
- <Exempt: $gameParty.numItems($dataWeapons(i))> or <Exempt: $gameParty.numItems($dataWeapons(i)) - 1>
- <Exempt: $gameParty.numItems($dataArmors(i))> or <Exempt: $gameParty.numItems($dataArmors(i)) - 1>
- Added to the help file by Zarsla. They use data straight from the database. To use this option, use the following note tags as each will be for their respective category in your project database.
- Numerical: <Exempt: 0> and <Exempt: 1>
Note that will be the object's index your database. And use the square brackets around i.
-Some customization to Scene Shop after adding inventory count to the status window. Inventory count can be set to show used space over the total space (inventory cap), only the remaining slots available, or the remaining slots available over the inventory cap.
- Script call: $gameParty.getInventUsedSpace (); => Returns the occupied space. Can be used in your events to see if the party can carry anymore new items/item stacks.
Setting up Inventory Limitations: (Added 6 March 2018)
Install Draconis_InventoryLimitations.js in your Plugin Manager. If you are using Yanfly's Item Core, make sure Inventory Limitations in under it.
Follow the help file with the parameters. The only one that does not need input is "Exempt".
On your first map, make a parallel process. All you need to do here is assign variables: one for the inventory cap (if using the variable method) and several more for the number of X items the party has. Those variables will be used in the math version of the Exempt note tag.
EX: 10x Potions
Event Page will have Control Variables: #001 Potions Exempt = Number of Potions
In the items tab of the database, select potion and enter <Exempt: $gameVariables.value(1)-1> .
Screenshots:
Attached.
Downloads:
Download plugin only here.
Download Demo Project here.
Terms of Use:
This plugin is free to use for both non-commercial and commercial use. All I ask is credit for using this plugin.
Also credit Zarsla as they added a new gain item function to the plugin.
Modifications are fine as long credit is given.
Thanks goes to:
-Mr. Trivel => Author of MrT_LimitedInventory as it started my coding journey.
-Yanfly => Whose plugins I picked apart and reverse engineered while also reading the core files.
-TheoAllen => Author of a weight based inventory that was also studied for version 1.1.
Compatible with:
-Yanfly Core Engine
-Yanfly's Item Core without Independent Items engaged.
Upcoming Features:
-A non-stacking inventory system with its own discard and discard confirm. [Current Project]
-A way for those using a static inventory cap to increase if they wish
-[Finished: April 2018 to January 2019] Discard works for all item categories with the exception of Key Items.
-[Finished: July 2019 to January 2020] A confirm window before the discard to help prevent accidental discarding.
-Layering windows because MV just overwriting it looks tacky. Purely for aesthetics.
-Possibly adding a speed option. Maybe after tinkering with the concept.
Note:
- I just noticed a small bug with if you are awarding one item (such as a potion), I'm already working on a fix. But it works fine if you award more one. (Resolved- Help file expanded on how to avoid this.)
-Item Limit Window refreshes after opening the item menu if using YEP_X_ItemDiscard. (Resolved between April 2018 to January 2018. The plugin now has its own discard function that YEP_X_ItemDiscard isn't needed. Within the discard function, this plugin updates the limit window automatically.)
-Any bought item (that exceeds the inventory limit) is automatically deleted. I still want to address this in the plugin, but after hitting the JS books and taking time to understand how the shop functions work. (Resolved April 2018 by overwriting the shop's isEnabled function.)
-A bug with <Exempt: 0> and the current gainItem function. Function currently discards an item stack if it exceeds the inventory cap. [Current Project]
Versions:
1.2- Added a Discard Confirm for a stacking inventory system along with a command that gives the option to jump to Scene_Equip on weapons and armors. The option to change all new (current) windows for those wishing/planning to use a plugin that changes the scene's background.
1.1a- Fixed bug with Window_ShopBuy's isEnabled function. Also added a few customization options to Scene Shop.
1.1- Big update including:
- Added an action window with three commands: use, throw away, and cancel. Discard works with items only. [Completed April 2018]
-Made it were discard is disabled for all items that register as a 'Key Item'.
2. Overwrote the original Window_ShopBuy.prototype.isEnabled to update with inventory. [Completed April 2018]
-Meaning if the bag is full and the party doesn't have one of the items the vendor is selling, that item cannot be bought unless room is made.
1.0d - *Done by Zarsla* Thank you very much. They added a new gain item function to the plugin that doesn't require any checks. The plugin now automatically discards any items over the inventory cap as well as adding the new note tags to the help file. In addition, the party's gold can be included as a 'stack' in the inventory.
1.0c - Added script calls and one set of instructions for inventory checks. (Gaining new and size.)
1.0b - Figured out how to code the note tag for one item. Instructions have been edited and included an example on how to set up the variable.
1.0 - Released.
Attachments
Last edited: