Modular Inventory Component
This is a drag and drop inventory component for Unreal Engine 4. Currently implemented features are listed below.
- Modular system: Every element is controlled by data tables.
- Drag and drop items. Moveable, Highly customisable. Comes with example items for testing.
- Made using Blueprints only!
- Network Replication supported.
Important Classes
- AC_Inventory: The main actor component. Attach it to the actor which will have the inventory. It could be a character with stash or an object which will act as a vault or loot bag.
- BPI_InventoryUser: Interface that you must add to user/character. Should be used to implement inventory actions.
- BPI_Item: Interface that you should add to an item blueprint. Should be used to implement inventory actions.
- DT_Inventories: Data table contains various visual inventory settings (e.g Background colour/title). If you want to have different visuals for different inventory. Use the same Row Name for the corresponding
- AC_Inventory: ('Inventory Name' variable).
- DT_Items: List of various items. Its upto you to use.
- E_ItemActions: List of possible item actions. You have to provide an array of this for each item
- E_ItemCategory: Categories of items. Used to filter in inventory panel.
- E_ItemProperty: Will be used later for item sorting implementation.
- FL_Inventory: A function library for commonly used items.
- ST_InventorySettings: A structure containing various settings for the inventory widget.
- ST_Item: Structure of items containing variables to store things like name, pic, item count for each item.
- W_ContextMenu: Context menu widget for an item.
- W_Inventory: The main inventory holder widget containing all the items.
- W_Item: An item slot inside inventory. Responsible for drag and drop functions.
- W_Item: An item slot inside inventory. Responsible for drag and drop functions.
- W_RButton: A custom button widget used in dynamic category or dynamic context menus.
Some Useful Nodes
Installation
- Migrate
- Add Inventory component
- Use the blueprint functions to show inventory/add items/transfer/delete/modify
Todos
- Documentation
- Creating an item list style instead of grid
- Sorting items based on item property
- Different sized Items
Development
Want to contribute? Great send me a message.
Special Thanks
This project includes some sample textures from Kenney and Ravenmore
License
Free Software, Hell Yeah!