This feature is in an Experimental state, so you can try it out, provide feedback, and see what we are planning. You cannot publish a project that uses the Custom Game Items and Inventories system at this time.
Please keep in mind that we do not guarantee backward compatibility for assets created at the experimental stage, the APIs for these features are subject to change, and we may remove entire Experimental features or specific functionality at our discretion. Check out the list of known issues before you start working with the feature.
The Custom Items and Inventories system uses inventories and sub-inventories to compartmentalize items by sorting, adding, and retrieving items. To add a component to your entity, refer to Working with Entities and Components.
Entities are only considered items if they have an item_component. Without one, entities will not be added to inventories properly as well as Custom Item and Inventories functionality may be broken.
References to an “item” are referring to an entity with an
item_component.References to “inventories” are referring to an entity with an
inventory_component.
Class Description
The fort_inventory_component is a subclass of the inventory_component. Its purpose is to provide compatibility between Fortnite gameplay and the new Custom Items and Inventories system. By default players are given a Root Inventory, and then a number of specialized subclasses are added to the Root as sub-inventories:
| Base subclass for all the other Fort Inventories. Also used to hold the Edit Mode tool. Required for Edit Mode. |
| Holds the build recipe items. Required for Edit Mode. |
| Holds equippable Fortnite items like weapons and consumables. Filters items by WorldItem item_category. |
| Filters items by the Collectible item_category. |
| Stores the default Fortnite resources, wood, brick and metal. Filters items by the Resource item_category. |
| Stores Fortnite ammo types. Filters items by the Ammo item_category. |
| Holds a single item instance. Only allows items with the Trap item_category. |
| Stores any item with the Currency item_category. |
| Holds the Player Harvest Tool. Required for Edit Mode. |
These components provide an approximation of the Fortnite: Battle Royale inventory behaviour. When Items added to the Root Inventory they are sorted and placed in specific SubInventories, and can be retrieved by searching for a specific subclass.
Additionally the Custom Items and Inventories system delivers a UI similar to Fortnite. Each UI element represents a counterpart fort_inventory_component.
The Itemization UI looks different to this but has the same sections.
See Components for a complete list of itemization components.
You can access the fort_inventory_component from the component dropdown list. For more information, check out the fort_inventory_component API reference from the Verse API.
Example
Once Custom Items and Inventories has been enabled, a new property is exposed in the Island Settings device Custom Inventory Configuration. The default configuration provides all the fort_inventory_components that make up the Fortnite Inventory.
Like other Scene Graph components, the fort_inventory_component can also be added and removed through Verse.
Below is a script for getting specific fort_inventory_components and reading the items inside them. Since they inherit all the functionality of the
base inventory_component, you can write your own systems to leverage Custom Items and Inventories alongside Fortnite Items.
# Copyright Epic Games, Inc. All Rights Reserved.
using { /Fortnite.com/Devices }
using { /Fortnite.com/Itemization }
using { /Verse.org/SceneGraph }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Itemization }