ItemDataAsset defines the type of item, FItemInstance represents a specific instance of that item with unique properties.
Location: /Public/Inventory/Structures/ItemInstance.h
The Difference
Think of it like this:- ItemDataAsset = “The concept of an Iron Sword”
- FItemInstance = “Bob’s Iron Sword with 75% durability that he crafted on Tuesday”
FItemInstance Structure
Key Properties Explained
ItemID & ItemData- ItemID: Quick reference to item type
- ItemData: Full reference to the ItemDataAsset
- Both are kept for performance (ID is faster to check, Data has all info)
- How many items in this stack
- Must be ≤ ItemData’s MaxStackSize
- Used for commodities, ammo, resources
- Can override the ItemDataAsset’s default rarity
- Allows the same sword to drop as Common or Epic
- Used by loot system for random quality
- Additional stats beyond the base item
- Can be additive, multiplicative, or override
- Example:
+5 Attackon top of sword’s base 10 attack
- Displays who crafted the item
- “Crafted by Thorin”
- Used for provenance-based stacking
- Applied mods/enchantments
- Fire damage, frost effect, etc.
- Each has a power level
- Current durability value (0.0 to MaxDurability)
- Used for equipment wear and tear
- Affects item stacking with durability-based policies
- When this item was created
- Used for decay system
- Freshness for food items
- Globally unique identifier (GUID)
- Used for save/load
- Tracks specific item instances across sessions
- Tracks who owns this item
- Used for loot rights
- Prevents item theft in multiplayer
Common Operations
Check if EmptyWhen Are Item Instances Created?
- Picking up items: WorldItemActor creates instance
- Loot drops: LootComponent generates instances
- Crafting: CraftingComponent creates new instance
- Quest rewards: Manually created in code/Blueprint
- Admin commands: Debug/testing tools