Let’s say I have an enemy Blob. I can create an EnemyObject SO in the asset menu and tweak his stats, equipped skills, loot and such. And then whenever I want that unit in a certain map, I can just use put it in the “map enemy inventory”, a list for every map that stores what enemies should be in there.
That’s what I have learned by searching a bit about ScriptableObjects and their implementation in units/enemies for an RPG. But that leads to a very obvious problem that I’m struggling to elegantly work around. That implementation only works for units/enemies with fixed stats. I created a Blob preset, so whenever I use that Blob, it will be the exact same lvl 3 Blob with 10 STR and the Blob Attack skill. That’s fine for enemies, but not so much for how I’m trying to implement units in my game. You have stat points, skills to equip, that kind of stuff. So your stats aren’t fixed. You can delete and create new characters at will - and you’re supposed to have multiple ones in your “unit inventory”. So I have a varying number of characters with varying levels, equipped skills, builds, and such. And I’m just lost as to how to implement this properly, considering that this choice might affect a lot of coding I’ll have to do later on, like how I save/load, for example.
I’m pretty sure it’s correct to have a unit inventory, a list that stores my available characters. I’m just not sure what those characters should be - they can’t be SOs, apparently, so they’d have to be just instances of a unit class? That would work, I think, but that’s very vanilla-C-sharpy, and I’m not sure how it’d affect saving/loading, as well as the inconsistency as to how I’m going to implement enemies as ScriptableObjects.
I’m afraid I might have misunderstood or overlooked an important concept that might be leading me the wrong way. I’d really appreciate some feedback. Thanks a lot in advance.