Hello,
im trying to develop a Quest system for a singleplayer adventure like game.
At the moment I’ve got my Quest as a Scriptable Object with an Array of an abstract Scriptable Object “Goal”. Goal has one Array of Results, which are indeed Scriptable Objects.
public class Quest : ScriptableObject
{
public COMPLETIONTYPE completionType;
public Goal[] goals;
public string title;
public string descr;
}
public abstract class Goal : ScriptableObject
{
public Quest partOf;
public bool Initialized;
public bool done;
public Result[] results;
public virtual bool evaluateGoal() { return true; }
public virtual void init() { }
public virtual void goalToText()
{
}
}
With that I can create Assets for Quests, Goals and Results and easily connect them.
I think this raises some problems:
- I think this is abusing ScriptableObjects
- The parts are not reusable without instantiating
- If I dont instantiate every asset, i wouldnt know how to reset the save game so the player can start over.
I am kinda stuck right now and dont know what a good practice would be.
Is it a bad idea to keep with the idea of scriptable Objects and instantiate them?