Army 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 modding Armies.

## Data Structure

Armies are defined at "common/armies/xxx.txt".

* **icon\_frame = <int>** - The icon index this army uses in the shared icon file of all armies (gfx\interface\planetview\army\_icon.dds).
* **damage = <float>** - Multiplies the damage. Final damage is: `1.5-3.0 * *damage*`
* **health = <float>** - Multiplies the health. Final health is: `200 * *health*`
* **morale = <float>** - Multiplies the morale. Final morale is: `200 * *morale*`
* **morale\_damage = <float>** - Multiplies the morale damage. Final morale damage is: `1.5-3.0 * *damage* * *morale\_damage*`.
* **has\_morale = <yes/no>** - If no, this army has no morale as well as they are not affected by morale damage. They can still deal morale damage.
* **collateral\_damage = <float>** - During a ground combat, the higher the collateral damage is, the more planetary devastation and the higher the chance of pop kills the army will inflict.
* **war\_exhaustion = <float>** - Multiplies the war exhaustion gained due to having this army killed. Vanilla defense armies always have 0.
* **time = <int>** - Days it takes to build this army.
* **resources** - An Economy Unit that determines the cost and upkeep of this army.
* **has\_species = <yes/no>** - Determines do this army have a species. If yes, this army is counted towards the assault army clause: an empire can't build more assault armies than the number of pops of that species that empire has. If no, this army is never counted towards any clauses, but it will also not benefit from army enhancing species traits like  Strong.
* **pop\_limited = <yes/no>** - If yes, this army is not counted towards any clauses even if it has `has_species = yes`. Used for  Clone Army.
* **defensive = <yes/no>** - If yes, this army can't be transported.
* **is\_pop\_spawned = <yes/no>** - If yes, this army can't be built, instead it's used for defense army spawning jobs such as  Soldier.
* **occupation = <yes/no>** - If yes, this army can't be built, instead it's spawned on each captured planet.
* **potential** & **allow** - Blocks of Conditions to determine if this army is listed / can be built on a planet. If `is_pop_spawned = yes` or `occupation = yes`, instead these blocks are determined should a pop spawn this kind of army. (Planet scope; FROM = species if army has species)
* **on\_queued** & **on\_unqueued** - Blocks of Effects to be executed under the planet scope when this army is added to / removed from the planetary construction queue. (Planet scope)
* **rebel = <yes/no>** - Marks this army a rebel army.
* **prerequisites = { tech\_xxx }** - A list of technology keys to determine the technological prerequisites of this army.
* **show\_tech\_unlock\_if** - A block of Conditions. If evaluated false, this army is hidden from the tooltips of the prerequisite techs. (Country scope)

# Assault Armies
assault_army = {
	damage = 1.00
	health = 1.00
	morale = 1.00
	morale_damage = 1.00
	collateral_damage = 1.00
	war_exhaustion = 1.00
	time = 90
	icon_frame = 2
	prerequisites = { "tech_assault_armies" }
	resources = {
		category = armies
		cost = {
			minerals = 100
		}

		upkeep = {
			energy = 1
		}
	}

	show_tech_unlock_if = {
		OR = {
			NOT = { has_authority = auth_machine_intelligence }
			has_valid_civic = civic_machine_assimilator
		}
	}
	potential = {
		from = {
			NOR = {
				has_trait = "trait_mechanical"
				has_trait = "trait_machine_unit"
				is_sapient = no
			}
		}
		owner = {
			OR = {
				NOT = { has_authority = auth_machine_intelligence }
				has_valid_civic = civic_machine_assimilator
			}
		}
	}
}

```

# Defense Armies
defense_army = {
	defensive = yes
	is_pop_spawned = yes
	health = 1.25
	damage = 1.50
	morale = 1.25
	collateral_damage = 0.0
	war_exhaustion = 0.0 # No WE from defense armies
	icon_frame = 1

	potential = {
		from = {
			NOR = {
				has_trait = "trait_mechanical"
				has_trait = "trait_machine_unit"
				is_sapient = no
			}
		}
		owner = {
			is_primitive = no
			OR = {
				NOT = { has_authority = auth_machine_intelligence }
				has_valid_civic = civic_machine_assimilator
			}
		}
	}
}

```

# Currently limited to 3. Ideally it would be X * Num of planets you have done the project one, but that is too complex for scripts
titanic_assault_army = {
	damage = 3.0
	health = 5.0
	morale = 3.0
	morale_damage = 2.0
	collateral_damage = 3.0
	war_exhaustion = 2.0
	time = 90
	icon_frame = 8
	has_species = no

	resources = {
		category = armies
		cost = {
			minerals = 300
		}

		upkeep = {
			energy = 1
		}
	}

	potential = {
		custom_tooltip = {
			text = titanic_troop_limit_tooltip
			planet = { has_planet_flag = titanic_life_can_build }
			owner = {
				has_country_flag = titanic_life_soldiers
			}
		}
	}

	allow = {
		custom_tooltip = {
			text = titanic_troop_limit_tooltip
			planet = { has_planet_flag = titanic_life_can_build }
			owner = {
				has_country_flag = titanic_life_soldiers
				NOT = {
					 check_variable = {
						which = "titanic_life_soldier_count"
						value = 3
					}
				}
			}
		}
	}

	on_queued = {
		owner = {
			change_variable = {
				which = "titanic_life_soldier_count"
				value = 1
			}
		}
	}

	on_unqueued = {
		owner = {
			change_variable = {
				which = "titanic_life_soldier_count"
				value = -1
			}
		}
	}
}

```

# Rampaging Tree Armies
tree_army = {
	defensive = yes
	damage = 1.0
	morale_damage = 1.0
	health = 1.0
	has_morale = no
	icon_frame = 8
	has_species = no

	potential = {
		always = no
	}
}

```

**Modding**