I have run into a practical problem with merging traits into civics. My original concept with just copy pasting the code into the end of civics will work, but if I do that and then do the same with FF, then we will have a mess nobody can figure out. The main problem is that currently more or less everything is in random order inside each of those and as the size increase, the problem gets worse.
The only solution I can think of is to start with the mandatory data (type and all that). After that there should be no variables on their own. Instead there are containers, each with a specific theme. Say we call the first
unlock. It will then contain arrays telling which yield, profession, unit, whatever it unlocks. If the civic unlocks nothing, then we can simply write
</unlock>. Everything should be able to be skipped in XML, meaning even if you place something in unlock, you only have to actually enter what you change. You don't have to enter that the profession array is empty just to unlock a unit.
I think that will be the most XML modder friendly approach.
The problem is that it would mean all variables have to be sorted. Some or obvious, but others takes some research to figure out. For instance, what would be the appropriate category for
iModdersCode1
I think I will make an unsorted category for stuff like that and then we can at a later date empty it one by one. If the variable is skipped anyway for most(all?) civics anyway, then it will not really be that much work to move it later.
Once CvCivicInfos have been sorted, it will be ready to take variables from traits and FF one by one as they are sorted too in the process. This is going to take a while
