Modular Items

About


Modular Items is a plugin with support for the inventory system, and equipable items, and is well integrated with Gameplay Ability System (GAS).


The plugin works in multiplayer and was used in Outpost: Glacier.

Items


The item system is based on a fragment system similar to Lyra's item system, where each item has an array of fragments that "builds" the item.


A typical fragment that would exist in almost every item, would be the fragment that equipped the item onto the character. But a fragment could contain anything from UI elements to the item's stats, like durability.


This way you don't have to rely on parent classes to track what an item should be.

The item system also supports dual-wield

Gameplay Ability System Integration


Modular Items is very integrated with GAS. Each item has a set of abilities it gives the player once equipped.


For instance, a pickaxe would give the player an attack ability, activated once they pressed down the matching input.


Ability Cost


The plugin heavily utilizes the Ability Cost class for abilities, to check if a specific ability could get fired.


An example of the Ability Cost check would be if the player held a water container, then the Ability Cost would check if the container contained more than 0 liquid and if it did, the player could drink.


In the plugin there is one Ability Cost class by default, it checks the stats of the item that owns the ability.

Inventory


The inventory system stores all items in an Actor Component. Every item in the inventory is an UObject, replicated through the Actor that owns the inventory.


The plugin also comes with a drag-drop system that is not Unreal Engine's standard due to the system's limitations. One of which is you need to hold the mouse down during the whole drag-drop process.