Welcome.
So now we're affecting the enemy's health with a gameplay effect.
We know that this is just a placeholder gameplay effect as we want damage to be related to all of our
other attributes to make combat a true RPG experience.
We also saw that our character is just using the default attribute values that aura starts out with,
but in a real RPG, different character types start out with different attributes, and these character
types are often separated into different character classes.
Now we're not talking about classes in a programming sense.
We're talking about classes in an RPG sense where different character classes have different strengths
and weaknesses.
So to properly initialize our enemy attributes, we should give some thought to how we plan on doing
so.
Aura will soon be leveling up and getting stronger.
We also have enemy class level, a member variable, and for an enemy to spawn in at a different level,
that should mean something.
A higher level enemy should start out with higher attribute values.
So we need to think about how to initialize attributes for a character based on its character class.
For this project, I'd like to have three separate character classes Warrior, Ranger and Elementalist.
Your RPG games you plan on making may have more classes than this, but for this course, three is plenty
and it gives you enough of an example that you can expand upon this with more classes if you like.
The warrior class will be mainly concerned with melee attacks, sword swings, spear thrusts.
That's what melee means.
Rangers will use ranged attacks such as a slingshot, and the Elementalist will use magical spells.
Aura herself is an elementalist as her attacks are all magical spells, so our characters should have
a way to easily set their character class and that should determine what their starting attributes should
be.
Their starting level should also affect their starting attributes.
Loading in a character with a certain character, class and level is something that really pertains
to enemy characters.
Aura is going to start off with the base stats unless we're loading her progress in from disk, in which
case she'll start off with the stats that she had when she last saved the game and we'll get to that
later on in the course.
So we need to think about how we're going to initialize an enemy character's starting attributes and
for that matter, its starting abilities too.
We'll want a way to distinguish between different character classes in an RPG sense.
We could easily create an enum with enum constants for each character class.
We could call this a character class, for instance.
Now we'll need some sort of asset that stores data for each class and the values for its default attributes
based on its level, a data asset comes to mind.
This can be our character class info.
Now in the data asset, we'll have data for each character class.
That data can be in the form of a data table, another data asset or really anything else we decide.
Now we've seen that gameplay effects can use curve tables to scale effect magnitudes based on level.
Curved tables are nice because they're a single asset that can have multiple curves.
So we could create a curve table called primary attributes, for example, and it could have curves
for each of the primary attributes based on level.
So each character class specified with our character class enum could have a curve table with curves
for each of its primary attributes.
Storing the starting values that can scale up as an enemy's level increases.
Now we'll also want to apply a gameplay effect to initialize these attributes.
We'll also want gameplay effects to set the secondary attributes that are based on the primaries and
also an effect for the vital attributes once all other attributes have been set.
And finally, any abilities that the enemy character class has should also be in this data asset so
those can be granted at the beginning of the game.
Now, some of the enemies may have the same abilities and effects.
For instance, we may create a death ability or a hit react and each enemy will share those ability
classes.
So the data asset should also have any abilities and gameplay effects that all enemies should be given.
So now we have an idea of how we wish to initialize our enemy attributes.
We have a game plan.
First, we need to create a data asset that stores information for all character classes.
We can call this character class info.
Next, we need an enum that has constants for each character class type.
We can call this a character class.
Then we'll want a curve table that stores curves for each of the primary attributes.
We can have a different curve table for each character class, such as Warrior Primary attributes,
Ranger primary attributes, and Elementalist primary attributes, for example.
Now we need gameplay effects to apply the primary, secondary and vital attributes for our enemies.
We also need an array of abilities that all enemies will share and an array of shared effects as well.
And we'll also have arrays of abilities that are unique to each enemy.
These will be empty for now.
And finally, we need a function to call that can take in the data asset and then initialize these attributes
using that data asset.
This function could be on our aura ability system library and it can take in the data asset, the ability
system component and the character's level, and it can apply all of the initial gameplay effects to
initialize the character's attributes.
So we know the next steps to implement a character class system.
We'll implement these in the videos to come.
I'll see you soon.