Competitive Online RPG Prototype – #002


I figured the project has advanced enough to justify another devlog update! So let me jump right into what happened the past few weeks.

State Of Development

  • Players now have teams they choose before joining a server; they can also host servers as well as find them through a server list (currently using the steam online subsystem, also works in LAN)
  • Skills can recognize these teams and pick specific targets (as seen in the video: one pawn changes the team and is damageable, before it did not get any damage)
  • Teams can attempt to capture the crystal as well as hold and lose it to other teams (team 1 holds the point, team 2 stands on the point and de-captures it)
  • As you can see from the header image, there is also a new level layout to try out the substances!
  • The skill system has been modified; read a more detailed description below!

Skill Blueprint Update

Skill blueprints are now more advanced. Currently, there are two projectile types: ProjectileBase and InstantEffectBase. They both inherit from the C++ class ABaseSkill, where all the basic properties for a skill are declared: mana cost, cast time, skill brush (to use in UI) and so on. These properties are left alone in these base-blueprints.

ABaseSkill also implements the ISkillInterface. In here, two functions called PreCast and ExecuteSkill are declared. Every skill needs to implement these as they are the two core functions. They are called “ExecuteSkill” and “PreCast” and are extended in blueprints to account for more advanced logic. While an InstantEffect merely needs to apply damage, heal or an effect to a target, a projectile also needs to spawn the projectile and set its speed.

Here’s an example of a base skill, the InstantEffectBase. It just takes the damage values, applies them to a target and then spawns an effect if needed. I will talk about how effects work in the next section.

Blueprint of InstantEffectBase
ABaseSkill is defined in C++ with basic functions and properties that are overridden or extended via blueprint.

Now if I wanted to create a custom skill based on InstantEffect, I simply create a child blueprint of InstantBaseEffect and add calls to the respective parent functions. Here is how a simple resurrection spell called “Ressurection Signet” is implemented:

Event Graph of Ressurection Signet's blueprint
Extended BP_RessSignet blueprint (Event Graph)

Since I use this base skill approach, I simply add all the required properties on the right, such as the skill’s name and description, and a healing value (so that the ressurected player does not start at 0 hp!). In the event graph, I call the parent function of ExecuteSkill so that the standard logic is applied. To get the ressurection effect, I created a character state “Revive” that tells the AnimationBlueprint to start the getting up montage. At the end of the montage, the player regains control of the pawn and can play again.

Extended BP_RessSignet blueprint (PreCast function)
Extended BP_RessSignet blueprint (PreCast function)

The PreCast function is used to determine whether a skill can be casted or not. The standard parent call will return true if the player is within range of the target and has enough mana. For this skill, we also need to check whether our target is actually dead. So we add the functionality in the derived blueprint.

Skill Effects Update

If you take a closer look at the blueprint screenshots above, you will notice that there are properties in the “Skill Effect” category. These are longer-lasting effects such as applied deregeneration or bonus damage. Since they can have logic at runtime, they are seperate Actors defined in ABaseEffect. Very similar to the skills, they implement an interface called IEffectInterface. In here, the two relevant functions are called “StartEffect” and “EndEffect”. These two skills will apply and remove effects from the target’s actor, and the Event Graph of the respective effect will take care of any runtime logic that needs to be applied (such as a check for pawn’s movement or state).

To add an effect to a skill, all I need to do is check the Causes Effect checkbox and give an effect to apply as well as effect duration and whether or not all hit targets get the effect, or just one.

Fireball with skill effects
Fireball blueprint, based off of ProjectileBase hence the additional function calls. Note the effect settings on the right!

The respective effect then looks like this;

Burning condition blueprint
Blueprint for burning condition.

In the properties tab, you can see properties for gameplay rules such as cleansing skills or effect removal via duration checks. StartEffect here is an implementation of what happens when the effect is applied. And EndEffect is then just the reverse logic of whatever happened in StartEffect!

Each player pawn has an EffectsTable to keep track of what kind of effects are currently applied to it. Other actors can modify those via adding or removing effects. This whole system is still very basic, but so far it gets the job done and by introducing more complex skills to the game I hope to advance the system more and more.

You can see the burning effect “in action”, but still without VFX, in this video.

Game Mode Upate

As already mentioned, there are now player teams that you can choose to join before joining a server. The game mode has been modified to account for that as well as the basics for a simple king of the hill logic!

Team 1 holds the point, team 2 attempts to de-capture.
Team 1 holds the point, team 2 attempts to de-capture.

When players enter the range of the crystal, indicated through the 4 cones, the crystal will check who dominates the point. The dominating team is the team with more people within range. If all teams are equal, no team is dominating and nothing happens. If a team is dominating and another team is already holding the point, the dominating team will de-capture the point and then attempt to capture the point itself. The holding team will get points for every 10 seconds it holds the point.

Currently there is no win or lose condition; this will be part of the next finalizing step together with automated respawns and a preperation phase before the game starts. But the basic logic is working already!

What’s next?

In addition to the finalization of the game mode, there are many visual effects and skills to be implemented. Every class of skill (magic, healing, physical and so on) will get a unique animation and VFX so that all players know what is going on. The UI will also be modified to reflect that. Same goes for the skill effects that have to be easily distuingishable for all players.

I plan to have the first batch of skills with basic animations and visual effects ready around late August. That includes 3 basic player layouts: a small-range warrior, a healer and a magician. No flexible/replaceable skills yet as well as no character attributes. That is planned for the next iteration as the current plan is already ambitious enough. 🙂 Once the game mode is finalized, the player layouts are introduced and everything is stable enough, I plan to do a small play session to try out if everything breaks over the internet or the system holds up.

Another topic that I need to start working on is cheat prevention – currently it is very basic. The server is authorative, clients are not allowed to do anything without it, but there are clear vulnerabilities already. I know I said that functionality comes first, but since Unreal Engine offers many possibilities to implement custom anti-cheat methods, I want to utilize them as early as possible so that I do not get into trouble later.

Thats all for now!