Description
Lime.Inventory is a flexible inventory system. You can create many inventories with one function! Drag and drop windows and items. You can setting up it like you want: change colors of invetory or set background and slot sprites, and also has the support of nine slice sprite. I use this inventory system in my game "Sandoria", you can check it on this site
If you have some problems or suggestions or found a bug, please contact with me in Discord server:
Features:
- Easy to setup.
- Easy to use functions.
- Many settings.
- Drag and drop windows.
- Very fast. Surfaces are used and updated only if it is really needed.
- Full commented and organized code.
Apocalypse style inventory example:
//CREATE EVENT
inventory = InvCreate(6,3);
InvSetName(inventory, "Apocalypse style");
InvSetBackSprite(inventory, sStalkerInvBack);
InvSetMainSlotSprite(inventory, sStalkerInvSlot);
InvSetCursorSprite(inventory, sStalkerCursor);
InvSetIndentOfCell(inventory, 10);
InvSetBordersSize(inventory, 10, 10, 63, 10, 10);
InvSetPosition(inventory, room_width div 2 - inventory.inv_surf_w div 2, inventory.invPosY - 16);
InvToggleAnim(inventory, true);
//Add random Items
for (var i = 0; i < inventory.inv_slots; ++i) {
var _item = ITEM.knife + irandom(ITEM.item_number-ITEM.knife-1);
InvSetSlotItem(inventory, i, _item, 1 + irandom(GetProp(_item, ALL_PROPS.maxstack)-1));
}
//PRESS "E" BUTTON
InvToggleAnim(inventory);
End User Licence Agreement (EULA).
Age Rating: 4+
Versions
GMS2 - Version 1.0.3. Published May 26, 2020
Fixed "InvDropAll" script. This script did not work correctly. Just delete "InvDropAll" script and import the new one.
GMS2.3 - Version 1.1.1. Published July 22, 2022
Change list:
- All functions have been combined into their own groups and distributed across scripts
- The function for rendering nineslice sprites was removed and replaced by the new built-in nineslice system from YoYoGames, thank them very much for this feature! (You will have to adjust your sprites for this, see example in the package)
- Optimized rendering and memory usage
- Fixed bugs with inventory size calculations
- Added new functions: InvDropAll, InvCloseAll
What you need to do to upgrade:
First make a copy of your project, I am not responsible for your project! Next, delete past objects and add new ones, you will be prompted for replacements when importing. Next you have to delete all past scripts and add new ones! You will also need to update your sprites that were previously used for nineslice to the new format, to do this see the example in the package and learn how nineslice works in the new version of Game Maker if you haven't already. Unfortunately I don't know how much you did in your project, so update everything carefully and step by step, you can open two projects side by side and gradually watch what has changed and change to the new one. I hope everything works out for you!
What's next?
All the changes made were aimed at a future big update of this project. I am preparing to redo and improve a lot of things. The future big update will be aimed at universalization of the project and will be based on structures for all new measures and standards Game Maker!