The architecture is set. It’s time to code.

But first let’s summarize what needs to be done:

Creating my system (listed in no particular order):

  1. Create SpellFactory function that takes in the JSON input to create prefabs and SpellData SO
  2. Create SpellBehavior that reads Triggers and Events and performs actions
    1. Also reads SpellData SO and moves spell accordingly
  3. Create SpellDataSO
    1. Ensure it has an array or something to hold Triggers and Events
  4. Have a location for visual prefabs
  5. Create SpellEnum (mapping from ID to spell prefab)

Creating the spellcasting (again in no particular order)

  1. (Server) Get spell prefab from SpellEnum
  2. Spawns spell… I guess that’s it

Future/Things to look out for:

  1. Testing — ScriptableObjects, Spells, etc won’t exist until runtime once the full loop (JSON → SpellFactory → SpellData SO, prefab, dynamic triggers/events) is working
    1. Make the ability to create ScriptableObjects, Spells, during testing and have them persist after runtime
    2. Enable some kind of testing environment when passed in a JSON or something
    3. I’d also want some unit tests for SpellData and stuff
  2. Ensure prefabs hold SpellData, not the other way around (like I have been doing)
  3. Consider how expensive it is to create a spell and handle spell behavior