Skip to main content

Payload Template Data Asset

InvPayloadTemplateImage

This asset type's main objective is to initialize item's payload object to initialize by giving it a template for the object's initial values.

They can be:

  • Values can change at runtime (Rustyness, condition, wetness etc.)
  • Sub invnetory system of the item.

By default it only creates the sub invnetory. By giving you a virtual inventory view that holds Item Static Data instead of the actual objects.

Default Payload Template Data Asset

InvPayloadTemplateExample

PropertyTypeDescription
Inventory TemplateFTemplateInventoryMain Struct for actual inventory struct to be created.
Template Inventory SectionsFTemplateInventorySectionHolds the relevant data for the section that will be actually created.
Section TagGameplayTagType of the section. Will be relevant for if and item of type can enter the section.
Start At CoordsFIntPointOptional It is used in Template Inventory for creating section at selected coords from top left of the section. Other inventory types may not need this.
Section Grid SizeFIntPointThe inventory size of the section. When editing Items array will be resized automatically by the result of x * y, but holding the values previously exists.
ItemsItemStaticData = []The array that will create the initial items of the inventory. Indexes are used for where the item will be created (at which index, it is visible at template inventory and GetDebugStringFromInventory). If overlapping items are found, it will be logged in the Output Log of the editor.
tip

Sections in the inventory, could be think of like maps but they are not. There can more than one section with the same tag in one inventory, and they can be replicated unlike maps. But other than that, you can find the sections with tag, add a section or change its content like in maps.