You should invest skillpoints in ScriptableObjects
!! Roll against your INT
…
All dungeonmaster jokes aside, ScriptableObjects are amazing for exactly this sort of thing like making spells or effects or really any parameterized type of authored thing.
Not only that you can get clever with base types and / or inheritance and REALLY kick up your data definition game.
In fact, looka these linkies!
ScriptableObject usage in RPGs:
The most important concept about ScriptableObjects (SOs) is that they are custom-shaped blobs of data that you can edit inside the Unity inspector.
The serialized values inside a SO map directly to that created asset on disk, the instance of the SO.
When your game runs, it needs some data. One way to get that data is to hard-code it in the code. That is bad because when you change it, you need to change code. That’s why we have things like a SO to configure existing unchanging shipped code.
W…
This looks like a job tailor made for ScriptableObjects!
ScriptableObjects are basically structured blobs of predefined data to help you create content for your game.
For instance if I had a ScriptableObject called Weapon, it might have these properties:
name
detailed name
description
damage
toughness
weight
what it looks like in the inventory
what model it uses in game
what animations the player uses to swing it
I would create many of these Weapons, each one a file on disk (also called an…
Usage as a shared common data container:
1 Like