Implementing Auras and other Advanced Spells

In Spellhack, simple abilities like ray traces and little fireballs are cool, but they limit the possible depth of gameplay and the decision-making process of the player.   Most other games with spell systems play it save and they do not tap into the potential of next-level interaction and that leaves the gameplay feeling shallow and repetitive.   Only a select few games really opened my eyes to the full potential of a spell system and I intend to push the bar with the knowledge in Unreal Engine 4.  

Soon, advanced spells will be added including remote portals, mana shields, auras, and potions.  To get there, it takes not only a deep understanding of code architecture, but also some forethought for the overall game design.    The code for  systems can quickly spiral out of control, but only with bad practice.  In order to help teach you basic architecture, I will explain how these systems work in Spellhack.

1) Abilities, Conditions, and Effects 

These are all UE4 data tables and connect to each-other with 'Row Handles'.   Abilities can be cast and are either Instant, Cast, or Channeled.  They have different target types like Self, RayTrace, SelfAoE and RayTraceAoE.   Once cast, all of the targets are inflicted by specified Conditions and Effects.   Conditions are just buffs/debuffs and they have their own effects which are inflicted every 'tick'.    Effects can do a wide array of things, such as altering stats, preventing movement, prevent casting, teleporting the actor, and more!   With all of this in place, Spellhack has its own full-fledged Spell Editor right inside of Unreal Engine.

2) Auras, Wards, and Morphing 

To pull off remote summoning portals, new features are being added to Spellhack.   First, Wards need to be added.  A ward is just an invisible actor that cannot move, but it is owned by a player and can show a particle effect and can have Conditions.  In this case, the ward will be a green Portal that lasts 30 seconds.  Secondly, Auras need to be added.  An aura is like a contagious condition.  It is a type of effect on a condition that will add another condition to nearby Units in an AoE radius every 1 second, every tick.  The condition added to the Unit lasts 2 seconds, so it falls off after leaving the Auras range.   In this case, the portal will put an aura buff on the caster called 'Portal Energy' which means that portal is nearby.   Lastly, conditions like Portal Energy need to do Ability Morphing.  That means when the cast has the Portal Energy condition, their Summon Portal ability will be swapped out for a different ability, Teleport To Portal.     That way, when nearby a portal, the caster will teleport to it instead of making a brand new one.   Just like they wanted! 

These updates and many more are coming soon.  Leave a comment to request new spells to be added and we can discuss good implementation strategy! 


Get Arcbond RPG

Leave a comment

Log in with to leave a comment.