I found a problem with modding the relations between RaceConfig.xml and CustomPlanets.xml. Specifically, trying to create new, custom star system/planets for existing races and for minor races.
Ideally, the code should look in RaceConfig.xml at a race's [Homestar] tag and then bring up that corresponding [StarSystem] in CustomPlanets.xml. Then match up the [Homeworld] tag in RaceConfig.xml with one of the five [Planet] tags within the previously found star system in CustomPlanets.xml. If it can't find a match in either case, then all bets are off and it just randomly generates a star and planetary system for that race.
Instead it looks like there might be some hard coded values for how it references races' star systems. For Humans, it always looks at the first star system entry in CustomPlanets.xml, regardless of what any of the names are in either file. For example, if I switch the Sol (1st system) and Drengia (2nd system) systems around, then the humans have the Drengia system and the Drengin have the Sol system, regardless that the RaceConfig.xml has the humans marked for the Sol/Earth system and the Drengins marked for the Dregia/Drengi system.
Things only currently work by default, since CustomPlanets.xml and RaceConfig.xml are lined up in the right order. But this puts up a lot of barriers for modding. My specific problem is I want to have custom star systems for some new Minor races I created. But due to the rigidness of the code, it doesn't look like it even looks up star systems beyond the 10 major races, and even then it does so by position only instead of cross referencing names.
Disclaimer, I'm just reporting, not complaining. I could see where priority for supporting minor races may not be the highest, but I love the fact that they're in the game and am working on trying to add some real flavor to them in the mod I'm working on.