In this Tutorial we will increase the Level of the Chest Equipment.
For increasing the Level, the Player needs a certain Amount of Items and it will cost something.
Also the enhancement can fail.
The Chest Equipment will have Level 0 till 9.
Each Level contains different Stats.
1. First of all add to your already created Item Data Table (Chest Equipment - In this Tutorial created) 9 Elements to the EnhancementPerLevel Array.



This will set how much it will cost and how many Items are needed per Level of the Item.
For example if we use the first element (Number 1 at the Image):
From Level 0 to Level 1 the Player needs following:
EnhancementUppItems: Items, which will be removed, when upgrading.
Item: Set the Data Table of the needed Item - Using Example Upp Item.
Amount: How much of the Item is needed - 1.
Level: What Level the Item should have - 0.
CustomData: Read more!
EnhancementCost: Currency, which will be reduced, when upgrading.
CurrencyType: Type of the Currency - Bronze.
Value: How much of the Currency is needed - 1.
EnhancementChance: What Chance that the upgrading works.
If you put 50, it means 50%. So every second Time it will theoretically fail.
If you have 9 Elements, it means the Item does have 10 Levels!
2. Now you can add (if you want) some Stats for each Level the Item has.
So we need 10 Elements inside the Array StatsPerLevel.


I will explain the 9th Element as example:
Stats: each Element contains a Stat.
1st Element - Increases the Health of the Player by 200.
Key: Contains the StatType of the Item - I will use Stats.Secondary.Health for the Health Stat.
Value: The Value of the Stat - I will use 200.
2nd Element - Increases the Health Regeneration by 10%.
Key: Stats.Secondary.HealthRegeneration for the Health Regeneration Stat.
Value: 10
3. Now you can go to your Player BP to the Details Panel of the Inventory Component and set the Variable Subtract Level if Enhancement Fails.
This Variable will tell, how many Level of the Item is reducing if the Enhancement fails.

1 means, if the Player tries to increase the Item from Level 8 to 9 and the Enhancement fails, the new Level of the Item will be 7.
4. Without PlayerTemplate:
Add the Interface SP8_BPI_IsItemEnhanceable to your Player BP (Class Settings).
5. Inside your Player BP:
Without PlayerTemplate:
Open the Interface Function SP8_IsItemEnhanceable.
With PlayerTemplate:
Overwrite the Function of the PlayerTemplate SP8_Overwrite_IsItemEnhanceable.

Return true inside this Function.
Of course you can customize this Function if needed.
The Inventory Component checks following:
- If the Item exists in the Inventory.
- If the EnhancementPerLevel Array contains the current Level.
- If the EnhancementPerLevel Element of the current Level contains a Chance higher then 0.
Important: The Function isItemEnhanceable will be called before doing those checks!
Now you are able to call EnhanceItem and if the Item can be enhanced, it will try to enhance it.