This manual describes how to add a planet to SpaceEngine. Before continuing, it is recommended that you read these manuals first:
Creating a star
Quick start: find a similar planet in SpaceEngine
The easiest way to add a planet is to find a procedural planet in SpaceEngine which you like, duplicate it in your planetary system script, then tweak its parameters a bit as you desire. You can quickly find a planet close to your needs by using the Star browser. Open it by pressing [Shift]+[F3], enter the search radius 100 and press the [Filter settings] button, then choose the desired filter parameters. In this example, we are looking for a temperate Earth-sized terra near a G class star:
Press the [Ok] button and wait until SpaceEngine finishes the search. Then you may click on each row, open the Solar system browser ([F2] key) and look for the planets SpaceEngine has found. Tip: to know exactly which planets satisfied the filter options, hover the mouse cursor over the table cell in the 'Filter' column (last column). A small box will appear with a list of the planets in that system which met the filter options.
So let's use RS 8474-918-7-65905-410 A4 as our example planet. Note: in your SpaceEngine version this planet may not exist or may look different due to installed mods/addons or a different version number.
It looks good enough. Let's copy it into our system. Open the Planet editor ([Shift]+[F2] or Main Menu -> Editor -> Edit planet). Make sure the planet is selected, otherwise the Editor will not open or will open for some other planet. We will talk about Editor options later. Now, press the [Export script] button:
Press the [Export] button, and a file called RS 8474-918-7-65905-410 A4.sc will appear in the export/ directory.
Now we must create a catalog script for our planetary system. Go to the addons/catalogs/planets/ folder (create it if it does not exist) and create a new file named MySystem.sc there. Open it with notepad. Also open our exported script export/RS 8474-918-7-65905-410 A4.sc, copy its content and paste into MySystem.sc. After this, you must make some edits.
First, you must choose a star for your planet to orbit. In the current version of SpaceEngine, it is impossible to create a system for a procedural star (procedural stars have a name looking like "RS 123-456-789"), so you must choose a real star from the catalog, or create a new star. So, let's choosethe star called Chara (beta Canum Venaticorum) for our example planet. This is a Sun-like star of spectral class G0V - a good choice for creating a life-bearing planet.
In the MySystem.sc file we need to come up with a good name for our planet. The star we had chosen is called Chara, so a good name for its planet is Char (hello from the Queen of Blades 🙂 ). Look at the very first line and change it from Planet "A4" to Planet "Char". Next, we must tell SpaceEngine that this planet must revolve around the star Chara. Look at the third line, and change it from ParentBody "A" to ParentBody "Chara". Now the planet will revolve around Chara, but it may have the wrong orbit, especially if you exported a moon and want to make it a planet, or vise versa. Scroll to the end of the script and find the Orbit tag. Change the parameter SemiMajorAxis to 1.0 (this means a distance from the star of 1 astronomical unit) - it's a good start for tweaking an Earth-like planet near a Sun-like star. You may also remove the Period parameter (for SE to calculate it automatically based on the mass of the star), and change the Eccentricity to some small value (so the planet's orbit will be nearly circular). Save your changes and launch SpaceEngine. Hit the [F3] key and enter your planet's name, Char. Then press the [G] key twice and you will see your planet:
It may look a bit different because you might have put in an imperfect orbital radius (semimajor axis) at first, and the planet may be too hot or too cold. You must adjust the parameters in your planet script to get it right. Remember: after editing the script, you must restart SpaceEngine to see the changes.
Using the Planet editor
The easiest way to tweak the planet is using the Planet editor. But it has two main restrictions for now:
1) The Editor does not save changes to the files. You must export the script and manually copy/paste the code from it.
2) The Editor is not finished yet, so it doesn't allow you to edit all parameters, and it may have some glitches.
But you can still quickly adjust the main parameters such as orbit radius (SemiMajorAxis), planet Albedo and atmosphere Greenhouse effect to achieve the desired temperature on the planet; change its radius and mass to adjust surface gravity; change atmosphere model, and change some procedural landscape forms (read the next chapter for more details).
Almost all changes require pressing the [Update] button to apply. Pressing the [Reset] button will return the settings to those the planet had before you opened the Editor. This means that if you make some changes and close the editor, you won't be able to reset them back again. Only restarting SpaceEngine will reset them (remember, Editor does not save the changes to the file). So if you want to achieve good results, or if you want to be more skilled in creating planets, read the next chapter of this tutorial.
Let's consider the parameters of our planet Char that we changed while playing with the Editor. We changed its atmospheric greenhouse effect to make it warmer, changed snow caps altitude, atmosphere model and color hue, and played with the procedural surface parameter. We could also make it ringless by deleting the Rings tag from the script and adding NoRings true (see below for details). Finally, our planet script should look like this:
Color (0.775 0.780 0.782)
Randomize (-0.485, 0.692, -0.399)
colorSea (0.040, 0.200, 0.200, 1.000)
colorShelf (0.150, 0.370, 0.370, 1.000)
colorBeach (0.820, 0.730, 0.570, 0.000)
colorDesert (0.420, 0.360, 0.220, 0.000)
colorLowland (0.220, 0.230, 0.220, 0.000)
colorUpland (0.570, 0.540, 0.420, 0.000)
colorRock (0.100, 0.100, 0.100, 0.000)
colorSnow (1.000, 1.000, 1.000, 1.308)
colorLowPlants (0.117, 0.154, 0.084, 0.000)
colorUpPlants (0.097, 0.106, 0.056, 0.000)
TopColor (1.000 1.000 1.000)
BottomColor (0.000 1.000 0.000)
And the planet itself appears in the game like this:
You may make any type of planet/moon/asteroid in the same way (find with the Star browser and export with the Planet editor). You may add code for other objects to the same script file (actually, it's recommended to have a single script file for your whole planetary system). It is also useful to let SpaceEngine generate some parameters automatically, like cloud layers for gas giants. This is also described in the next chapter.
Planet script details
First, make sure you are familiar with the basics of SE scripts.
The full structure of the planet script is the following:
The planet must have at least the ParentBody and Mass or Radius parameters, and the Orbit tag with at least SemiMajorAxis or Period. Additionally, it and may or may not have some other parameters and tags described below (Surface, Clouds, etc.). If some parameter or tag is not specified, it may be initialized with the default value, or computed or procedurally generated by SpaceEngine. Example of a minimal planet script:
Radius 7200 // or Mass 1.5
In this example we specified only the planet's name, its parent, its physical size or mass and its orbit size or period. SpaceEngine will compute or generate the rest of data procedurally. You may find a lot of such "poor data planets" in SpaceEngine's exoplanets catalog, because often mass or radius and period are all the data known about them to modern astronomy.
You may disable the procedural generation of some tags, except for Surface and Orbit. For example, if you are creating a planet with no life and no rings, you shouldn't type the Life and Rings tags in the code. SpaceEngine may, however, generate them procedurally. In this case you may use these parameters (in the Planet tag) to prevent the procedural generation:
There is a special "No" parameter:
If specified, lighting will be disabled for that object. Can be used to create a fake demo systems like a Hertzsprung–Russell star diagram, using fixed positions in space (see Orbit tag description).
Now let's look at all of the planet script tags and parameters.