Hey guys,
after having finished two series, one about a slot-based inventory system and the other one about a rpg quest system, i decided to continue with another and my community voted for an ability and skill tree system as the topic. What we are going to create will be similar to the combat and skill systems of almost every mmorpg, including famous titles like World of Warcraft, 4Story or Tera.
We are going to do this only using blueprints and free assets so everyone is able to follow along. If you are interested in the topic please have a look at the series and my channel UnrealGaimeDev - YouTube in general
Here is a link to the first episode in which we set up a custom character and import animations to use later in the series:
Today we continue with some preparation work by adding proper controls, such as moving with both, mouse clicks and w,a,s,d or looking around by holding down the right mouse button. Further we adjust the perspective of our camera to match those of mmorpg games.
This and the next episode will deal with adding a quite advanced health and mana system to our current project. Today we will just care about the visual representation of our stats and therefore add some progress bars to diplay them. However we will not just use the default bar which comes with the engine but a custom one that will be animated and able to display a second bar showing how much of our health or mana is going to be removed/added.
Having added a visual display for our stats in the last episode, we can now go ahead and add the basic functionality of our stat system. This time I will show you how to set that up using a new feature on the engine, which are blueprint maps. Also we already create most of the variables and functions that our system will need later on.
In order to wrap up our stat system, we add 2 additional features in this episode:
First we create some functions that will handle the regeneration of every stat which is set up to have regeneration enabled.
Secondly, we spice up the modification of a stat by including animations that will slowly in-/decrease the desired stat.
Before we can start to work on the actual implementation of some skills, we need to complete a bit of preparational work such as adding various damage types, elements and methods of spell casting. Also we already set up our various elements as well ast their weaknesses and resistances.
Before we will be able to work with the skill actor in the next episode, we need to build a slot widget, which will have an assigned spell that will be casted when clicking that slot. Also we set up a customizeable system that will generate hotkey rows for us.
In this episode we implement the core functionality of both casting spells and handling their cooldowns. We add a timeline to display the expiring cooldown and update a circular progress bar as well as a text to achieve the effect you see in most mmorpgs or mobas. Further we deal with pressing a key to use the spell assigned to it.
In this video, I will be showing you how to set up a casting bar displaying the name of the currently casted spell and how long the cast is going to take. Also we implement it so that the duration of the casting animation is defined by the CastingTime of the current spell stage and can therefore be modified when levelling up a spell.
In order to give our player more control over the skills on the hotkeys, we implement the ability to change their position in the hotkey bar using drag and drop. Additionally, we make it so that you can remove spells from their hotkey when dropping them somewhere on the screen.
To properly test our spells, we obviously need some enemies to fight against. So, in this video we start to set up our enemy class by building its animation blueprint, preparing some attack animations and already implementing simple patrolling logic. Unlike in the quest series, this time we create our AI entirely in blueprints without using any blackboards or behaviour trees.