• Register
Post news Report RSS Runewatch - Dev log #8

Welcome to our eighth dev log. Today we are going to show you how we create spells, their behaviours, and the tool we created to make them.

Posted by on

Introduction

Since the beginning, our plan for Runewatch was to have a wide variety of spells, so that in each game session it was possible to create different builds with different types of gameplay.

In Runewatch, we have over 50 spells, some similar but most with very different behaviors. We have spells that explode on impact, spells that bounce off walls, spells that cause status effects, etc.

For this, we needed to find a solution that would allow us to have control of all these aspects, and something that would speed up the process of creating spells. It was then that we started to develop a tool for this purpose.

Spell Creation Tool

newSpell


In the image above we have the tool created for the mentioned process. Although the fields are quite self-explanatory, we will explain them better in topics.

General

general


In these fields we have access to general information about the spell. This field is where we edit the name, tier and general description of the spell.

Spell Attributes

spell attributes


Spell Attributes fields allow us to select the spell’s element and mana cost.

Damage

damage


The Damage fields are the area responsible for all damage related attributes. Here we control the frequency at which the spell deals damage, its maximum duration, its area of ​​effect if it has one, the minimum and maximum damage limit and the delay for dealing damage.

Spell Type

spell type


These fields are also quite perceptible. This is where we control whether the spell is "One Shot Cast" or "One Shot Cast With Release", which means that the spell is cast as soon as we press the fire key or if it is cast only when we release the key. The remaining fields, as described, control the speed, cooldown and the maximum distance the spell reaches.

Prefabs

prefabs


In these fields we put the objects that contain the spell, its hit and muzzle. These are the objects that contain the spell colliders, the rigidbody (for physics), visual effects, etc.

Behaviours

behaviours


These are the crucial fields of the tool. Here, is where we differentiate the behavior of each spell. Starting with "Damage Behaviour", this is where we choose whether the damage the spell will contain is "Single Target" or "Area of ​​Effect". Then the "Status Behaviour", which is what will define whether the Spell applies status effect when it damages an enemy or when it is used in another situation (such as self-buffs). In the next field, we have the "Spell Behavior One Shot". This field is what really makes the spell unique, applying various behaviors specific to each one. We will explain better what happens in this field later in the post.

Behaviours Muzzle And Hit

behaviours muzzle and hit


These fields, like the "Spell Behavior One Shot", apply the behaviors when the spell collides (On Hit) or when it is cast (Muzzle).

Sounds

sounds


Finally, these are the fields where we control the projectile, muzzle and hit sounds. We can also associate different sounds for different impact surfaces, as seen in the "Surface Sounds" field.

Finished Spells Examples

We will now show four finished spells. We will show a video of each spell and how its fields are set in the tool. After the previous topics, the fields don't require much explanation, so we'll just focus on the behaviors of each spell, which are what really distinguishes them from each other (green rectangle fields).

Sparkle

sparkle


In this first spell, we can see five behaviors:

  • Behavior Forward, the most frequently used behavior that makes the spell move forward;
  • Behavior Homing, which makes the spell follow a target;
  • Behavior Apply Damage Single Target, also widely used, which tells the spell to simply apply the single target damage;
  • Behavior Stop Spell …, which orders the spell to stop as soon as it collides with any of the objects described in the behaviour;
  • And finally, Behavior Common Behaviours, which are some less important behaviors common to several spells.

By combining all these behaviours, the video shows the spell moving forward, while homing on a target, applying damage and stopping as soon as it hits it.

Wrath Of Thorns

wrathOfThorns


Wrath of Thorns is a One Shot Cast With Release spell, meaning the player can prepare the spell, and release it when ready:

  • Behavior Spawn Area Hover Effect On Floor, a behavior that shows us the area circle on the ground while the player is preparing the spell;
  • Behaviour Spawn Hit Aoe Hover Spell, which spawns the spell as soon as the player releases it;
  • Behavior Apply Damage Area Remain Active, which applies damage over a time interval while the spell is active;
  • Behavior Disable Projectile Max Time, which is a widely used behavior, which disables the spell after its max time.
  • Behavior Spawn Muzzle Prefab, which spawns the spell’s muzzle.

As seen in this spell’s video, this spell contains an area on the ground while the player prepares it. After the player casts the spell, the spell is cast and remains active for several seconds while dealing damage. This spell also has a Status Behaviour: Vulnerable, which is applied whenever a target is damaged, as you can see at the end of the video applied to enemies.

Light Dagger

lightDagger


Light dagger is another simple spell with unique behaviours:

  • Behaviour Forward, already explained above;
  • Behaviour Common Behaviours, already explained above;
  • Behavior Bounce On Wall Floor Hit 6, is a behavior which reflects the spell up to 6 times whenever it hits a wall or floor;
  • Behaviour Apply damage Pierce 3 Div 3.4, is a behaviour which instead of simply applying damage, it pierces an enemy up to three times, doing only 0.75x damage each it;
  • Behaviour Play Loop Sound On Projectile, a simple behaviour which plays the sound of the projectile in a loop.

As seen in the video, the spell moves forward while piercing up to 3 enemies and it also bounces on walls.

Firebomb

fireBomb


Firebomb is a powerful area spell which explodes on impact:

  • Behaviour Forward, already explained above;
  • Behavior Gravity, is a behavior that applies an X value of gravity;
  • Behavior Stop Spell …, already explained above;
  • Behaviour Apply Damage AoE After Time On Impact, applies damage in an area of effect X seconds after colliding;
  • The rest of the behaviors are quite self-explanatory.

Firebomb is a spell that moves forward while being affected by gravity. As soon as this spell collides with something it explodes causing damage in an area of effect.

Conclusion

Although the development of the tool took some time at the beginning of the project, this investment was justified in the long term. The tool allows us to create a spell in a few minutes without major complications, just changing some values ​​and assigning different behaviors. We hope the post was interesting. Thank you for reading.

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: