Magic/Skill System

Hey, I am trying to make a Magic/Skill system. I am just trying to figure out the best way to handle it. My first thought was to use a scriptable object as a sort of data base which is working fine, my spells all have names, costs, etc. the only issue is I am not sure how to give them all separate functionality.
I want to keep using the scriptable object for obvious reasons, I want it to be really quick and easy to add/remove spells, but I am not sure what the best method would be to have that scriptable object store/determine spell functionality.

Any and all suggestions would be greatly appreciated!

I have been investigating the same thing. This is the best information I have found…

Found in this thread on a similar topic…

2 Likes

Thanks, that lecture really helped. I now have a spell system that is working rather well. Still need to push it more to the limit but overall I am quite pleased with it. I simply have a scriptable object per-spell but each spell could have a different type (AOE, Ray, Touch, etc.) then the characters have a list of the spells they know and can use.

Thanks again for the help and the link.

Yeah, no problem. Thank TonyLi for posting the link and Richard Fine for the lecture. It helped me out a lot too. I am going to set mine up basically as inventory items and allow a player to buy different items in exchange for some sort of economy whenever they level. So basically, it will be an inventory system. Then it will basically go on what amounts to an item bar.

I was also considering the whole “universal system” concept and I may break the whole spell system down into something else. Basically, my spells will be activated “weapons” from the skill bar. They’ll be containers that consist of three scriptable objects.

WEAPON
cost (mana, health, etc.)
cooldown

projectiles

rate of fire
velocity
cast animation
FX

PROJECTILE
straight line (stop on hit)
duration/range (end projectile)
homing
FX

WARHEAD
damage
area (ball, wall, storm, cone, etc.)
duration
secondary effect (damage, heal player, etc.)
secondary effect duration (poison, burn, etc.)
damage type
knockback
physics effects
travel to additional targets (like chain lightning)
FX

Maybe that will help you out too. Maybe not. LOL

there’s been a follow on from that Unite talk in the live training part of the Learn section

(there’s also another one next week for something slightly different)

1 Like