Decision modding

Version

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

This article is for the PC version of Stellaris only.

This page is about how to modify existing and how to create new Decisions.

Decisions are defined at `common/decisions/xxx.txt`.

## Data Structure

* **owned\_planets\_only = <yes/no>** - If yes, this decision can only be enacted on colonized planets. If no, this decision can be enacted on uncolonized planets within the empire's border.
* **sound** - A reference to a sound effect entry that plays when this decision is enacted.
* **icon** - A reference to a GFX entry or filename (without path and file extension if under `gfx/interface/icons/decisions`) that determines the icon of this decision.
* **enactment\_time = <int>** - Days until this decision is enacted. Default 0. If greater than 0, this decision will go through the planetary construction queue and can be canceled by removing from the queue. Otherwise, this decision will be immediately applied, bypassing the construction queue.
* **resources** - An Economy Unit that determines the cost of this decision. Only the "cost" field is wanted.
* **prerequisites = { tech\_xxx }** - A list of Technology keys that determines the technology prerequisites of this decision.
* **potential** - A block of Conditions that determines should this planet have this decision displayed. (Planet scope)
* **allow** - A block of Conditions that determines can this decision be enacted on this planet. (Planet scope)
* **effect** - A block of Effects to be executed on this planet when this decision is enacted. (Planet scope)
* **ai\_weight** - The higher it is, the more likely the AI will try to enact this decision.

Decisions do not have `modifier` fields containing Modifiers. Vanilla decisions implement this by adding Static Modifiers to and removing them from the planet.

## Example

This is the decision "prospect".

```
decision_prospect = {
	owned_planets_only = yes

	enactment_time = 180
	resources = {
		category = decisions
		cost = {
			influence = 25
			energy = 500
		}
	}

	potential = {
		habitable_structure = no
		NOT = { is_planet_class = pc_machine }
		NOT = { is_planet_class = pc_hive }
		NOT = { is_planet_class = pc_city }
		owner = {
			has_swapped_tradition = tr_adaptability_finish
		}
		NOT = { has_planet_flag = planet_prospected }
	}

	effect = {
		custom_tooltip = decision_prospect_effects_short
		hidden_effect = {
			set_planet_flag = planet_prospected
			add_random_non_blocker_deposit = yes
			create_message = {
				type = MESSAGE_TYPE_PLANET_PROSPECTED
				localization = MESSAGE_PLANET_PROSPECTED
				days = 30
				target = this
				variable = {
					type = name
					localization = PLANET
					scope = this
				}
				variable = {
					type = name
					localization = DEPOSIT
					scope = last_added_deposit
				}
			}
		}
	}

	ai_weight = {
		weight = 1
		modifier = {
			factor = 0
			num_pops < 20
		}
	}
}

```

`habitable_structure = no` is a Scripted Trigger. See Dynamic modding for details.

## Decisions On Uncolonized Planets

A decision with `owned_planets_only = no` can be enacted on any planet within the empire's border, not just those colonized.

Note that they would better have `enactment_time = 0`, or it could be a trouble: uncolonized planets do NOT have construction queues displayed in the UI and the player can't get informed of the enactment progress as well as they can't cancel the decision.

```
# this decision turns a barren planet into a terraforming candidate
decisions_on_uncolonized_planets_example = {
	owned_planets_only = no
	enactment_time = 0

	resources = {
		category = decisions
		cost = {
			energy = 10000
		}
	}

	potential = {
		# you would better make this strict enough or this can literally appear on every planet
		OR = {
			is_planet_class = pc_barren
			is_planet_class = pc_barren_cold
		}
		NOT = { has_modifier = terraforming_candidate }
	}

	effect = {
		add_modifier = {
			modifier = terraforming_candidate
			days = -1
		}
	}
}

```

**Modding**