OOP Item, Creature, Spell, Potion etc. - System

Hello,

I took quite a challenging task to build a RPG system. I know how much work is involved in such a type of game.

I am familiar with game engine’s, but i need some good advice to build my system based on a OOP approach so i could have a designer based modification system after all the game system is implemented.


  • My problem: I have seen alot of tutorials showing how to built such system where they use BP Parent (main attributes) → Make a BP Child (other attributes) → Make a Child of that and set the corresponding values.

  • If i take this approach i have to create 1.000+ BP’s and when i have to change a simple value, I want to avoid editing each 1.000+ BP’s.

My question: How can i use the DataTables and Struct to have only one
Actor where i just have to edit it’s
ID when placed in the world to search inside the DataTable and
extract all my Values ?


My system would look like this for the spell system :

MagicalSpells (PARENT)

  • ID
  • Shared attributes

EffectSpells (CHILD)

  • ID
  • Range (Melee, Close, Medium, Long, Unlimited, Expressed)
  • Shared attributes

And so on…as it’s necessary…


I’m a designer (decent knowledge for programming), this is the concept art i made for my world (i’m still working on it). I have more concept art made but this is not the place to show it :).

Thank you.

Loop thru data table if you need, do it in base class and sync it with data in actor, if you hold varables in struct hold them in struct in item it will make thigns a lot easier, in matter of fact you can use struct inference to help you out. It’s not 100% supported in blueprints i think, but in C++ you can use it and should work (DataTables use it which you probably already noticed), hold base struct in master base class of everything and then cast when used.

Also if you good (i assume by programming you mean C++) you could try do editor code that syncs variables from data table to blueprint classes (you can’t do that with C++ classes as there defaults are hardcoded), but editor coding is not well documented so it is quite a challage if it’s your first time, but this option should be more optimal as it is editortime not runtime.

Alternativly you can create base subclasses spell->fire->fireball to make managment easier