134 lines
3.8 KiB
Markdown
134 lines
3.8 KiB
Markdown
|
|
[Home](../Home.md)
|
|
|
|
# Create Blueprint Character
|
|
|
|
- [Create New Enemy](#create-new-enemy)
|
|
- [Create Playable Character](#create-playable-character)
|
|
- [Character Standards](#character-standards)
|
|
|
|
## Create New Enemy
|
|
|
|
### 1 - Create the character blueprint
|
|
|
|
- Create a subclass of `BP_AuraEnemy`
|
|
|
|

|
|
|
|
### 2 - Base Character Setup
|
|
|
|
[Setup the base character values](#base-character)
|
|
|
|
### 3 - Assign a behavior
|
|
|
|
- Assign a controller class
|
|
|
|

|
|
|
|
- The controller contains the behavior tree that automatically runs. To make a custom behavior, refer to the [chapter](../CreateNewBehavior/Content.md)
|
|
|
|
### 4 - Setup the drop table
|
|
|
|
There is a variable in the `BP_AuraEnemy` that child classes can fill to define a drop table
|
|
|
|

|
|
|
|
The key is the class that spawn when character dies and value is the probability of spawning.
|
|
Any actor class can spawn
|
|
|
|
## Create Playable Character
|
|
|
|
### 1 - Create the Character Blueprint
|
|
|
|
- Create a subclass of `BP_PlayerCharacterBase`
|
|
|
|

|
|
|
|
### 2 - Base Character Setup
|
|
|
|
[Setup the base character values](#base-character)
|
|
|
|
## Base Character
|
|
|
|
### 1 - Setup Mesh and Animations
|
|
|
|
- Create an animation blueprint for the mesh.
|
|
|
|
Make a new ABP or instanciate the template animation blueprint or use your own
|
|
|
|

|
|
|
|
- Setup the character mesh and its animation blueprint. Also pick a weapon mesh if you need one
|
|
|
|
- Adjust the mesh position and capsule size
|
|
|
|
- Create the hit react animation montage
|
|
|
|
- Setup combat animations
|
|
|
|
Fill up the map of combat montages in the character defaults combat interface
|
|
|
|
All possible key are sub tags of `CombatMontage.*`
|
|
|
|
A reaction to `CombatMontage.HitReact` animation is required
|
|
|
|

|
|
|
|
> To use multiple animation for a same tag, we need to override the behavior of the `GetCombatMontage` method
|
|
|
|
### 2 - Set the combat socket locations
|
|
|
|
- override the function `GetCombatSocketLocation` and setup socket for each subtag of `CombatSocket.*`
|
|
|
|

|
|
|
|
### 3 - Handle death behavior
|
|
|
|
- override the event `Die` that executes on the server.
|
|
|
|
- for enemies, the parent class will execute the multicast event `M_HandleDeath`. We can override it to defined a custom behavior when the character dies
|
|
|
|

|
|
|
|
- The parent call will manage ragdoll, weapon drop, movement stop and remove health widget
|
|
|
|
- The custom implementation would typically play a death sound and dissolve meshes
|
|
|
|
### 4 - Character Class Info
|
|
|
|
- Create data asset blueprint from `CharacterClassInfo`
|
|
|
|

|
|
|
|
- Set the name of the class
|
|
|
|
- Set the class tag to a subtag of `CharacterClass.`
|
|
|
|
- Add base effects
|
|
- Subclass of `GE_StartingAttributes_Base` to define primary attributes scaling
|
|
- `GE_Character_SecondaryAttributes` to scale secondary attributes
|
|
- `GE_Character_PassiveRegeneration` to grant passive health and mana regeneration
|
|
|
|
- Add the base abilities
|
|
- The `GA_HitReact` Ability to have a reaction to damages
|
|
- Any other ability you will need
|
|
|
|
- Add starting effects
|
|
- `GE_RestoreMaxLife` to grant full life to the unit when starting game. As the maximum life is only calculated after starting attributes is granted, all unit start with 0 hp.
|
|
- `GE_RestoreMaxMana` if the unit has mana
|
|
|
|

|
|
|
|
- Assign the data asset to the character blueprint
|
|
|
|

|
|
|
|
|
|
## Character Standards
|
|
|
|
Make sure to create sound for all situations
|
|
|
|
- Footsteps
|
|
- Getting hurt
|
|
- Death
|