top of page

ARPG | Template

Summary

This page aims to provide insights into the creation of my Action RPG project that was used to create my other portfolio piece, Chronowarden's Sanctum.

​

This template was created by me, using the Animation Sample project as a base. At its core, the template features:

  • A melee and 4 unique abilities created with GAS

  • 3 unique enemy types

  • A stat system with both primary and secondary stats

  • An XP system for leveling up

​

If you're interested in learning more about the creation of the template, keep reading. For a deepdive into a level created with the template, see Chronowarden's Sanctum.

​

I'd like to give credit to MrButier on Youtube whose tutorial was the foundation for my stat component.

Breakdown

  • Developed over 4 weeks half time

  • Unreal Engine 5.4​, Game Animation Sample Project

  • Asset details

    • Icons from WoWhead

    • Character models & Animations from Mixamo

    • MegaMagic VFX bundle for magic effects

Goals

  • Create an ARPG template with a system for scalable primary and secondary stats

  • Explore Unreals Gameplay Ability System (GAS)

  • Learn more about Behavior Trees

  • Learn more about UI (Widget Blueprints)

The Stat System

Defining its functionality

At its core, my stat component is set up as a blueprint actor component. This allows me to add it to both the player and enemies. It contains a set of main stats, like strength, intelligence and experience points, and secondary stats like attack speed, cast speed, and health regeneration. The secondary stats were made to scale with primary stats.

StatMana&Health.jpg

Tables, Enums & Structures

I used a combination of Data Tables, Enumerators and Structures for my stat component. A Data Table was used to set xp requirements and stat gains for level ups, enumerators were created for making lists of the stats themselves, allowing them to be accessed as drop-down options within my blueprints. The structures were used to call certain stats when setting their scaling multipliers. 

Establishing the stats

I decided to include both primary and secondary stats. For my choice of stats, I went with commonly featured stats familiar to anyone who's played ARPGs before. One outlier might be my "faith" stat, which I included as an alternative main stat as I thought it suited the paladin archetype well thematically.

StatsCombined.jpg

Making it scalable

Through the help of structures and blueprint nodes in my stat component, I managed to create a setup that allowed my secondary stats to scale based on the primary stat the player character has. Strength granting health and regen, agility granting attack speed etc makes the stat system scalable and sets it up for a potential introduction to items.

StatMultipliers.jpg

Experience & level-up

By using the xp variable in my stat component, I could assign the amount of xp gained from killing a specific enemy type. For each level, the character gained primary stats (defined in a data table), which in turn scaled their related secondary stats as well.

Affecting stats with functions

A crucial part of the stats setup was making them easy to access and affect from other blueprints, such as the player, enemy, or even future game mechanics/level ingredients. To enable this level of interaction, I added functions to the stat blueprint component for adding, subtracting and setting values for both primary and secondary stats.

StatsCombinedScreenshot.jpg

Player abilities

One of the goals of this project was to experiment with the "Gameplay Ability System" (GAS) in Unreal Engine. Each of my abilities were set up as gameplay abilities, having their code defined there rather than in the player blueprint. The pro's of using GAS was not only a cleaner player blueprint  - it also allowed me to explore common ability cooldowns and more.

 

Whenever I play games like Diablo or Path of Exile, I usually default towards the holy warrior archetype, such as paladin & crusader, so I knew that I wanted to create something similar.

​

For the design, I had the following things as my criterias

  • A way to generate resources (default attack and passively)

  • A close to spammable AOE (area of effect) for dealing with monster packs

  • A movement ability with a cooldown

  • A defensive ability with a cooldown

  • A stronger AOE ability with a cooldown

​​

With these criterias, I began iterating on my abilities. Below is a breakdown of the 4 main abilities (default attack excluded).

Spammable AOE

My main AOE ability, Holy Explosion, was created based on the available niagara effect I had from one of the asset packs. The design intent for this ability was to be the player's main ability, used for clearing packs of monsters as long as they had the mana to cast.

Movement Ability

The movement was a simple attempt at copying the teleport of Diablo II. By checking for hit result under cursor, I teleported the character to its location, adding a small camera lag speed in an attempt to make it feel less snappy.

Defensive Ability

For the defensive ability, I settled for a simple shield that blocked all incoming damage during its active period. This was achieved by a simple boolean, checking whether or not the shield was active before applying the code for receiving damage.

