Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Extending Plugin ‒ Creating New Items

Nazake edited this page Apr 27, 2024 · 4 revisions

Creating New Items

Tutorial

Watch On Youtube

To create new items, follow these steps:

  1. 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.

  2. 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).

  3. Extend fragments for added functionality or behaviors (e.g., crafting, smelting), adjusting settings as needed.

Creating Equippable Items

Creating equippable items follows a similar process:

  1. Create an item definition for the equipment, ensuring it has the Equipment fragment added.

  2. Specify the slot type where the item should be placed to be equipped and the equipment definition blueprint class to be used.

  3. Create a blueprint class inheriting from GameplayEquipmentDefinition. Assign it to the equipment fragment inside the item definition.

  4. 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...).

  5. 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.

  6. Create an ability set for the equipment to grant abilities, gameplay effects, or attribute sets. Assign this ability set to the equipment definition.

  7. 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.