Nice to know its just a limitation of the compiler, but that being said- it did force me to move in a direction which I actually think is probably better.
Eg: Define the 'powers' pseudo-class, and then reference it, opposed to redefining it.
So to stay in the terminology :
Players have a Genome - > Which is a collection of Genes.
A Gene will have a collection of abilities (passives or attached feats)
This system implying a genetic makeup, sort of suggests that a player/character shouldn't ordinarily be able to lose abilities.
Eg: Once they acquire a gene, they get the abilities associated with it permanently.
So renumbering shouldn't be necessary.
That being said, if I decide to implement removal of genes, then yeah, renumbering shouldn't be too tricky, I just need to keep track of how many genes every player/character has and then reindex them.
Using a database would probably be better for this sort of data manipulation.
While I am working on this system, I think I will also code each Gene so it can have other activation criteria.
Eg: Underground, Day& Night, Outdoors, Natural Areas, Weather activation.
Eg: Imagine an aquatic subrace - who gains +regen in the rain.
Using nwnx_funcs I can also code it to detect what sort of terrain the player is standing on, and then use that to activate other genes also.
Eg: When standing in water => Regeneration & AC Bonus etc
In case it wasn't obvious from some of the code snippets that slipped into my above posts - This system is actually being inspired by Marvel Agents of Shield, with the Inhuman story arc. (Inhumans being humans who inherited alien dna from thousands of years past, but the DNA gets activated through a process called Terrigenesis)
I plan to define several dozen ability genes, and when players log in for the first time, they are allocated a combination of genes.
The combination allocated will appear to be random, however I will use data tracking to see the distribution of abilities over time, to make sure that its an even spread of abilities.
The players then have to complete a story arc, which awakens their 'inhuman' genetics.
So up until that point, they have no idea what genetic powers they will have.
It could be something like +X to ability scores (something mundane),
True Seeing at night time etc,
or it could be something radical like gaining access to a powerset (feats with spell like abilities)
Eg: Shooting Electricity, or even mind control.
Some genes will also have detrimental effects too.
Eg: Weakness to sunlight - (ala - vampire)
This system, while being used for Inhumans in my server, will also be re-usable for a subrace system also.
Eg: Define a 'weakness to sunlight' gene - then I can have that as an inhuman ability, but also as an attribute for vampires.