ObjectDescriptor and GameObjectBaseClass Specification - wwestlake/Steamforge GitHub Wiki
The ObjectDescriptor
serves solely as a registry and descriptor of unique object types. Its purpose is to facilitate instancing, categorization, and naming convention-based class resolution.
-
Name (FName)
Unique identifier for the object (e.g.,StonePickaxe
,IronOre
).
Used to generate the Blueprint class name by convention:GO_<Name>
. -
Description (FText)
Human-readable summary for UI or metadata purposes.
- There are no class paths, assets, or behavior-specific data in this table.
- All behavior and metadata are retrieved via the Blueprint class determined by naming (
GO_
prefix). - This table is used only at startup or when resolving unknown object types.
All spawnable or manageable in-game objects inherit from this base. They must be able to describe themselves, interact with inventories, and communicate with the Object Management System.
-
GetObjectId(): FName
Returns the ID from the ObjectDescriptor that this instance represents. -
GetDisplayName(): FText
Localized name for UI and in-world use. -
GetDescription(): FText
Additional metadata for tooltips, UI, etc. -
GetWeight(): float
Used by inventory, containers, encumbrance, etc. -
GetStackLimit(): int32
Defines how many instances of this object may stack together. -
GetTags(): FGameplayTagContainer
Useful for categorization, filtering, equipment, crafting, etc. -
GetIcon(): UTexture2D* or SoftReference
For inventory UI and tooltips.
-
IsPlaceable(): bool
Returns whether this object can be placed in the world. -
CanStackWith(GameObjectBaseClass* Other): bool
Determines if another instance is eligible to stack with this one. -
SaveState(): FObjectSaveData
Custom serializable state (if needed). -
LoadState(data: FObjectSaveData)
Restore object’s internal state from save data. -
OnBeginLife(bool bNewInstance)
Called by Object Management System when created or loaded.
Object ID | Blueprint Class |
---|---|
StonePickaxe |
GO_StonePickaxe |
Stick |
GO_Stick |
IronOre |
GO_IronOre |
This model promotes strict class-driven behavior, clean separation of data lookup and runtime logic, and compatibility with Blueprint-driven instancing.