C++ reference
The Core surface is frozen: additive changes are free, and anything that alters an existing
signature, struct layout, enum order or replication format goes through a written change record
first. The plugin's Docs/PublicAPI.md carries the freeze document and the record of every break.
Core — EDInventoryCore
Items
#include "ItemDefinition/EDItemDefinition.h"
#include "Item/EDItemEntry.h"
#include "Item/EDItemStatics.h"
| Type | Role |
|---|---|
UEDItemDefinition | The immutable asset. Category, Tags, Fragments, InstanceClass, FindFragment<T>(), HasFragment<T>() |
FEDItemEntry | The struct fast path: DefinitionId, Handle, StackCount, State, DynamicTags, SlotAddress, Instance |
FEDItemRef | How everything else names an item — loot entries, vendor offers, crafting ingredients, prerequisites, initial items. Id, IsSet(), Resolve() (never loads). An item-definition picker in the editor |
FEDItemHandle | Opaque server-allocated identity. IsValid, NetSerialize, GetTypeHash |
FEDItemStateContainer | Tag-keyed per-stack numbers |
UEDItemInstance | Opt-in per-item UObject; PromoteEntry / DemoteEntry |
UEDItemStatics | ResolveDefinition, FindItemFragment<T>, GetItemDisplayName, GetItemFootprint, DoesItemCoverCell |
EDStackOps | GetMaxStackSize, CanStackTogether, DrainByDefinition, AddByDefinition |
Containers
#include "Container/EDContainer.h"
#include "Container/EDContainerDefinition.h"
#include "Container/EDContainerComponent.h"
UEDContainer carries the action API — see Containers and layouts.
| Group | Members |
|---|---|
| Identity | GetContainerType, GetContainerId, GetOwningActor, HasAuthority, GetMaxSlots, IsUnlimited |
| Read | GetEntries, GetNumEntries, FindEntry, FindEntryByPredicate, GetEntryAtIndex, GetAllItems, ContainsHandle, ContainsDefinition, CountByDefinition, GetTotalItemCount, FindHandlesByDefinition |
| Act (authority) | TryAddItem, TryRemoveItem, TryRemoveItems, TryTransferItem |
| Act (anywhere) | RequestTransaction, RequestTransferItem, RequestSort, RequestMove, RequestSplit, RequestMerge, RequestSwap, RequestDestroy |
| Check | EvaluateAddItem, GetAcceptanceError, CanAcceptEntry, EvaluateRulesForCandidate |
| Rules / layout | GetRules, SetRules, FindRule<T>, HasRule<T>, GetLayoutConfig, SetLayoutConfig, ResolveLayout, ResolvePlacement, RepackEntries |
| Apply ops (transactions only) | AddEntry, RemoveEntry, RemoveEntries, UpdateEntry, MoveEntry, SetEntrySlotAddress, SetEntryDynamicTags |
UEDContainerDefinition — ContainerTag, DisplayName, Description, Icon, ContainerTags,
ContainerClass, Layout, ItemQuery, Priority, Rules, ResolveSlotCount(Owner),
AcceptsItemDefinition(Definition).
UEDContainerComponent — one actor, one container. Definition (a UEDContainerDefinition*, the
whole configuration) plus GetContainer(), GetContainerType(), FindContainerByType,
GetContainerComponents.
UEDInventoryRouteComponent (abstract) — RequestTransaction, OnTransactionResult,
HasAuthority, static FindClientRoute. Both inventory components derive from it.
The inventory
#include "EDInventoryManagerComponent.h"
#include "EDInventoryOwnerInterface.h"
UEDInventoryManagerComponent — see The inventory manager for the
grouped list. IEDInventoryOwner has one function, GetInventoryManager.
Transactions
#include "Transactions/EDCoreTransactions.h"
#include "Transactions/EDTransactionProcessor.h"
#include "EDInventorySubsystem.h"
| Type | Role |
|---|---|
FEDTransaction | Data-only base |
EEDTransactionError | Reason enum — order frozen, it replicates |
FEDTransactionResult | bSuccess, Error, AffectedItems |
FEDTransactionContext | Instigator, bHasAuthority, HandleAllocator |
IEDTransactionExecutor | Validate / Execute / GetAffectedContainers |
UEDTransactionProcessor | Registry + snapshot rollback |
UEDInventorySubsystem | ExecuteTransaction, AllocateHandle, GetRollStream, SetRollSeed, Get(WorldContext) |
FEDTransactionExecutorRegistry | Where a module contributes its own |
Rules, layouts, observers
#include "Rules/EDCoreRules.h"
#include "Layout/EDCoreLayouts.h"
#include "Container/EDContainerObserverComponent.h"
Rules: FEDContainerRule, FEDLockedRule, FEDForbiddenTagsRule, FEDAllowedTagsRule,
FEDRuleContext, FEDRuleEvaluatorRegistry.
Layouts: FEDLayoutConfig, FEDListLayoutConfig, FEDSlotLayoutConfig, FEDGridLayoutConfig,
IEDLayout, FEDLayoutRegistry, FEDSlotAddress.
Observers: UEDContainerObserverComponent — override CanObserve, ReevaluateItem,
GetTrackedHandles, StopTrackingItem; you get GetSiblingContainers, FindHoldingContainer,
RefreshBindings, RefreshAllItems, NotifyObservationContextChanged and teardown.
NotifyObservationContextChanged() is the one to call when something the observer gates CanObserve
on has changed — most often that its actor now acts through a different pawn. An observer that could
not observe drops what it was sent and remembers that it did, so this re-derives every held item
rather than waiting for an inventory event a respawn never produces. See
Keeping the inventory across a respawn.
Stranded items: UEDStrandedItemHandler, UEDStrandedItemHandler_Rehome.
Events and saving
#include "Events/EDInventoryChange.h"
#include "Serialization/EDInventorySave.h"
FEDInventoryChange (ChangeType, Handle, Container), EEDInventoryChangeType,
UEDInventoryMessageSubsystem for tag-routed global listeners, and
EDInventorySave::SaveInventory / LoadInventory (whole inventory, nested containers included),
SaveContainer / LoadContainer (one container), JSON export.
GAS bridge
UEDGASLinkComponent, FEDGrantsFragment, FEDGrantCondition, FEDEffectGrant, FEDAbilityGrant,
FEDAttributeSetGrant.
UEDGASLinkComponent::ResolveGrantSourceObject(const FEDItemEntry&) decides what a granted ability or
effect calls its GAS source object — the item's UEDItemInstance by default, the component for a
fast-path item that has none, or an object of your own if you override it. See
What a granted ability can ask about its item.
Equipment — EDInventoryEquipment
UEDEquipmentManagerComponent (Anchors, DefaultAttachRule, SetEquipmentState,
GetEquipmentState, GetVisualMesh), FEDEquipmentSlotAnchor, FEDAttachRule and its three
concrete rules with FEDAttachRuleRegistry,
IEDEquipmentAvatar, FEDEquipmentFragment, FEDEquipmentState, UEDEquipmentStatics
(MakeEquipmentLayout, GetEquipSlot, IsEquippable).
UI — EDInventoryUI
UEDInventoryViewModel (SetSourceInventory, SetSource, Refresh, GetContainer, GetEntries,
Request*, CycleSortMode), UEDInventoryViewBase, and the grid / list / bar / cell / slot /
tooltip / context-menu widgets. UEDInventoryDragDropOp, EEDDropSemantic, UEDUIStatics.
Feature modules
| Module | Entry points |
|---|---|
| Weight | UEDWeightComponent, FEDWeightFragment, FEDWeightLimitRule, UEDWeightStatics |
| Durability | FEDDurabilityFragment, UEDDurabilityStatics |
| Crafting | UEDCraftingRecipe (EEDCraftingKind, Pattern), UEDCookingRecipe, UEDCraftingStatics (CanCraft, RequestCraft, MatchGrid, FindGridRecipe, RequestCraftFromGrid, GetGridSize, GetFuelSeconds), UEDProcessingComponent, FEDFuelFragment, and the craft / shaped-craft / cook / consume-fuel transactions |
| Trading | UEDVendorComponent, FEDVendorOffer, FEDValueFragment, purchase/sale transactions |
| Loot | UEDLootTableAsset, UEDLootStatics, FEDLootRollResult |
| Usable | FEDUsableFragment, UEDUsableStatics, UEDUsableSubsystem, FEDItemUsedEvent |
| Equipment · Mutable | UEDMutableEquipmentComponent, FEDMutableEquipmentFragment |
Spatial (UEDSpatialStatics, FEDRotateTransaction) is in Core under Spatial/. There is no
networking policy module: relevancy and dormancy belong to your actors, and container changes wake a
dormant owner on their own.
Conventions
- Everything is prefixed
ED.UED…for objects,FED…for structs,EED…for enums,IED…for interfaces. - Plugin modules use
Public/+Private/. - Fragments, rules, transactions and layout configs are data only — no virtuals. A vtable in an
FInstancedStructcorrupts serialization. - Every file carries the copyright header.