Inventory and crafting API reference

Compact map of the item and recipe catalog and of the fields that carry ids. See Inventory system and Crafting for how they work together.

Ids

Kind Id Of
PulseItem PulseItem:<name> UPulseItemDefinition and every subclass
PulseRecipe PulseRecipe:<name> UPulseRecipe
PulseRecipeBook PulseRecipeBook:<name> UPulseRecipeBook

The id is FPulseDefinitionId of PulseFoundation in the API and FPrimaryAssetId (the same type and name) in replicated and saved fields. The name is the object name of the definition, for assets and for definitions made at runtime alike.

Item catalog (Items/PulseItemCatalog.h)

C++ (Pulse::Inventory::Items) Blueprint (Pulse\|Inventory\|Catalog)
MakeItemId(Name) —
GetItemId(Definition) Get Item Id
FindItem(Context, Id) Find Item
LoadItemSynchronous(Context, Id) —
LoadItem(Context, Id, Done, Timeout) Load Pulse Definition (PulseFoundation)
GetItemIds(Context) Get All Item Ids
RegisterItem(Context, Definition) Register Item
UnregisterItem(Context, Id) Unregister Item
ParseItemId(Context, Text) —

Recipe catalog (PulseRecipeCatalog.h)

C++ (Pulse::Crafting::Recipes) Blueprint (Pulse\|Crafting\|Catalog)
MakeRecipeId, GetRecipeId, MakeRecipeBookId, GetRecipeBookId Get Recipe Id, Get Recipe Book Id
FindRecipe, FindRecipeBook Find Recipe, Find Recipe Book
LoadRecipeSynchronous, LoadRecipeBookSynchronous —
LoadRecipe, LoadRecipeBook Load Pulse Definition (PulseFoundation)
GetRecipeIds, GetRecipeBookIds Get All Recipe Ids, Get All Recipe Book Ids
RegisterRecipe, RegisterRecipeBook Register Recipe, Register Recipe Book
UnregisterRecipe, UnregisterRecipeBook Unregister Recipe, Unregister Recipe Book
ParseRecipeId, ParseRecipeBookId —

Fields that carry ids

Type Replicated or saved Resolved
FPulseItemInstance (stacks) DefinitionId Definition (not replicated) by the inventory
FPulseEquippedItem DefinitionId Definition (not replicated) by the equipment
APulseItemPickup DefinitionId (once) GetDefinition() before OnDefinitionReady
FPulseSimState_Pickup DefinitionId (SaveGame) when the pickup of the record spawns
FPulseItemUseState DefinitionId Definition (not replicated) before the use events
FPulseCraftingJob RecipeId Recipe (not replicated) by the crafter
UPulseCraftingComponent UnlockedRecipeIds (GetUnlockedRecipeIds) GetUnlockedRecipes()
FPulseCraftingRequest RecipeId (Recipe is not sent) by the server

Saved definitions (Save/PulseInventorySave.h)

Function What it does
ResolveSavedAsset(Context, Id, Path, Class, bOutMoved) The id through Pulse::Definitions first (checked: class and id), the path as fallback.
ResolveSavedItem(Context, Id, Path, bOutMoved) The same for items.
ResolveDefinitions(Context, State) Fills Definition of every stack of an FPulseInventoryState from its id; returns the stacks without an item.
GetSaveId(Asset) The primary asset id of a definition (no world needed).

Gathering values (PulseGatheringValues.h)

Function or type What it does
FPulseAdjustment_ResourceNode Adjustment of a node (or a rule by resource tags): harvests and tool tier bonus, yield and regrow factor.
FPulseResourceNodeValues Harvests, MinToolTier, YieldBonusPerTier, YieldFactor, RegrowTime as the node uses them.
MakeNodeContext(Node, Harvester) The context of a node for knobs and adjustments.
GetNodeValues(Node, Data, Context) The values from a tuning (pure); APulseResourceNode::GetNodeValues gives the ones in use.
GetYieldPerTier(Node, Values, Data, Loot, MaxTier) Exact yield of one harvest per tool tier (pure).
GetStageAfterRegrow(Values, Seconds), GetHarvestsAfterRegrow Stage and harvests of an exhausted node after some seconds (pure).

Merchant prices (Merchant/PulseMerchantTypes.h)

Function or type What it does
FPulseAdjustment_MerchantPrice Price factors by item tag, for one merchant or all (buy and sell).
GetBuyPrice(Definition, Offer, Purchases, Context, Data, bConditionsPass) Price with an explicit tuning (pure); without Data the tuning of the world.
GetSellPrice(Definition, Item, Count, Context, Data, bConditionsPass) The same for selling.
GetTuningFactor(Data, Definition, Item, bBuying, Context) Knob times the Merchant Price adjustments (pure).
UPulseMerchantComponent::GetDefinition The definition in use: the variant a Swap Asset of the tuning names, else Definition.

Crafting component

Function or property What it does
CanCraftRecipe(Recipe, Count, Station) Blueprint native event after the built-in checks; a failure refuses with the reason of the game.
bListCatalogRecipes Every recipe of the catalog counts as known and is listed by GetKnownRecipes.
UnlockRecipeById(Id), ForgetRecipeById(Id) Unlock or forget by id (authority).
OnRecipesChanged / OnRecipesChangedNative The known recipes changed.

PulseGameplay plugin documentation.

This site uses Just the Docs, a documentation theme for Jekyll.