I've changed from code-driven to data-driven for starting systems! Next up is starting ships, then I'm done with data conversions!
I want to explain how it will work with the data for starting systems. In each race data.xml file, there is one element named "StartSystems". It contains a list of elements, all named "System". It will process each system starting from the first to the last as in it will place the first system first, and so forth.
Each "System" have three attributes:
override - Should this system be cleared of all planets before proceeding with planet placement?
inOrder - Should the list of planets in the data file be the same order in the system in the game? Only applicable if replacePlanets is true. This is useful if you want to create a specific type of system. For example, if you want to create a Sol system for human, you can specify this to be true, then set dead, toxic, terran, barren, asteroids, gas giant, gas giant, gas giant, gas giant, dead planets, and it'd be the same layout as the actual Sol system.
replacePlanets - If you want the listed planets to replace the existing planets (for example, if you only have one planet listed, and want to replace one planet, you set this to be true). If this is set to false, then the planets will be inserted at random among the existing planets.
Each "System" element contains two list of elements, "Planet" and "Ship". Each "Planet" element is a planet that contains three attributes: owned, population (only applicable if owned is true), and type. Each ship is the name of the ship design that you've specified earlier in the xml file, and amount of that ship. So you can have one system to start with 2 scouts, and a second system to start with a colony ship. This is not implemented yet, as mentioned earlier in this post.
Here's a screenshot of me with Humans race that I've specified 7 starting systems. Note how they're all clustered together? This is because of the algorithm I wrote to ensure that they're not randomly scattered all over the galaxy.
I know I said I'd be busy during Christmas vacation, but I had some extra time, so I got busy on this game! So I didn't lie, technically...