Level Up a Game Character
To achieve the effect of leveling up a character, you will need the following:
Create a new character, similar to the one you want to level up, but with better statistics.
Create a Game Character Fusion and add it to the Fusion Manager.
We will create an improved version of the Witch created in Create a new Game Character:
1. Add the Witch prefab to the scene. To differentiate it from the original we will change the scale to (1.2,1.2,1.2), and rename it to Witch Lv2.
2. Change the character's Original Stats improving them with respect to the original:
- Health: 750
- Magic Damage: 80
- Defense: 10
- Magic Defense: 10
- Critical Probability: 0.2
Change the scale and rename it to Witch Lv2. Then improve the Original Stats.
3. Drag the Witch Lv2 to the project to create a new Prefab. Be sure to create it as Original Prefab.
Create a new Prefab of Witch Lv2.
4. Following similar steps to Create a New Game Character, right click on the prefab, and select "Auto-Battle Framework/Create Shop Character".
[Create a new Shop Character of Witch Lv2.
5. Select the new created Shop Character (Witch Lv2ShopItem.asset).
- Enter an Item ID that matches the Shop Character with the one level lower version of this character. It is very important that they match, or errors may occur with the Traits. Enter "Witch" to match both Shop Characters.
- Select a sprite for Item Image (we will use the witch-cap). This image will be displayed when available for purchase in the store.
- In the same way, select another sprite for Description Image (we will select the witch-cap again). This image will be displayed when the character's statistics panel is displayed.
- Add an Item Description if desired.
Select the images used in the shop and character description. It is important that the Item Id matches that of the lower-level Shop Character.
6. Since the same model is used, delete the generated Animator Override Controller (Witch LV2AOC). Select the prefab Witch Lv2, and in the Animator Inspector, attach the Animator Override Controller of the original witch (WitchAOC).
Attach the Animator Override Controller of the original witch to that of the level 2 witch.
7. Right click on the Witch prefab, select "Auto-Battle Framework/Create Fusion Level Up". This will create a new Game Character Fusion, with 3 Shop Character of the original witch in the Characters To Fusion list. This number can be changed in the Scriptable Object options, found under "Auto-Battle Framework/Scripts/Editor/Settings/AutoBattleSettings.asset".
Create a new Game Character Fusion with the list of Character To fuse already prepared.
7. Add the Shop Character of the Lv2 Witch to the Fusion Result field of the Game Character Fusion.
Game Character Fusion is now ready after adding the Fusion Result.
8. Add the Game Character Fusion to the scene's Fusion Manager, under "Auto-Battle/Fusion Manager".
Add the Game Character Fusion to the Fusion Manager.
9. Test the game. Once three witches are gathered, they will automatically be eliminated and a level 2 witch will be created.
The Witch character now can be leveled up! To differentiate them, note that the level 2 one is bigger, and has better stats than the level 1 one.