Editing Planets with the .PPRF

Click here to access a better-formatted Google Document

## 1.00 Introduction

The basis of Galactic Ruler’s planet generation is held within the .PPRF file. The way the planets generate and look at their surface level is entirely dependent on the data in this data file. The way the data is compiled and how the planets are generated is done conconventially however, so this tutorial of sorts should help you to make the kinds of planets you want to make.

## 2.00 Basics

Upon importing the .PPRF file into the asset manager, you will be presented with the default view. What is deemed the most important, basic info has been gathered into the default view.

### 2.01 ID

This is simply the planet ID number. This is how they can be traced in and out of game, so it isn’t just a simple ordering system.

### 2.02 seaLevel

This is as it sounds- the amount of water on a planet will raise and lower depending on the value put in this column. 0 is about an even spread between water and land, and the higher the number means the more water will be present. Fiddle around with these values to get the amount of water on your planet that is desired. A more in-depth description of sea-level with examples can be found under 4.2.2 Sea Level.

### 2.03 terrainSet

This column is semi-hidden in default view but still present. For a better explanation of what this number means, look under 3.00 Planet Profile Editor.

### 2.05 Agriculture

This value denotes how much agriculture can be found on the planet during gameplay. It doesn’t affect appearance. The minimum agriculture value is around -0.29, where no agriculture will generate on a planet with its agriculture value set to -0.31 or lower. Most homeworlds are set to a value of 0.55.

### 2.06 Ore

This value denotes how much ore can be found on the planet during gameplay. It doesn’t affect appearance. The minimum value is around 0.29, where no ore will generate on a planet with its ore set to 0.31 or lower. Most homeworlds are set to a value of 0.7.

### 2.07 hydroPower

This value denotes how much energy can be found on the planet during gameplay. It doesn’t affect appearance. The minimum value is around 0.47, where no energy will generate on a planet with its power set to 0.47 or lower. Energy is the most valuable resource in Galactic Ruler, as most homeworlds are set to a value of 0.48.

### 2.08 noPoles

This checkbox decides how the top and bottom of a planet will generate. No poles being checked will have a planet’s land mass altitude remain similar throughout the full planet. If it is unchecked however, the altitude on the top and bottom of the planet map will be lowered, increasing the amount of water that can generate in those areas.

### 2.09 Frozen

Checking this box does not mean the world becomes an ice world or anything like that. Rather, it lowers the temperature to the lowest possible value set in the temperature values. This ensures specific generation of terrain types, as some hexes will have their terrain differ depending on temperature.

### 2.10 Scorched

This is similar to the frozen category, but does the opposite. Checking this box will ensure that all hexes generated on this planet are the warmest possible temperature.

### 2.11 Landable

This is a simple one- it will decide if the planet will generate a surface or not. Typically if this box is checked for a planet, not many other categories, if any, need to be paid any attention to. Lava moons, asteroids, and gas giants all have this box unchecked and therefore have no surface to view. A faction cannot generate on a non-landable world and will have an automatic loss.

### 2.12 canOrbit

This box being checked means the planet in question can become a moon for other planets. Not recommended for homeworlds.

### 2.13 onlyOrbit

This box being checked means the planet in question can only become a moon for other planets. Asteroids all have this checked so planets do not orbit them.

### 2.14 hasWeather

While misleading, this checkbox actually decides whether or not a planet will generate with clouds at system level. Weather was removed from Galactic Ruler but clouds used the same variables.

### 2.15 Asteroid

Self-explanatory, just a simple boolean check that tells the game if the profile is an asteroid or not.

### 2.16 meshPreference1

The value in this column is referenced from the .UNIT file that decides the planet’s name and appearance. Don’t change values in this column unless necessary to add a new planet.

### 2.17 orbitalMin and orbitalMax

These two columns decide where in a system planets can generate in relation to the sun. They still don’t work 100% of the time as of this writing, but they can at least guide where planets are generated most of the time. OrbitalMin is the minimum distance from the sun, while OrbitalMax is the maximum. Typically, the smaller the range between these two numbers, the less likely the planet is to generate in a galaxy.

