I'm having a lot of trouble with creating a custom race, specifically when trying to give them their own unique star system. All of the mod examples I have seen on these forums involve editing an existing system; this is far from ideal and causes issues with certain races. For example if I use the SolSystem as my starting system, and edit in a planet accordingly (as was done in the Zathras mod), then if I have Terrans in my game will they also have a Sol system of their own, complete with my added planet. To avoid this I wanted to make a new system, and just use existing art assets for now.
The problem is, when I create new entries for StarSystemDefs and PlanetDefs, the game crashes on map generation. The debug files are very unhelpful to me in pinpointing the exact cause. Below are the entries I have added into a copy of the needed files in my games/galciv3/mods/mymod/game:
in StarSystemDefs.xml:
<StarSystem>
<InternalName>KerbolSystem</InternalName>
<DisplayName>Kerbol System</DisplayName>
<Description>A very hospitable system.</Description>
<OrbitLane>
<LaneType>Star</LaneType>
<Body>
<BodyType>UnaryStar</BodyType>
<BodyDef>YellowStar</BodyDef>
</Body>
</OrbitLane>
<OrbitLane>
<LaneType>DeadZone</LaneType>
<Body>
<BodyType>Planet</BodyType>
<BodyDef>PlanetMoho</BodyDef>
</Body>
</OrbitLane>
<OrbitLane>
<LaneType>HabitableZone</LaneType>
<Body>
<BodyType>Planet</BodyType>
<BodyDef>PlanetKerbin</BodyDef>
<IsHomeworld>true</IsHomeworld>
<Position>5</Position>
</Body>
<Body>
<BodyType>Planet</BodyType>
<BodyDef>PlanetDuna</BodyDef>
<IsHomeworld>false</IsHomeworld>
</Body>
<Body>
<BodyType>Planet</BodyType>
<BodyDef>PlanetLaythe</BodyDef>
<IsHomeworld>false</IsHomeworld>
</Body>
</OrbitLane>
<OrbitLane>
<LaneType>NoRandom</LaneType>
<Body>
<BodyType>Asteroid</BodyType>
<BodyDef>NormalAsteroid</BodyDef>
<Position>0</Position>
</Body>
<Body>
<BodyType>Planet</BodyType>
<BodyDef>PlanetJool</BodyDef>
</Body>
</OrbitLane>
</StarSystem>
in PlanetDefs.xml
<Planet>
<InternalName>PlanetMoho</InternalName>
<DisplayName>Moho</DisplayName>
<PlanetType>Dead</PlanetType>
<PlanetClass>0</PlanetClass>
<ArtDefine>MercuryArt</ArtDefine>
</Planet>
<Planet>
<InternalName>PlanetKerbin</InternalName>
<DisplayName>Kerbin</DisplayName>
<PlanetType>Habitable</PlanetType>
<PlanetClass>18</PlanetClass>
<ArtDefine>EarthArt</ArtDefine>
</Planet>
<Planet>
<InternalName>PlanetDuna</InternalName>
<DisplayName>Duna</DisplayName>
<PlanetType>Habitable</PlanetType>
<PlanetClass>4</PlanetClass>
<DisableColonizationEvent>true</DisableColonizationEvent>
<ArtDefine>MarsArt</ArtDefine>
</Planet>
<Planet>
<InternalName>PlanetLaythe</InternalName>
<DisplayName>Laythe</DisplayName>
<PlanetType>Habitable</PlanetType>
<PlanetClass>10</PlanetClass>
<ArtDefine>KrysethArt</ArtDefine>
</Planet>
<Planet>
<InternalName>PlanetJool</InternalName>
<DisplayName>Jool</DisplayName>
<PlanetType>GasGiant</PlanetType>
<PlanetClass>0</PlanetClass>
<ArtDefine>SaturnArt</ArtDefine>
</Planet>
in FactionDefs_custom1.xml
<RaceTraits>KnowledgeableAbility</RaceTraits>
<RequiresHomeworld>true</RequiresHomeworld>
<HomeStarSystem>KerbolSystem</HomeStarSystem>
<StartingShips>ColonyStaticBlueprint</StartingShips>
All of these lines either replace or are inserted into a non-root node, for example in planetdefs those entries are just pasted in between Mercury and Earth. I don't see any glaring typos, why is the game crashing? I also notice that on the New game setup window, my custom race homeworld entry is blank.