Tangle wrote:Apologies if this is something immensely obvious, but now the game has begun throwing exceptions when it tries to make the orbit ranges for each star. Relevant code:
Hmm. It's not obvious to me exactly what's going wrong, but, at a high level, I can tell you that adding new star types is going to require updating the Lua code in a number of places -- there are various supplemental tables that are defined per-star type, and ontop of that you'll need to define new display functions for the new types (which happens in a different part of the code base).
If I were you, I'd start by doing a find-all over all the source files, and looking for all the places where one of the type strings for an existing star type turn up. For example, do a global search for 'M Red'. That will give you a quick sense of all the places where you'd need to make changes. Then, again, I'd start simple -- just go to all those places in the code, and try adding an extra entry, identical to the one for 'M Red', that instead references a 'Y Brown'.
If you can get that working without breaking, then you can start customizing things for your new star type -- alternate initialization rules in planet_decks.lua, different color values in the sun_shaders.lua/sun_shaders.cg files, and so on. Then if you want to add a few more types after getting a brown dwarf working, you'll know more or less what's involved.