### 2.18 ringChance

This variable is a simple percent>decimal conversion. The number dictates the chance a ring will form on the planet. 0 is 0% and 1 is 100%.

### 2.19 oceancolourr, oceancolourb, oceancolourg

These are the RBG values for the colour of the water per planet.

### 2.20 cloudcolourr, cloudcolourb, cloudcolourg

These are the RBG values for the colour of the clouds seen at system level per planet.

### 2.21 atmosphere

This is, of course, the atmosphere of the planet. Galactic Ruler has 9 atmosphere types, and since planets can support more than 1 atmosphere they need to be numbered specifically. Here’s a chart for the atmosphere types:

 Lava Moon | 256

If a planet were to have 2 atmospheres, one would simply have to add their values together. (ie. a thick(4) and(+) dense(16), planet would be 20).

### 2.22 cloudSet

This determines the appearance of the clouds generated at system level. There are 3 types of cloudsets; 0, 1, and 2. 0 are earthlike, 1 are very thin and near-transparent, and 2 are very large and dense. There are current in-game base rules for setting clouds for different atmospheres. They are as follows:

### 2.23 planetProfileName

This is what the planets are supposed to generate to simulate. It’s important to note that these act as localized notes for the .PPRF, meaning that even if these values are changed it will not change how they appear in game. Their names in game are handled by the .UNIT equipment file.

### 2.24 notes

Self-explanatory, currently documents each race’s homeworld.

## 3.00 Planet Profile Editor

Right-clicking an empty box to the left of a planet’s ID, then clicking “Edit selected items” opens up the Planet Profile Editor.

The Planet Profile Editor is a further simplified, user-friendly popup that can be used to easily change some of the more important planet variables. Some of the values seen on this popup aren’t used in game anymore, but you can just focus on the following:

### 3.01 Mesh Texture and ScreenShots

The mesh texture displays the texture that is used to wrap the planet at system level. This is changed in Picnums file, and then referenced in the .UNIT file for its use in the .PPRF. There is a mesh preferences dropdown as well, but the game is no longer designed with the use of the other meshpreferences in mind.

Regarding the screenshots, these are sample screenshots of what the planet looks like with its current settings. If anything major has been changed, it is heavily recommended to clear the samples and create new screenshots to show the planet’s current state. A screenshot can be uploaded to this menu by simply selecting the sample slot while an screenshot is in your active clipboard, and then left clicking the sample slot.

### 3.02 Procgen Weights

While these values can be changed to make massive differences to the planet, it is recommended to not touch these in this menu as it’s better to edit them in a different view. More specific generation will be focused in 4.00 - Procedural Generation of the Planets.

### 3.03 Flags

Other than meteor (which is unused/wrongly named), all of these flags are the same as mentioned in the previous section, seen in the default view.

### 3.04 Colors

This section is the better way of changing the colours of the water and the clouds of the planet. Not only can the opacity be changed here as well, but the colour pickers on the right open up a standard colour picker popup.

### 3.05 Terrain Set - Type

Rather than editing the numbers which can be confusing, the Planet Profile editor lets users pick the atmosphere through selecting checkboxes. The atmosphere value will be displayed depending on the checkbox(es) selected.

Terrain set is where planet generation starts getting more complex, yet more interesting as well. There is both a terrain type and a terrain theme, both of which are in dropdown menus. Regarding numbers and data, the terrain types are ordered from 0-9, as are the themes (though shown in the dropdown as letters a-j). The terrain set will always be shown as 2 digits in this popup, as the terrain type acts as the first digit and the theme acts as the second digit. For example, a planet with a standard (earthlike) terrain type and a default (earthlike) theme will give the terrain set of 00. This is because they are both the first options in the dropdown, or the 0 values in the range. A swampy terrain with a thin theme however will give a terrain type of 85, since the Swampy type is type 8 and the thin theme is theme 5 (or f).

