Basic Star Creation Guide
This guide will cover how to add a new star color and create a new star system.
You can get a copy of the files in this tutorial here.
The first thing you need to do is navigate to Kerbal Space Program's GameData directory, it should contain the following:
It is okay to have more than just those!
Next create a folder for your project, we'll call this one SSGuide but you can name it whatever you'd like.
You can skip this step if you want to use one of the existing colors (Yellow, Blue, Red)
To add things to StarSystems you need to create ModuleManager config files. To keep things simple we will use Notepad to create them but you can use whatever text editor you prefer. (NOTE: Document editors like Microsoft Word are NOT text editors)
@KSPSystem
{
@StarColors
{
StarColor
{
name = TotallyBlue
LightColor = 0.0,0.15,0.6,1.0
EmitColor0 = 0.357,0.588,0.405,1.0
EmitColor1 = 0.139,0.061,1.0,1.0
SunspotColor = 1.0,1.0,1.0,1.0
RimColor = 0.388,0.636,1.0,1.0
CoronaTexture = SSGuide/TotallyBlueStarCorona
}
}
}
You can tweak these values to get the look you want, by default its an exact copy of the Blue color used by Dolas. CoronaTexture links to an image file in your project folder (This is the image I used in this example).
Next you have to save the file as a .cfg, in order to do this in Notepad you have to go to the "save as..." dialog and change the file type to "All files".
For this example we will name the file TotallyBlueStarColor.cfg
Save this file in your project folder.
To keep things simple we will create a new config file for the star. (More advanced users can put this all into one config)
Follow the same steps as before to create another cfg file in notepad but this time the file should contain the following:
@KSPSystem
{
@StarSystems
{
StarSystem
{
name = MySystemName
Sun
{
SolarMasses = 7700
Type = 0
CelestialBody
{
name = MyStarName
BodyDescription = I made a star!
flightGlobalIndex = 510
StarColor = TotallyBlue
Mass = 1.5698E28
Radius = 21530000
ScienceMultiplier = 10
}
Orbit
{
inclination = 1
eccentricity = 0.1
semiMajorAxis = 5593800000000
LAN = 0
argumentOfPeriapsis = 300
meanAnomalyAtEpoch = 0
epoch = 0
}
}
}
}
}
You can tweak these values to customize the star, right now its a copy of Dolas with a higher orbit. Save the file as TotallyBlueStar.cfg and launch KSP, you should now have a new star system!
flightGlobalIndex should be different for every celestial body (star, planet, moon) in the game. DO NOT USE THE SAME VALUE TWICE