Skip to main content
UMI is designed to be extended and customized for your game’s specific needs. This guide covers extension points and customization strategies.

Adding Custom Item Fields

Overview

You may want to add custom properties to items beyond what UMI provides.

Method 1: Use Gameplay Tags

The simplest approach - use gameplay tags for categorization: In ItemDataAsset:
Usage:

Method 2: Use Stat Modifiers

Store custom data as stats:
Retrieval:

Method 3: Extend FItemInstance

For complex custom data, extend the struct: C++:

Method 4: Data Asset Extension

Create child class of ItemDataAsset:

Creating New Item Types

Example: Spell Scrolls

1. Create Data Asset:
2. Create Custom Logic:

Example: Seeds (Plantable Items)


Overriding Stacking Logic

Custom Stacking Policy

1. Add to Enum (in StackingUtils.h):
2. Implement Logic (in StackingUtils.cpp):
3. Use in Item:

Adding Custom Containers

Container Types

1. Simple Storage Container: Already provided via InventoryComponent on actors. 2. Filtered Container (e.g., Weapon Rack):
3. Auto-Sorting Container (e.g., Ore Sorter):
4. Linked Containers (e.g., Ender Chest):

Custom Abilities

Item Usage Abilities

1. Create Gameplay Ability:
2. Assign to Item:

Weapon Abilities


Custom UI

Inventory Widget

Create your own inventory UI by reading from InventoryComponent: Blueprint Widget:
Update Logic:

Equipment Widget


Performance Optimizations

Object Pooling for World Items

Batch Item Operations

Async Item Loading


Integration Examples

Disclaimer:
The examples below are not built-in features of UMI.
They demonstrate how you might integrate UMI with other systems such as quests, achievements, trading, or custom gameplay logic.
These snippets are provided as guidance and should be adapted to your project’s architecture.

Quest System Integration

Achievement System

Trading System


Best Practices for Extensions

  1. Use interfaces: Keep extensions modular
  2. Leverage gameplay tags: Flexible categorization
  3. Extend via inheritance: Don’t modify core classes
  4. Document custom systems: Help future developers
  5. Test thoroughly: Especially save/load functionality
  6. Maintain compatibility: Consider UMI updates
  7. Use events: React to system changes
  8. Validate inputs: Prevent exploits
  9. Optimize early: Profile custom code
  10. Version your extensions: Track changes