But what are terrain types and themes? Terrain types decide what the planet will consist of. For example, a “Jungle Swamp” type will generate swamp, jungle, and dense forests while a “Titan” type will generate a planet with nothing but rock, mountains, and desert. The following charts were taken from the GR - Procedural Generation Profiles and then slightly modified to be more up to date. (To see what values these charts are talking about specifically, go to 4.4.0 Altitude and Humidity Thresholds).

#### Terrain Pattern 9 - Ice

*(Shown as "undefined")*

The above charts show all the possibilities that planets assigned those types can have. It is worth noting that in some of these charts there are multiple options in the same cell. These are based on planet temperature. Planet temperature, Altitude, Humidity, and thresholds will be explained later in this document.

### 3.06 Terrain Set - Theme

Themes are different from types in that they don’t affect the planet’s composition. Themes are purely aesthetic, but can influence the immersion of the game. Like terrain types, there are 10 theme slots. As of this writing, 6 different themes have been created. These themes in use are a, b, f, g, h, and j. Themes are chosen based on their name and the suffix in the name. For example, TER002 is a plains texture with the default earth theme, but adding a letter suffix (other than a) assigns the texture to a different theme. This makes TER002b the purple gas type, TER002g the brownish polluted type, etc. Theme textures can be easily viewed ans compiled in the .TERX data file.

### 3.07 Inhabiting Races/Orbiting Star

These are no longer used so there’s no need to worry about them.

## 4.0.0 - Procedural Generation of the Planets

Now for the most complex part- the composition of planets. The way planets are created in Galactic Ruler are somewhat based in real-world logic and science. You cannot simply put in values for percentages of what you want the planet to be made up of.

### 4.1.0 Setup

#### 4.1.1 First steps

After opening the .PPRF, it will be in the default view (as previously stated). For changing a planet’s composition though, it is recommended to change which columns are visible. In the bottom left of the asset manager are fields with checkboxes in them. The following images are what you want to have checked:

*The resources, Meta, and Weather categories can become completely unchecked.*

Changing the checkboxes should give you this view:

#### 4.1.2 Terrain Type

Next, choose which terrain type you want your planet to have. The best practice is to have the planet texture in mind first (what is seen at system level) so that the planet can be generated to look as close to the texture as possible. It is important to refer to the charts under 3.05 Terrain Set - Type to get an idea of what your options are. Once the type is decided, it is a good idea to decide on a theme at this point as well, one that should also help the planet generation match its texture. This tutorial will show an editing process for Planet ID 2, the Earther homeworld. It uses the standard earth type and the default earth theme.
Choosing this terrain type will allow for the generation of:

* Tundra
* Plains
* Semi-desert
* Light forest
* Swamp
* Plains Hills
* Jungle
* Rough
* Dense Forests
* Mountain Hills
* Rough Hills
* Desert Hills

#### 4.1.3 Checking in-game

Throughout the creation process, it is important to check on the planet in game after every major variable change in order to make sure you’re getting the desired effect. Make sure to export the .PPRF so you can check your progress. Checking on a race’s homeworld is easy, as you can just select the race of the homeworld you’re editing. However, this will more often that not be the case. Luckily, there is an easy way to edit the system so that you don’t have to scour the entire galaxy for the one planet you’re editing.

The first step is to, of course, export the PPRF. Next, open up the default CVP file in a text editor (ie. notepad). Under the Earthers’ section, change the “RacePrimary” variable from a 1 to a 2. (pictured). This will change the Earthers’ starting planet options, more specifically their chosen slot in the RPRF file, which you need to open next in a new asset manager window. The second row of the RPRF is marked as ID 2- what we’ve now set the Earther’s slot to. The green planet cells in that row need their values all to be changed to the ID of the planet that you are editing (second image).

Now, if you generate a system as the Earthers, they will generate on the world that you are editing- letting you check the progress of your changes to the planet.

### 4.2.0 Temperatures and Sea Level

#### 4.2.1 Temperatures

One of the first values you may want to edit are in regards to the temperatures. This includes deciding if you want the planet to be scorched or frozen. The effects that these variables have will be dependent on the planet type you chose. These are the following 4 temperature values and what they do:

