Item definition Example: Bow
We go to ItemDefinition, and add a new fragment_CraftItem
A) TimetoCraft: 1 (seconds to craft)
B) StackRewards: 1 (Only one bow we will get when crafting it)
C) Struct, we add two items to the Array.
1> ItemDefinition: ID_Tree, Quantity: 3
2> ItemDefinition: ID_Rock, Quantity: 2
Ready, we already have our bow configured.
Now it remains to assign it to a crafting Widget.
W_CraftMenu has a variable, called AllItemDefinition, where you have to load your ItemDefinition, if you want it to appear there.
If not, you can look at the different abilities that exist, “GA_Toggle_WorkStation”, and in the variable, “ItemDefinition”, add the bow there.
Lastly, we need a more detailed description of the item.
For example, is it a short-range bow, made of oak wood)
For that, we need to go back to the item definition of the arc, and add a new ItemBasic fragment and complete
UPROPERTY(EditAnywhere,BlueprintReadWrite, Category = “Basic Fragment”)
EInventoryItemCategory Category; // Utilizar elenumerador para la categoría
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = “Basic Fragment”)
FText DisplayName; // Nombre para mostrar
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = “Basic Fragment”)
FText Description; // Descripción del ítem
Where Category: is an enum, where we define the different categories that exist.
It can be weapons, tools, ammunition, etc.
DisplayName: Simply the name
Description: “A short-range bow made of bow”
Done, with this brief tutorial you can now configure all your items