Need help understanding scriptable objects.

I understand the concept of scriptable objects but I’m having a hard time understanding the implementation. I have a small example case.
In this example I want to create a buff system with just two simple buffs. One that heals the user over time, and one that damages the user over time. Both stored on some Power Up gameobject which activates when the player touches it.

My initial thought is to have a list on the player that stores the buffs/debuffs so they can be removed and checked at any time.

I think the biggest problem is implementing different methods for different buffs. As I see it I just need a BuffBase scriptable object which contains an abstract method for activation and maybe a GameObject for the user who runs into the Power Up.

But if I need different methods for a lot of different types of buffs/debuffs and the only thing they share is who the user is and an activation method, which gets overwritten, is there a point in using scriptable objects?

As I understand I will still need a new monobehavior script for each of my buffs with their unique activation method.

Hi,

First of all, sorry for my poor English.

You understand SO(ScriptableObjects) bad. SO only store “data”. They aren’t GameObjects.

I dont recommend it for “Buffs” so i give you an example with other Stuff like “Items”.

Imagine you need have 2 types of items(Bows and Swords).

You need a BaseClass SO named “Item” with an enum variable (Or whatever) to identificate the type of this item, and childs of this class named “Bow” and “Sword” with the needed variables for this classes. (Like Damage for the Sword and ArrowStock for the Bows, for example)

Now, you need to create a Item in your project from the child classes and this child have the “Item” class variables and the variables of the child.

[CreateAssetMenu(fileName = "Sword", menuName = "Item/Sword")]


This two Tutorials are good enough to understand SO:

Nice Writed-Tutorial

Video of Brackeys