* Frozen- Reduces the temperature of each hex on the planet to its minimum (negates tempLatitudeWeight and tempAltitudeWeight)
* Scorched- Increases the temperature of each hex on the planet to its maximum (negates tempLatitudeWeight and tempAltitudeWeight)
* tempLatitudeWeight- How much latitude affects the temperature
* tempLatitudeWeight- How much altitude affects the temperature

Here are some samples of Planet ID 2 and its temperature values being changed:

* tempLatitudeWeight: 0.5
* tempAltitudeWeight: -0.3
* Not frozen
* Not scorched

Example 2: Frozen value checked

* tempLatitudeWeight: 0.5
* tempAltitudeWeight: -0.3
* Frozen
* Not scorched

Example 3: Scorched value checked

* tempLatitudeWeight: 0.5
* tempAltitudeWeight: -0.3
* Not frozen
* Scorched

Example 4: tempLatitudeWeight lowered

* tempLatitudeWeight: 0
* tempAltitudeWeight: -0.3
* Not frozen
* Not scorched

Example 5: tempLatitudeWeight raised

* tempLatitudeWeight: 1
* tempAltitudeWeight: -0.3
* Not frozen
* Not scorched

Example 6: tempLatitudeWeight lowered dramatically

* tempLatitudeWeight: -10
* tempAltitudeWeight
* Not Frozen
* Not scorched

Example 7: tempLatitudeWeight raised dramatically

* tempLatitudeWeight: 10
* tempAltitudeWeight: -0.3
* Not frozen
* Not scorched

Example 8: tempAltitudeWeight lowered

* tempLatitudeWeight: 0.5
* tempAltitudeWeight: -1
* Not frozen
* Not scorched

Example 9: tempAltitudeWeight raised

* tempLatitudeWeight: 0.5
* tempAltitudeWeight: 1
* Not frozen
* Not scorched

Example 10: tempAltitudeWeight dramatically lowered

* tempLatitudeWeight:0.5
* tempAltitudeWeight: -10
* Not frozen
* Not scorched

Example 11: tempAltitudeWeight dramatically raised

* tempLatitudeWeight:0.5
* tempAltitudeWeight: 10
* Not frozen
* Not scorched

#### 4.2.2 Sea Level

*Important note: Since Planet ID 2 has noPoles unchecked, it lowers the altitude of the top and bottom of the planet. This is why there are large water bands there at all times. When making a planet with little to no water, checking the noPoles value is heavily recommended.*

### 4.3.0 Altitude and Humidity Weights

The altitude and humidity values are the most complex values involved when editing the composition of planets. 1 value changed out of any of the possible values can change the way a planet generates dramatically. There are 3 humidity thresholds, and 5 altitude thresholds. There are also humidity weights and gridsizes, along with altitude weights and gridsizes.

#### 4.3.1 Altitude Weights

Altitude weights are weights for the 3 separate noise layers on generation. Simply speaking, these values decide how many land masses are generated, as well as the size of them. For better generation, all 3 values should add up to 1. The larger the altitude weight, the more contribution to the overall planet. For example, The larger the value for small weight, the more small landmasses there will be.

Example 1 (Standard):

* Small: 0.05
* Medium: 0.39
* Large: 0.56

Example 2 (Heavy Small):

* Small: 0.7
* Medium: 0.15
* Large: 0.15

Example 3 (Heavy Medium):

* Small: 0.15
* Medium: 0.7
* Large: 0.15

Example 4 (Heavy Large):

* Small: 0.15
* Medium: 0.15
* Large: 0.7

#### 4.3.2 Humidity Weights

Humidity weights are similar to Altitude weights, except there are only 2 values rather than 3- a small and a large. Rather than forming landmasses, you can think of the humidity weights as forming the sizes of “biomes.” The larger the smallHumidityWeight variable, the more biomes will generate, but they will be smaller. The larger the largeHumidityWeight variable, the less biomes will generate, but they will be far larger.

Example 1 (Heavy Small):

* Small: 1
* Large: 0

Example 2 (Even):

* Small: 0.5
* Large: 0.5

Example 3 (Heavy Large):

* Small: 0
* Large: 1

#### 4.3.3 Altitude Grid Sizes

