Planet modding - Stellaris Wiki (2024)

Version

Planet modding - Stellaris Wiki (1)

Please help with verifying or updating older sections of this article. At least some were last verified for version 3.1.

This article is for the PC version of Stellaris only.

This guide is for adding and modifying Celestial bodies to the game. For guidelines on how to use them in solar systems, including adding modifiers and inhabitants, see System modding.

Contents

  • 1 Overview
  • 2 Planet variables
  • 3 Planet rules
  • 4 Examples
  • 5 Planet icons
  • 6 Terraforming

Overview[edit | edit source]

Planet and star classes can be found in common/planet_classes. Note that "stars" and "star classes" are two different things: individual stars are considered the same as planets in the game code, while star classes (found in common/star_classes) refer to the classification of a solar system as a whole and will determine lighting, the system's icon in the galaxy map, and number of individual stars in a solar system. Information about modding star classes can be found here.

Creating a new planet class is easy: one simply chooses an internal name (ex: "pc_volcanic") and defines how the planet will work in the context of the game. Is it a colonizable world? A star? An inhabitable megastructure? Etc. The internal name doesn't need to reflect the planet's "real" name; using localisation, the name visible to players can be whatever you want it to be.

Planet variables[edit | edit source]

Variable NameDefault ValueDescription
@planet_standard_scale11Ambiguous, determines visual size of planet?
@habitable_planet_max_size25Maximum tile count for planets
@habitable_planet_min_size12Minimum tile count for planets
@habitable_moon_max_size15Maximum tile count for moons
@habitable_moon_min_size10Minimum tile count for moons
@habitable_min_distance60Minimum altitude above body (orbit height)
@habitable_max_distance100Maximum altitude above body (orbit height)
@habitable_spawn_odds0.5Rational spawn chances (n/1?)

Planet rules[edit | edit source]

The following is a list of the different rules you can apply to a planet. The planet will not randomly spawn if these rules are not met, though they can sometimes be bypassed through system modding.

Rule NameDescriptionNotes
asteroidIs this an asteroid.Defaults to no.
atmosphere_colorThe color of your planet's atmosphere.In the form hsv { 0.0 0.5 1.0 }; numbers must be between 0.0 and 1.0.
atmosphere_intensityThe saturation of your planet's atmosphere.Between 0.0 and 1.0.
atmosphere_widthThe thickness of your planet's atmosphere.Between 0.0 and 1.0.
can_be_moonIf no, this planet class will never be used for moons orbiting planets.Defaults to yes.
carry_cap_per_free_districtAdditional carrying capacity per free district slots.Example: carry_cap_per_free_district: 4
chance_of_ringThe probability that this planet will spawn with a ring system.Between 0.0 and 1.0.
city_color_lutA transparent filter that is applied to cities (if habitable) to make it better blend with the background.Must specify the location of the filter. Only necessary on habitable worlds with visible cities.
climateThe planet's climate type.Either "dry", "wet", "cold", a modded climate, or none specified.
colonizableCan this planet be colonized or otherwise inhabited, by players and the AI?
colonization_techTechnology required to colonize.Defaults to empty. Planet class will still show as colonizable without the tech, and say what tech is required.
default_planet_selectionDefaults to no.
district_setString, for use in the uses_district_set trigger for easy compatibility.
enable_tiltIf no, disables planet tilt for this planet class.Defaults to yes. Planet tilt is defined in defines.
entityThe planet entities your planet will use by default.You can create a custom set of entities (such as "volcanic_planet") or use an existing one (such as "arctic_planet").
entity_face_objectIf no, disables rotation to face what it orbits.Defaults to yes.
entity_scaleThe size of this planet model compared to others.@planet_standard_scale by default.
extra_orbit_sizeIf higher than 0, will increase the size of the planet's orbit.Gas giants are the only "normal" planet with a value higher than 0 at present.
extra_planet_countIf higher than 0, will increase the number of planets this planet counts as.Gas giants are the only "normal" planet with a value higher than 0 at present.
fixed_city_levelPermanently applies a fixed amount of infrastructure to this planet's backdrop.Example: fixed_city_level = 6
fixed_entity_scaleIf yes, this planet's visible size will always be the same regardless of its actual size.Defaults to no.
habitatIs this a habitat?Defaults to no.
has_colonization_influence_costIf yes, players/AI will have to spend Influence to colonize this planet class.Appears to be an obsolete feature as of Patch 2.0.
iconThe icon your planet uses.See Planet icons below.
idealIf yes, this planet will always be 100% habitable to all species.Defaults to no.
initialCan this planet be used to spawn for custom species?Defaults to no.
is_artificial_planetWill make sure that modifiers for non artificial planets are not added, e.g. max districts.Defaults to no.
max_distance_from_sunThe maximum orbital distance at which this planet can randomly spawn.Probably the distance from the center of the system, not the sun itself. How this works in binary or trinary systems is still unclear.
min_distance_from_sunThe minimum orbital distance at which this planet can randomly spawn.Probably the distance from the center of the system, not the sun itself. How this works in binary or trinary systems is still unclear.
modifierApplies a permanent modifier to this planet, adjusting resource production, pop growth speed, etc.modifier = { <effect > }
moon_sizeThe range of sizes that this planet will use if it is a moon.moon_size = { min = <value> max = <value> }
orbit_linesIf no, disabled orbit lines for this planet class.Defaults to yes.
pictureApplies an existing planet's backdrop instead of a custom one.Example: picture = pc_gaia.
place_entity_on_planet_planeIf no, will be put above the plane planets are in in the solar system.Defaults to yes.
planet_sizeThe range of sizes that this planet will use if it is not a moon.planet_size = { min = <value> max = <value> }
preview_entity
production_spawn_chance???Between 0.0 and 1.0.
ringworldIs this planet a ringworld?Defaults to no.
show_cityIf no, any cities on this planet will not be visible in the backdrop.Defaults to yes.
space_monster_targetCountry types with space monster AI will wander to this planet type if set to yes.
spawn_oddsThe likelihood that this planet will randomly spawn if all conditions are met.
starIs this planet class a star?Defaults to no.
star_gfxDoes this star glow brightly?Defaults to yes if it is a star.
starting_planetCan players/AI start on this planet class?
survey_time_factorMultiplier on survey time.Defaults to 1.
tile_setDetermines the appearance of this planet's tiles.Only necessary if using tiles that don't match your planet class's name (ex: using "pc_gaia" for a planet called "pc_volcanic").
uses_alternative_skies_for_moonsIf yes, when it spawns as a moon, it will show a planet in the backdrop, with a ring as appropriate.
uses_alternative_skies_if_has_orbital_ringIf yes, when it has an orbital ring, it will show it in the backdrop.Defaults to no.