AOE with cooldown

My cooldown AOE was inspired by Diablo II's "hammerdin" as well as Last Epoch's interpretation of it. I settled for a simpler version of it however, creating a ring of hammers orbiting the player, dealing damage over time to any enemy overlapping a sphere collider.

Enemy behavior

Combat foundations

One of the goals of the project was to create a varying combat experience through multiple enemy types. To keep it simple, I went with 3 typical archetypes for an ARPG - a "grunt" (easy melee enemy), "caster" (ranged projectile enemy) and "brute" (harder melee enemy with a special attack). The functionality was mainly set up in a master enemy blueprint, including trace attacks, and applying damage from projectile and slam attacks. Timing for dealing damage in e.g the melee or slam attack was defined using "animation notifiers" in the animation sequence.

EnemyVariations.jpg

Grunt | Basic melee

My grunt enemy uses a basic zombie model. It has a very simplistic behavior - simply trying to move towards the player, and performing a melee attack while in reach. This enemy is the bulk of my monster packs, with a purpose of bringing the player satisfaction while AOE'ing them down, while still posing a threat if left untouched.

Defining behaviors

I defined all the enemy behaviors in one single behavior tree. The tree uses blackboard conditions to determine which enemy type it is, a selector for determining combat state, and then either a sequence or selector to determine combat action. For caster & grunt, who just altered between moving to (grunt) or away (caster) from the player and a single type of attack, a sequence was enough. The brute however needed a sequence to determine between movement or attacking, and then a selector to choose which type of attack to perform, if attacking.

BT_Overview.jpg

Caster | Projectile ranged

To keep it simple, I decided to go with a projectile caster. The casters base behavior is to cast its projectile, which then occurs a random cooldown between a set interval using "random float in range". While the ability is on cooldown, the caster runs away from the player until they cast again, in order to keep their distance.

Brute | Advanced melee

For the brute, I wanted to feature a deadly slam attack. Similar to the caster, I set it up as a cooldown-based ability. However, instead of running away when the ability is on cooldown, the brute instead defaults to chase the player, using melee attacks until the slam is available once again.

Designing Level Ingredients

Utilizing my systems

Since I had a semi-advanced stats system with primary and secondary stats in my template, I wanted the gameplay mechanics to make use of my stats. With the way I had set up the systems and functions, it was easy to call for e.g an attack or cast-speed slow, as well as removing the player's health over time by casting between the mechanics' blueprint and the player character.

Player Gym

When creating my portfolio piece, Chronowarden's Sanctum, I knew from the start that I wanted to create a mechanics-heavy experience. I prioritized making rough prototypes of all my potential mechanics during the first week of production. This helped me lock in mechanics and commit to my ideas at an early stage, leaving room for iterations and feature cutting later if needed. Mechanics created this week included the quicksand and sundial trap which was cut at a later stage.

Buff Shrine

A common level ingredient for any ARPG is the shrine - an interactable object that grants the player a buff for a period of time. I kept my shrine simple by simply making one version - a mana regeneration shrine. However, it would've been easy to create variations of it by simply replacing the mana stat in the blueprint with any other secondary or main stat of the player character.

Cursed Shrine

A shrine with a twist! I wanted to add an element of surprise to the shrine interactions, an idea simply copied from Diablo IV's cursed shrines and chests. To achieve this, I added a spawn functionality to the shrine. I exposed the variable on the number of enemies to spawn, and created a weighting system for choosing which enemy type to spawn (50% chance for zombie, 25% for caster or brute respectively). This helped achieve a variation in the encounters experienced at each shrine.

Reflections

Overall I'm satisfied with the result of my template. It filled the criterias that I was after, and it enabled me to create an ARPG experience for my portfolio which was the ultimate goal (Chronowarden's Sanctum)

​

While I only created one player archetype for this project, I'm happy with my choice of creating a set of stats that are suitable for other types of characters as well. This means that the template would be easy to build further upon if I ever find the interest to add more characters, or maybe even an item and inventory system.

​

One thing that I would've changed is the design of the movement ability. In this template, I left it as a simple teleport, similar to that of the Sorceress in Diablo 2. In hindsight, I think that a shield rush ability would be more suitable to my paladin archetype. In addition to this, the teleport was also quite buggy when used on an Unreal Landscape.

bottom of page