Galaxy Tweaker CKAN

Edit and create planets, solar systems, and galaxies!

License: MIT

Game Version: 0.1.2.0

Downloads: 15,038

Outdated Mod

This mod is not known to work with the latest version of Kerbal Space Program 2. Proceed with caution.

For technical help, ping Hyperion_21#1503 on the modding discord or Intercept Games discord.

Disclaimer: This mod automatically generates internal game files in a more easily readable format. Do not distribute large sections of unaltered or mostly-unaltered code or assets online! A way to distribute planet packs and galaxy definitions without distributing internal game files is in the works!

Galaxy Tweaker

A galaxy configuerer that allows for modification and usage of custom galaxy definition files and celestial body data files, allowing users to tweak the galaxy.

While this mod shouldn't affect old saves in any way, be careful with loading your old saves with it active.

THIS MOD IS IN A VERY EARLY STATE! EXPECT BUGS AND CRASHES!

The rest of the readme from this point has not been updated for 1.0.0 yet, and doesn't cover celestial body data instructions.

How to use

  1. Download the mod like any other SpaceWarp mod (drag the BepInEx folder into the root KSP2 directory).
  2. Launch the game to generate GalaxyDefinition_Default. DO NOT EDIT THIS FILE, IT GETS OVERWRITTEN WHEN THE GAME IS LAUNCHED!
  3. Go into the mod folder after launching the game once, and go into the GalaxyDefinitions folder.
  4. Copy the GalaxyDefinition_Default.json file in there, and rename it to whatever you want (the name becomes important later, so remember it).
  5. Open the .json file, and edit it however you want.
  6. In KSP2, click the "Create New Campaign" button. A window should automatically appear.
  7. On the list, click on the galaxy definition you created.
  8. Create a new campaign. Your new galaxy should be loaded in there.

Note this mod remembers which save file is using which galaxy definition, so the target galaxy definition only works on new save files. Old save files should automatically be assigned to the default galaxy definition stored in the game files (not the GalaxyDefinition_Default.json that is automatically generated)

Editing Galaxy Definitions

This section will act as a mini-wiki for what everything in the file actually means.

Overall Advice

  • Do not have the SoI of any celestial body intercept with the SoI of any other body, unless one of the bodies is directly a moon of the other body. If an illegal SoI exists, it causes weird issues when a craft intercepts the intersection, including what seems to be erroneous deloading of celestial bodies and a breakdown of the encounter system.
  • Stars — such as Kerbol — only need a "GUID", "PrefabKey", an empty "OrbitProperties": {}, and an empty "OrbiterProperties": {}. This places the star in the "center" of the solar system. (TO TEST: adding multiple celestial bodies without OrbitProperties)

Galaxy Definition Parameters

"Name": "Default",
"Version": "0.0.1",
"CelestialBodies": [

Some basic metadata for the galaxy definition. Don't touch this.

"GUID": "Kerbin"

This is how the game knows which planet you're giving orbital properties to. If this isn't set to an existing planet name, the game will crash.

"PrefabKey": "Celestial.Kerbin.Simulation"

Link to an internal group of files that are used to generate terrain and such. Format should be "Celestial.[PLANET NAME].Simulation", but Kerbol uses "Celestial.Kerbol.Scaled".

"referenceBodyGuid": "Kerbol"

The celestial body to orbit around. - THE ORBITED CELESTIAL BODY MUST BE DEFINED BEFORE THE ORBITING CELESTIAL BODY! If moons are out of order, it will cause a crash! - Yes, a moon can have a moon. - Sphere of Influence for a celestial body is calculated only using itself and the mass of the body it is orbiting. This can result in weird SoIs in cases where submoons (moons of moons) are present.

"inclination": "0"

The inclination of the celestial body's orbit relative to its reference body's equator (affected by axial tilt), in degrees. Increase to make the orbit offset from the equator. See here for more details.

"eccentricity": "0"

The eccentricity of the celestial body's orbit around its reference body. When at 0, the orbit is a perfect circle. When at 1, the orbit is a straight line. See here for more details.

"semiMajorAxis": "13599840256"

The semi-major axis of the celestial body's orbit around its reference body. When eccentricity is 0, this is identical to the orbit's radius. See here for more details.

"longitudeOfAscendingNode": "0" The longitude of the ascending node of the celestial body's orbit around its refernce body, in degrees, which is the angle between the ascending node and an arbitrary but universally constant "reference direction" vector (needs testing). Change this to rotate the orbit around the axis perpendicular to the equatorial plane of the reference body. See here for more details.

"argumentOfPeriapsis": "0"

The argument of periapsis of the celestial body's orbit around its reference body, in degrees, which is the angle between the ascending node and periapsis. Change this to rotate the orbit around the axis perpendicular to the inclined orbital plane. See here for more details.

"meanAnomalyAtEpoch": "3.14"

The mean anomaly of the celestial body's orbit around its reference body at epoch (presumably UT 0:00:00), in radians (NOT DEGREES). This determines the position of the celestial body in its orbit at epoch. When this is set to 0, the planet will start the game at its periapsis; when set to π (game uses 3.14 in galaxy definitions), it is at its apoapsis. This is not to be confused with true anomaly. See here for more details.

"epoch": "0"

(presumably, needs testing) The time offset from epoch, likely in seconds. Functionally, this should work the same as mean anomaly at epoch, but measured in time instead of an angle. All stock celestial bodies set this value to 0, so it's recommended not to mess with this value.

"orbitColor": 
{
    "r": "0.30",
    "g": "0.31",
    "b": "0.35",
    "a": "0.2"
}

The color of the orbital line of the celestial body. r is red, g is green, b is blue, and a is alpha (transparency); all of these values range from 0-1.

"nodeColor": 
{
    "r": "0.30",
    "g": "0.31",
    "b": "0.35",
    "a": "0.3"
}

The color of the dot/node on the orbital line of the celestial body. r is red, g is green, b is blue, and a is alpha (transparency); all of these values range from 0-1.

Loading changelog...

Stats for Galaxy Tweaker

Downloads over time

Downloads per version

New followers per day

Top Referrers

  1. spacedock.info
  2. www.google.com
  3. www.youtube.com
  4. github.com
  5. sd1b.52k.de
  6. steamcommunity.com
  7. sd-prod-live.52k.de
  8. www.bing.com
  9. lm.facebook.com
  10. yandex.ru

Export Raw Stats

Export Downloads

Export Followers

Export Referrals

Raw stats are from the beginning of time until now. Each follower and download entry represents one hour of data. Uneventful hours are omitted.