Examples[edit | edit source]

A desert world:

pc_desert = {entity = "desert_planet"icon = GFX_planet_type_desertclimate = "dry"initial = yesentity_scale = @planet_standard_scaleatmosphere_color= hsv { 0.50 0.2 0.8 }#DONEatmosphere_intensity= 1.0atmosphere_width= 0.5min_distance_from_sun = @habitable_min_distancemax_distance_from_sun = @habitable_max_distancespawn_odds = @habitable_spawn_oddscity_color_lut = "gfx/portraits/misc/colorcorrection_desert.dds"extra_orbit_size = 0extra_planet_count = 0chance_of_ring = 0.2planet_size = { min = @habitable_planet_min_size max = @habitable_planet_max_size }moon_size = { min = @habitable_moon_min_size max = @habitable_moon_max_size }production_spawn_chance = 0.4colonizable = yesdistrict_set = standarduses_alternative_skies_for_moons = nocarry_cap_per_free_district = @carry_cap_normal}

A toxic world:

pc_toxic = {entity = "toxic_planet"entity_scale = @planet_standard_scaleicon = GFX_planet_type_toxicatmosphere_color= hsv { 0.19 0.45 0.9 }#DONEatmosphere_intensity= 0.1atmosphere_width= 1.2min_distance_from_sun = 60max_distance_from_sun = 110spawn_odds = 10extra_orbit_size = 0extra_planet_count = 0chance_of_ring = 0.2planet_size = { min = 12 max = 25 }moon_size = { min = 6 max = 10 }colonizable = noshow_city = no}

A habitable ringworld section:

pc_ringworld_habitable = {ringworld = yesentity = "ringworld_habitable_entity"preview_entity = "ringworld_01_damaged_full_entity"picture = pc_ringworldicon = GFX_planet_type_ringworldentity_scale = 1.0enable_tilt = nofixed_entity_scale = yesatmosphere_color= hsv { 0.0 0.0 1.0 }#DONEatmosphere_intensity= 1.0atmosphere_width= 0.5show_city = yescity_color_lut = "gfx/portraits/misc/colorcorrection_continental.dds"extra_orbit_size = 0extra_planet_count = 0chance_of_ring = 0.0planet_size = 10moon_size = 1colonizable = yesdistrict_set = ring_worldideal = yesstarting_planet = noorbit_lines = nohas_colonization_influence_cost = no# applies when within own bordersis_artificial_planet = yesmodifier = {planet_max_buildings_add = 12}carry_cap_per_free_district = @carry_cap_normal}

A class-F star:

pc_f_star = {entity = "f_star_class_star_entity"entity_scale = 20.0picture = "pc_f_star"icon = GFX_planet_type_f_g_staratmosphere_color= hsv { 0.6 0.3 0.6 }atmosphere_intensity= 1.0atmosphere_width= 0.5star = yesmin_distance_from_sun = 0max_distance_from_sun = 0spawn_odds = 0extra_orbit_size = 0extra_planet_count = 0chance_of_ring = 0planet_size = { min = 20 max = 35 }colonizable = no}

Planet icons[edit | edit source]

Planet icons can be found in gfx/interface/icons/planet_type_icons.dds, and their sprites are documented in interface/planet.gfx. For reference, here is a list of which values to use for which icon:

Icon#
GFX_planet_type_desert
GFX_planet_type_arid
GFX_planet_type_tundra
GFX_planet_type_continental
GFX_planet_type_tropical
GFX_planet_type_ocean
GFX_planet_type_arctic
GFX_planet_type_gaia
GFX_planet_type_barren_cold
GFX_planet_type_barren
Icon#
GFX_planet_type_toxic
GFX_planet_type_molten
GFX_planet_type_frozen
GFX_planet_type_gas_giant
GFX_planet_type_machine
GFX_planet_type_hive
GFX_planet_type_nuked
GFX_planet_type_asteroid
GFX_planet_type_alpine
GFX_planet_type_savannah
Icon#
GFX_planet_type_ringworld
GFX_planet_type_habitat
GFX_planet_type_shrouded
GFX_planet_type_city
GFX_planet_type_m_star
GFX_planet_type_f_g_star
GFX_planet_type_k_star
GFX_planet_type_a_b_star
GFX_planet_type_pulsar
GFX_planet_type_neutron_star
GFX_planet_type_black_hole

Terraforming[edit | edit source]

Terraforming is defined separately from planets in files found in common/terraform. These are relatively straightforward definitions, but do need to be defined for each individual link between two planet types. That means, for example, if a modder wishes to add a new planet type that can be terraformed into anything and have anything terraformed into it they will have to define two links for each existing planet type, one to transform a given type into the new one, and one to transform the new one into each existing type. A basic example of a terraforming link definition can be seen below:

 terraform_link = { from = "pc_continental" to = "pc_tropical" energy = 2000 duration = 1800 condition = { has_technology = "tech_terrestrial_sculpting" } ai_weight = { weight = 0 } }

Each link definition starts with the header terraform_link and then is followed by arguments determining the starting and ending planet classes for the terraforming operation. After that it is followed by the cost of the terraforming operation as well as how long the operation will take to complete. Afterwards the link has a condition block. This is used to determine what requirements are needed before a terraforming operation can be performed, and is used to lock certain transformations behind technology or ascension perks. Lastly a terraforming link definition includes an ai_weight entry, which is used to determine whether or not an AI will perform a terraforming.

If desired there are some slightly modifications that can be performed on the basic format. One is to use a potential block. When used this will cause the terraforming option to only appear if the listed requirements are met. For example, this terraforming link definition

 terraform_link = { from = "pc_barren_cold" to = "pc_arctic" energy = 5000 duration = 3600 potential = { from = { has_modifier = terraforming_candidate } } condition = { has_technology = "tech_climate_restoration" } effect = { from = { remove_modifier = terraforming_candidate } } ai_weight = { weight = 5 } }

Will only show up in the menu if the pc_barren_cold planet also has the terraforming_candidate modifier, and will not be available otherwise.

A final note is that terraform_link's also support effect blocks as well. These are operations that are performed immediately upon completion of the terraforming operation. For example, adding this block:

 effect = { from = { remove_modifier = terraforming_candidate } }

Will cause the "terraforming_candidate" modifier to be removed from the terraformed planet upon completion.

Modding

EmpireEmpireEthicsGovernments • Civics • OriginsMandatesAgendasTraditions • Ascension perksEdictsPoliciesRelicsTechnologiesCustom empires
PopsJobsFactions
LeadersLeadersLeader traits
SpeciesSpeciesSpecies traits
PlanetsPlanetsPlanetary feature • Orbital depositBuildings • DistrictsPlanetary decisions
SystemsSystemsStarbasesMegastructuresBypassesMap
FleetsFleetsShips • Components
Land warfareArmiesBombardment stance
DiplomacyDiplomacy • Federations • Galactic communityOpinion modifiersCasus Belli • War goals
EventsEventsAnomaliesSpecial projectsArchaeological sites
GameplayGameplayDefinesResources • EconomyGame start
Dynamic moddingDynamic moddingEffectsConditionsScopesModifiersVariablesAIOn actions
Media/localisationMaya exporterPortraitsFlagsEvent picturesInterfaceIconsMusicLocalisation
OtherConsole commandsSave-game editingSteam WorkshopModding tutorial
Planet modding - Stellaris Wiki (2024)
Top Articles
Latest Posts
Article information

Author: Amb. Frankie Simonis

Last Updated:

Views: 5570

Rating: 4.6 / 5 (76 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Amb. Frankie Simonis

Birthday: 1998-02-19

Address: 64841 Delmar Isle, North Wiley, OR 74073

Phone: +17844167847676

Job: Forward IT Agent

Hobby: LARPing, Kitesurfing, Sewing, Digital arts, Sand art, Gardening, Dance

Introduction: My name is Amb. Frankie Simonis, I am a hilarious, enchanting, energetic, cooperative, innocent, cute, joyous person who loves writing and wants to share my knowledge and understanding with you.