hey dop2000! yeah I was afraid so.
I have enemies that have a rather large set of instance variables that define their behavior and how they go through a shared state machine. those are things like reaction ranges, fire rates, weapon type, etc, based on their archetype.
To further make them more flexible i want to exchange the full set of instance variables, to basically swap out their entire behavior, like going from ranged to melee combat.
The way i go about it so far is by swapping the enemy out for a separate object entirely, same enemy with different variable values. But that creates a huge configuration overhead that i'd like to get rid of.
So i was hoping to just fetch those value sets from some kind of config table; i was looking into dictionaries, but found them unwieldy to set up and maintain for each archetype and all their variations.
i now wanted to just use empty enemy objects for data storage, that via family would be easy to get set up and update. but not being able to reference them dynamically kinda breaks the concept.
I've decided to go with a json table, which is at least somewhat convenient to edit and traverse.
I'd be happy to hear about other ideas though! (Sorry for the long read ...)