@Brian_Trotter this is something i have been struggling with in my own project as a solution, and maybe i was under the wrong assumptions. I thought using enums was a bit suboptimal. i thought i remember seeing/hearing they were more bug prone as you expand your game. My idea had been to have scriptable objects implement an interface then maybe even have the SO hold other Scriptable objects and required methods.
in the case of this game maybe it would be something like…
empty game object acting as a container called player container
the container stores PlayableCharacterSO, implementing iCharacter.
PlayableCharacterSO stores …
- Character Prefab
- ClassSO ( which would handle health gained per level)
- a method managing XP calculation, so instead of a table of levels it might be something that says _XPTNL = 100 *_characterLevel ( that isnt a perfect example just something to get the point across)
Is this viable, or does it introduce more problems than the enum solution? i have not played around with it enough yet to understand the problems it might cause using " nested SOs" like this. Im sure a mistake in there could cause problems where base stats get modified permanently at run time.
im wondering if, for the sake of simplicity, i should use the enum method now…it seems less " professional" but after all im not exactly a pro.
p.s. not expecting you to come up with a flawless solution with the vague stuff above i just gave you, just want to know if my method is viable. if so is it going to be a bigger headache than just using enums, or is it worth it for me to just keep at it, and as i get more proficient, it will be worth it. (my project has a bit more complexity and takes in racial bonuses, elemental typing etc)