Altitude grid sizes change the level of variation of altitude throughout the planet. The lower the grid size value means the less variation. It is heavily recommended to have higher values for the small grid size variable specifically, as you do not want a large amount of “small tiled” variation.

Example 1 (Standard):

* Small: 128
* Medium: 16
* Large: 4

Example 2 (Even middle):

* Small: 32
* Medium: 32
* Large: 32

Example 3 (Reversed):

* Small: 4
* Medium: 16
* Large: 128

Example 4 (Smaller values):

* Small: 64
* Medium: 8
* Large: 2

#### 4.3.4 Humidity Grid Sizes

Similar to altitude grid sizes, humidity grid sizes change the size and variation of the different tile types (or “biomes”). Like the humidity weights, there are only 2 values for this component. Unlike the altitude grids, you can experiment much more with these values to get any kind of composition you want.

Example 1 (Standard):

* Small: 128
* Large: 8

Example 2 (Smaller Values):

* Small: 64
* Large: 4

Example 3 (Tiny Values):

* Small: 32
* Large: 2

Example 4 (Reversed):

* Small: 8
* Large: 128

Example 5 (Same small values):

* Small: 2
* Large: 2

Example 6 (Same Large Values):

* Small: 128
* Large: 128

### 4.4.0 Altitude and Humidity Thresholds

The altitude and humidity thresholds are important because they decide what types of terrain generate on planets. These thresholds are in direct correlation with the charts seen under 3.05 Terrain Set - Type. The example planet, ID 2, uses the Terrain Pattern = 0 - Earth. The earth terrain type pattern allows the planet to generate with:

* Tundra
* Plains
* Semi-desert
* Light forest
* Swamp
* Plains Hills
* Jungle
* Rough
* Dense Forests
* Mountain Hills
* Rough Hills
* Desert Hills

These will generate depending on the altitude and humidity thresholds, and how they correlate with the following chart.

While grid size and weights control the dispersion of land generation, the thresholds control the baseline for the terrain type for each tile. The above graph works as a matrix, where each altitude value and humidity value decides the terrain type based on the cell they intersect. For example, if the altitude value is less than threshold 5 and the humidity value is less than threshold 3, the tile will generate a dense forest. Of course, “less than” also means between thresholds- so when the chart says “less than threshold 3” it really means “between threshold 3 and threshold 2.”

#### 4.4.1 Editing Only Humidity Thresholds

Example 1 (evenly spread):

* Threshold 1: -0.5
* Threshold 2: 0
* Threshold 3: 0.5

Example 2 (all 0):

* Threshold 1: 0
* Threshold 2: 0
* Threshold 3: 0

Example 3 (all -0.5)

* Threshold 1: -0.5
* Threshold 2: -0.5
* Threshold 3: -0.5

Example 4 (all 0.5)

* Threshold 1: 0.5
* Threshold 2: 0.5
* Threshold 3: 0.5

#### 4.4.2 Editing Only Altitude Thresholds

Example 1 (Evenly Spread):

* Threshold 1: -0.5
* Threshold 2: -0.25
* Threshold 3: 0
* Threshold 4: 0.25
* Threshold 5: 0.5

Example 2 (All 0):

* Threshold 1: 0
* Threshold 2: 0
* Threshold 3: 0
* Threshold 4: 0
* Threshold 5: 0

Example 3 (All -0.5)

* Threshold 1: -0.5
* Threshold 2: -0.5
* Threshold 3: -0.5
* Threshold 4: -0.5
* Threshold 5: -0.5

Example 4 (All 0.5)

* Threshold 1: 0.5
* Threshold 2: 0.5
* Threshold 3: 0.5
* Threshold 4: 0.5
* Threshold 5: 0.5

#### 4.4.3 Thresholds - Summary

As you can see with the above examples, thresholds have a major impact on the terrain types. Humidity and Altitude thresholds also work somewhat differently from eachother, but work off of the same core logic. There is unfortunately no guaranteed formula to get exactly what you want- the best way to work with thresholds is to fiddle with the numbers yourself until you achieve more or less what you’re looking for.