-
Notifications
You must be signed in to change notification settings - Fork 1
Extending Plugin ‒ Creating New Items
To create new items, follow these steps:
-
Create a primary data asset inheriting from
GameplayItemDefinition
. Configure item properties and extend functionality using fragments. Consider fragments for specific behaviors like crafting or smelting. -
Choose the item instance class to use when instantiating the item. Note that an item definition may exist independently for identification purposes, while the item instance is created when the item starts existing (e.g., in a player's inventory or as a dropped pickup).
-
Extend fragments for added functionality or behaviors (e.g., crafting, smelting), adjusting settings as needed.
Creating equippable items follows a similar process:
-
Create an item definition for the equipment, ensuring it has the
Equipment
fragment added. -
Specify the slot type where the item should be placed to be equipped and the equipment definition blueprint class to be used.
-
Create a blueprint class inheriting from
GameplayEquipmentDefinition
. Assign it to the equipment fragment inside the item definition. -
Set up the equipment definition, specifying the class to use when instantiating the equipment item instance (typically
GameplayEquipmentInstance
unless modified or extended eg. RangedWeaponInstance or MeleeWeaponInstance etc...). -
Assign actors to spawn for this type of equipment, indicating sockets for attachment and applying relative transforms if necessary. Customize the
GameplayEquipment
blueprint class for additional features like materials, meshes, particle effects, etc. -
Create an ability set for the equipment to grant abilities, gameplay effects, or attribute sets. Assign this ability set to the equipment definition.
-
Equip the item by adding it to your player inventory and placing it in the required slot. For hotbar equipment, activate the slot to use the equipment.
Note: Ability sets are granted upon equipping an item and tracked by the equipment system, revoking them upon unequipping the item.