So I’ve been working on abilities and on an ability tree system for my RPG. The system basically involves a UI with a bunch of buttons, and when a button is clicked, you learn the ability that the button holds if you meet all the requirements.
Right now, each button is holding a ScriptableObject that is called AbilityData
. These basically say what the ability does and what the requirements are.
The thing is, now I’m having second thoughts about how to organize this system. I’m wondering if it makes more sense to put the ability properties that are in AbilityData
directly onto the buttons as a new MonoBehavior script. So rather than each button holding an SO, they would hold MonoBehaviours that have all the properties and requirements for the abilities.
This change occurred to me, because as the ability trees grow, it’s becoming a pain to keep track of each SO and where it’s attached. So for example, since the requirements are kept in the SO I have to make sure that I line up the abilities on the ability tree as the SO wants them to be lined up. If I want to edit an ability I have to leave the ability tree canvas and go edit the SO.
I’m just wondering if it would be way easier to work with the abilities if they were just MonoBehaviours but I don’t know if there are any major drawbacks to this idea.
I tend to use SOs a lot, especially when saving data. I use them for my item system, so I can create custom items that aren’t randomized, I use them sort of like enums as well, but I’m not sure they are the best fit for this ability system.
EDIT: More info about the issue I’m explaining.
Here is a picture of how my SOs handle abilities:
Here is how my ability trees look while I’m working on them:
So basically, if I want to edit the ability or its requirements, I have to do it outside of the ability tree, the thing I dislike about this, is in an ability tree system, I feel like how the ability is placed in the tree and what the requirements are are very intertwined. So making everything from the SO into MonoBehavior on the ability tree buttons would put it all in one place.
The thing is, I don’t know if making them MonoBehaviours would have some bad consequences that I’m unaware of. I guess instead of a list of AbilityData
SOs I would need to keep a list of MonoBehaviours to know what abilities I have? I’m not sure if that’s a problem