I’m working on a text-based adventure sort of game with rogue-like elements.
I am attempting to use ScriptableObjects to organize and design the “actors” (Player, Enemy, Sword, Apple, etc) and “aspects” (Human, Weapon, Consumable, Item, etc) of the game, in which the actors are composed of a few aspects that define how they can interact with other actors. In my mind, if I can get a system that works the way I want it to, it should be relatively easy to define new aspects in code and then compose new actor types completely in the inspector using ScriptableObjects.
I have a system now, where Actors are ActorData ScriptableObjects, which hold a List of Aspects. Aspects should work essentially like a list of tags, but with various fields and behavior attached to them that an “Interaction” can hook into. Aspect is just a Serializable class with an Aspect ScriptableObject using the enum pattern, and an int holding a “value”. This almost works, the problem is that some aspects are more of tags that don’t need any value, and some aspects that need more fields than just one. What I’m doing feels like poor design and like I am missing a slightly different answer here. I have considered just moving to prefabs as actors and components as aspects, however I feel like I am losing some of the modularity and simplicity of ScriptableObjects in that method.
Anyone have any suggestions to get me on the right track here?
