How to start making an Oblivian style Spell creation system

So I am working on an RPG game and I am struggling with trying to figure out how to create this system. If you played Elder Scrolls Oblivion you may remember the spell crafting system. where if you had enough gold you could make any spell you wanted. If you did play it essentially the mechanic worked by letting you chose various effects such as fire damage, drain health, summon creatures all sorts of things. You could also set the range, how strong it was how much of an area it affected as well as its duration.

I did get a very clunky and simple version of the mechanic work but it included alot of enum and branch chains just to make the simplest spells. Now my question is how would you go about recreating such a system? Is it just a bunch of children that you would set their values to using the menu, then adding that spell to the spell book? Or is there a way to create child classes in game. i am really just running into a problem of not knowing enough to ask the right questions. Now i am not asking anyone to create the system for me just where should I start? Is there a node I just don’t know about? is there a tutorial that covers something similar? anything would help really.

Its just a bump nothing to be concerned about.

If you are asking some points to where to start I suggest searching the asset store for an item that has a similar system to what you need and check how they did it.

More than finding exactly what you need is just to study how they have setup a complex system. breaking repeating tasks in functions and macros, using base structures that one can create more complex stuff from.

I am not expert and haven’t done something exactly like this, but if you haven’t checked out the Gameplay Ability System of the Action RPG project (both from epic), I believe those should give you some examples of similar ideas.

I can say some very general things that help me:

Encapsulating the action into a uobject helps me a lot for organizational purposes (helps avoid nightmare branching graphs and hard-to-follow switch statements).

I’ve made a system that is a much, much simpler form of this in a sense. Basically a reference to a uobject defines the current “action” that right mouse button will perform.
The uobject can contain whatever logic you want in it, so the possibilities are endless.
At some point I’ll try to make a quick, easy tutorial to give overview of the idea. But I got initial inspiration from Paul Gestwickis youtube videos which show examples of state pattern and command pattern using blueprints. (just search youtube and you’ll find it easy)

You probably won’t understand this is you haven’t first followed those videos, but the very general steps are like this:

  1. Construct a uobject and set it to be the current action
  2. The CurrentAction is where input gets sent from the player controller
  3. CurrentAction handles input however it wants. Usually you want a reference to the player pawn and/or controller and maybe the HUD to within this uobject.
  4. Have some method somewhere for changing the currentaction, like on the player controller.
  5. You may construct actions on an as needed basis, or you may construct them and then store reference to them (like for a player created spell, you want to remember the parameters they had created, so you need to save that uobject).
1 Like

This. @AndracoDragons look into actor components. Each component can host variables and define behaviours. A spell actor can have any number of those components present. These can be added and removed dynamically, too.


Here’s a crude & overly simplified example:

  • a spell actor
  • some of components defining the behaviour / effects of the spell:

  • the component hurts pawns with fire damage every .25s for as long (up to 4s) as they stay within the spell’s Area Of Influence defined by the owning actor:


The player altered this spell by adding two more effects:

Now, when this spell is cast, the targets will be on fire. But they will be also unable move, and will be no longer thirsty. :man_shrugging: Because why not…

You define the additional behaviour in each component. This way you will not clutter the main spell actor and can mix and match anything. The components know about its spell actor owner, and can reach out to talk to that actor - perhaps the immobilise affects has smaller radius than the Area Of Influence of the spell:


i am not asking anyone to create the system for me just where should I start?

The above is a pseudoscript that, technically, should work but it was never fired. Creating a working system would take some serious hours to develop.

I’ve used it successfully in the past.


Gameplay Ability System mentioned above is probably worth a shot. Never used it, though.

1 Like

i really appreciate the help! i had thought about using actor components before but i couldn’t conceptualize how to make it work. I really appreciate the pictures and everything. Now its time to put the serious hours in to develop it.