Skip to content

Instantly share code, notes, and snippets.

@ttowncompiled
Created July 27, 2020 15:16
Show Gist options
  • Save ttowncompiled/7faa311431acbbb6841700eab850a4c8 to your computer and use it in GitHub Desktop.
Save ttowncompiled/7faa311431acbbb6841700eab850a4c8 to your computer and use it in GitHub Desktop.
Template for *_on_actions.txt file for Stellaris event modding.
# Triggers when the game starts
on_game_start = {
events = {
}
}
on_game_start_country = {
events = {
}
}
# No scope, like on_game_start
on_monthly_pulse = {
events = {
}
}
# No scope, like on_game_start
on_yearly_pulse = {
events = {
}
}
# No scope, like on_game_start
on_bi_yearly_pulse = {
events = {
}
}
# No scope, like on_game_start
on_five_year_pulse = {
events = {
}
}
# No scope, like on_game_start
on_decade_pulse = {
events = {
}
}
# No scope, like on_game_start
on_mid_game_pulse = {
events = {
}
}
# No scope, like on_game_start
on_late_game_pulse = {
events = {
}
}
# this = country
on_monthly_pulse_country = {
events = {
}
}
# this = country
on_yearly_pulse_country = {
events = {
}
}
# this = country
on_bi_yearly_pulse_country = {
events = {
}
}
# this = country
on_five_year_pulse_country = {
events = {
}
}
# this = country
on_decade_pulse_country = {
events = {
}
}
# this = country
on_mid_game_pulse_country = {
events = {
}
}
# this = country
on_late_game_pulse_country = {
events = {
}
}
# setup advanced colony. So far it has a pop on the capital and a colony shelter building matching the is_colony trigger
# scope: planet
# from: country
on_initialize_advanced_colony = {
events = {
}
}
on_become_advanced_empire = {
events = {
}
}
# Triggers when pressing begin in the intro window
# This = country to press begin
on_press_begin = {
events = {
}
}
# Triggers when trying to open the diplomacy view for countries with custom diplomacy.
# Country scope
# This = target country (player)
# From = source country
on_custom_diplomacy = {
events = {
}
}
# Triggered when two empires discover each other
# This = Empire 1
# From = Empire 2
# Fromfromfrom = System where contact occurred
on_first_contact = {
events = {
}
}
# Triggered when an Empire has fleets within another Empire's borders.
# This = receiver
# From = sender
# FromFrom = fleet
# FromFromFrom = system
on_enforce_borders = {
events = {
}
}
# Triggers country_event for the attacker upon victory
# (Before controller is switched)
# This = country, leader attacker
# From = country, planet owner
# FromFrom = planet
# IDENTITIES: attacker is the side that "IsHostile" to
# the planet controller; e.g. spawned monster armies
# are attackers, but if they win and the player attempts
# to retake the planet, the player is the attacker
on_planet_attackers_win = {
events = {
}
}
# Triggers country_event for the attacker upon defeat
# This = country, attack leader
# From = country, planet owner
# FromFrom = planet
on_planet_attackers_lose = {
events = {
}
}
# Triggers country_event for the defender upon victory
# Root = country, planet owner
# From = country, attack leader
# FromFrom = planet
on_planet_defenders_win = {
events = {
}
}
# Triggers country_event for the defender upon defeat
# This = country, planet owner
# From = country, attack leader
# FromFrom = planet
on_planet_defenders_lose = {
events = {
}
}
# Fires when you first get intel (_low and up) on a new system
# Scope = Country
# From = System
on_system_first_visited = {
events = {
}
}
# Triggers event when each country first sends a ship into the system (once per country)
# Scope = Ship
# From = System
# FromFrom = Country
on_entering_system_first_time = {
events = {
}
}
# Triggers event when ship enters a system. It's usually better to use on_entering_system_first_time or on_entering_system_fleet
# Scope = Ship
# From = System
# FromFrom = Country
on_entering_system = {
events = {
}
}
# A fleet has entered a system
# Scope = Fleet
# From = System
on_entering_system_fleet = {
events = {
}
}
# A fleet executes a move order to exit borders
# Scope = Fleet
# From = Origin System
# FromFrom = Destination System
on_crossing_border = {
events = {
}
# A ship has surveyed a planet.
# Scope = Ship
# From = Planet
on_survey = {
events = {
}
}
# A country has gained a surveyed status on a planet. Happens after "on_survey" if a science ship surveyed a planet.
# Root = Planet
# From = Country
# FromFrom = Fleet of the science ship that surveyed it, if any
on_planet_surveyed = {
events = {
}
}
# A country has gained a surveyed status on a planet. Happens after "on_survey" if a science ship surveyed a planet.
# Root = Country
# From = system
# FromFrom = Fleet of the science ship that surveyed it, if any
on_system_survey = {
events = {
}
}
# A ship is done surveying the last unsurveyed planet in a system
# Scope = ship
# From = system
on_system_survey_ship = {
events = {
}
}
# A planet has begun the colonization process.
# Scope = Planet
on_colonization_started = {
events = {
}
}
# A planet has been colonized.
# Scope = Planet
on_colonized = {
events = {
}
}
# A colony has been destroyed. Called just before owner and controller is cleared
# Scope = Planet
on_colony_destroyed = {
events = {
}
}
# This = owner of fleet 1
# From = owner of fleet 2
# FromFrom = fleet 1
# FromFromFrom = fleet 2
on_entering_battle = {
events = {
}
}
# This = owner of ship 1 (destroyed)
# From = owner of ship 2 (combatant)
# FromFrom = ship 1
# FromFromFrom = ship 2
on_ship_destroyed_victim = {
events = {
}
}
# This = owner of ship 1 (combatant)
# From = owner of ship 2 (destroyed)
# FromFrom = ship 1
# FromFromFrom = ship 2
on_ship_destroyed_perp = {
events = {
}
}
# This = owner of ship 1 (destroyed)
# From = owner of ship 2 (combatant)
# FromFrom = ship 1
# FromFromFrom = ship 2
on_ship_disengaged_victim = {
events = {
}
}
# This = owner of ship 1 (combatant)
# From = owner of ship 2 (destroyed)
# FromFrom = ship 1
# FromFromFrom = ship 2
on_ship_disengaged_perp = {
events = {
}
}
# This = owner of fleet 1 (destroyed)
# From = owner of fleet 2 (combatant)
# FromFrom = fleet 1
# FromFromFrom = fleet 2
on_fleet_destroyed_victim = {
events = {
}
}
# This = owner of fleet 1 (combatant)
# From = owner of fleet 2 (destroyed)
# FromFrom = fleet 1
# FromFromFrom = fleet 2
on_fleet_destroyed_perp = {
events = {
}
}
# This = owner of fleet 1 (winner)
# From = owner of fleet 2 (loser)
# FromFrom = fleet 1
# FromFromFrom = fleet 2
on_space_battle_won = {
events = {
}
}
# This = owner of fleet 1 (loser)
# From = owner of fleet 2 (winner)
# FromFrom = fleet 1
# FromFromFrom = fleet 2
on_space_battle_lost = {
events = {
}
}
# This = owner of fleet
# From = disbanded fleet
on_fleet_disbanded = {
events = {
}
}
# This = owner of fleet
# From = fleet
# FromFrom = planet (if any)
on_fleet_auto_move_arrival = {
events = {
}
}
# The game will generate one on_building_X on_action for every station ship-size
# Orbital stations will get the planet in FROM, space stations only get they building ship
# This = construction ship
# From = planet it is built on
# Fires when construction is complete,
# immediately before station is created
on_building_mining_station = {
events = {
}
}
# This = construction ship
# From = planet it is built on
# Fires when construction is complete,
# immediately before station is created
on_building_research_station = {
events = {
}
}
# This = construction ship
# From = planet it is built on
# Fires when construction is complete,
# immediately before station is created
on_building_outpost_station = {
events = {
}
}
# This = construction ship
# Fires when construction is complete,
# immediately before station is created
on_building_wormhole_station = {
events = {
}
}
on_building_starbase_outpost = {
events = {
}
}
on_building_observation_station = {
events = {
}
}
on_building_starbase_ai = {
events = {
}
}
# This = construction ship
# Fires when construction is complete,
# immediately before station is created
on_building_starbase_exd_0 = {
events = {
}
}
on_building_starbase_exd = {
events = {
}
}
on_building_starbase_swarm = {
events = {
}
}
on_building_starbase_marauder = {
events = {
}
}
# This = country
# From = opponent war leader
on_entering_war = {
events = {
}
}
# This = Country
# From = Fleet
on_fleet_detected = {
events = {
}
}
# This = Ship
# From = Disabler Ship
on_ship_disabled = {
events = {
}
}
# This = Ship
on_ship_enabled = {
events = {
}
}
# Triggers when a Special Project to uplift a pre-sapient species is completed.
# Note that this will trigger once for each combination of planet & original
# species (but for uplifting this should be only once).
#
# Scope = planet_event
# This = planet scope
# From = uplifted species (pre-modification)
on_uplift_completion = {
events = {
}
}
# This = Pop scope
# From = Planet
on_purge_begun = {
events = {
}
}
# This = Pop scope
# From = Planet
on_purge_canceled = {
events = {
}
}
# Planets starts being terraformed
# This = Planet
# From = Terraforming country
on_terraforming_begun = {
events = {
}
}
# Planet has been terraformed
# This = Planet
# From = Terraforming country
on_terraforming_complete = {
events = {
}
}
# Planet has taken damage from orbital bombardment - Damage is applied daily
# This = Planet
# From = Bombarder
on_planet_bombarded = {
events = {
}
}
# Planet has reached 0 pops from orbital bombardment
# This = Planet
# From = Bombarder
on_planet_zero_pops = {
events = {
}
}
# Planet has reached 0 health from collateral damage
# This = Planet
# From = Army owner
on_planet_zero_health_ground_combat = {
events = {
}
}
# Pop is abducted by raiding stance
# This = Pop scope
# From = planet abducted from
on_pop_abducted = {
events = {
}
}
# Pop is enslaved
# This = Pop scope
# owner_species = { (species)
# owner = { owner_species = { (empire main species)
# owner = { (empire)
on_pop_enslaved = {
events = {
}
}
# Pop is released from slavery
# This = Pop scope
# owner_species = { (species)
# owner = { owner_species = { (empire main species)
# owner = { (empire)
on_pop_emancipated = {
events = {
}
}
# Executed right before a country has established communications with another country
# This = Country which established the communications
# From = Country which communications were established with
on_pre_communications_established = {
events = {
}
}
# Executed right after country has established communications with another country
# This = Country which established the communications
# From = Country which communications were established with
on_post_communications_established = {
events = {
}
}
# Executed as a leader has died
# This = Country
# From = Leader
on_leader_death = {
events = {
}
}
# A leader leveled up.
# Scope = Country
# From = Leader
on_leader_level_up = {
events = {
}
}
# Executed as new ruler has been set
# This = Country
on_ruler_set = {
events = {
}
}
# Executed when a ruler has been removed
# From = Previous Ruler
# This = Country
on_ruler_removed = {
events = {
}
}
# Executed when the ruler is ousted and goes back to their pre-ruler class
# From = Previous Ruler, already has the new class
# This = Country
on_ruler_back_to_pre_ruler_class = {
events = {
}
}
# This = Planet
on_blocker_cleared = {
events = {
}
}
# A ship has started a new order
# Root = Ship
# From = Country
on_ship_order = {
events = {
}
}
# Executes after a policy has been changed
# use last_changed_policy to identify which policy it was
# This = Country
on_policy_changed = {
events = {
}
}
# A ship has been built
# Root = Ship
# From = Planet
on_ship_built = {
events = {
}
}
# A ship design has been finished
# Root = Country
on_ship_designed = {
events = {
}
}
# A ship has been upgraded
# Root = Ship
on_ship_upgraded = {
events = {
}
}
# A war is beginning, executed for every country in the war.
# Root = Country
# From = War
on_war_beginning = {
events = {
}
}
# A war has ended
# Root = Loser
# From = Main Winner
on_war_ended = {
events = {
}
}
# A country has increased the level of a tech, use last_increased_tech trigger to check tech and level.
# This = Country
on_tech_increased = {
events = {
}
}
# Triggers when a Special Project to apply a species modification template has completed.
# Note that this will trigger once for each combination of planet & original species.
#
# This = Country
# From = Species ( Post Modification )
on_modification_complete = {
events = {
}
}
# A planets controller becomes a country not the same as the owner.
# Root = Planet
# From = Planet Owner
# FromFrom = Planet Controller (the one occupying)
on_planet_occupied = {
events = {
}
}
# A fleet has successfully escaped from combat, executed right before the fleet enters FTL
# This = escaping fleet
# From = system escaped from
# FromFrom = system escaping to
on_emergency_ftl = {
events = {
}
}
#An army construction has been completed.
# This = Planet
# From = Army
on_army_recruited = {
events = {
}
}
#A building construction has been completed.
# This = Planet
on_building_complete = {
events = {
}
}
# A building construction has been queued.
# This = Planet
on_building_queued = {
events = {
}
}
# A building construction has been unqueued.
# This = Planet
on_building_unqueued = {
events = {
}
}
# A building construction has been completed, which is an upgrade of previous building.
# This = Planet
on_building_upgraded = {
events = {
}
}
# A building construction has demolished.
# This = Planet
on_building_demolished = {
events = {
}
}
#A district construction has been completed.
# This = Planet
on_district_complete = {
events = {
}
}
# A building construction has finished, replacing another building.
# This = Planet
on_building_replaced = {
events = {
}
}
# A district construction has been queued.
# This = Planet
on_district_queued = {
events = {
}
}
# A district construction has been unqueued.
# This = Planet
on_district_unqueued = {
events = {
}
}
# A district construction has demolished.
# This = Planet
on_district_demolished = {
events = {
}
}
# Tutorial level for a country has changed
# This = Country
on_tutorial_level_changed = {
events = {
}
}
# A war has been won
# Root = Winner Warleader
# From = Loser Warleader
# FromFrom = War
on_war_won = {
events = {
}
}
# A war has been lost
# Root = Loser Warleader
# From = Winner Warleader
# FromFrom = War
on_war_lost = {
events = {
}
}
# A status quo has been signed
# Root = Actor
# From = Recipient
# FromFrom = Main Attacker
# FromFromFrom = Main Defender
# FromFromFromFrom = War
on_status_quo = {
events = {
}
}
# A status quo has been signed, by force
# Root = Recipient
# From = Actor
# FromFrom = Main Attacker
# FromFromFrom = Main Defender
# FromFromFromFrom = War
on_status_quo_forced = {
events = {
}
}
# A pop has been added to the planet
# Root = pop
# From = planet
on_pop_added = {
events = {
}
}
# We changed a species right
# This = pop
on_pop_rights_change = {
events = {
}
}
# A pop has finished growing
# This = Planet scope
# From = Country
# FromFrom = Pop
on_pop_grown = {
events = {
}
}
# A pop has finished assembling
# This = Planet scope
# From = Country
# FromFrom = Pop
on_pop_assembled = {
events = {
}
}
# A pop has finished purging
# This = Planet scope
# From = Country
# FromFrom = Pop
on_pop_purged = {
events = {
}
}
# A pop has finished declining (while not being purged)
# This = Planet scope
# From = Country
# FromFrom = Pop
on_pop_declined = {
events = {
}
}
# A pop has been displaced
# This = Planet scope
# From = Country
# FromFrom = Pop
on_pop_displaced = {
events = {
}
}
# Initial rebels manage to take control of the planet, happens before the new owner is set, after the war is created.
# This = Rebel Country
# From = Planet
# FromFrom = War
on_rebels_take_planet = {
events = {
}
}
# Initial rebels manage to take control of the planet, happens after the new owner is set, after the war is created.
# This = Rebel Country
# From = Planet
# FromFrom = War
on_rebels_take_planet_owner_switched = {
events = {
}
}
#From = Country scope
#This = Planet scope
on_planet_ownerless = {
events = {
}
}
#Fired whenever a new owner is set for a planet,
#be it after a war or through a trade
#From = Country scope (new owner)
#This = Planet scope
on_planet_transfer = {
events = {
}
}
#Fired whenever a new owner is set for a planet, and the planet was aggressively conquered
#Fired in ADDITION to on_planet_transfer
#From = Country scope (new owner)
#This = Planet scope
on_planet_conquer = {
events = {
}
}
#From = Planet scope
#This = Fleet scope
on_fleet_enter_orbit = {
events = {
}
}
#This = Federation leader
#From = Joining member
on_join_federation = {
events = {
}
}
#This = Federation leader
#From = Leaving member
on_leave_federation = {
events = {
}
}
#This = Country scope, federation leader
#From = Country to initiate the vote
on_federation_law_vote_succeed = {
events = {
}
}
#This = Country scope, federation leader
#From = Country to initiate the vote
on_federation_law_vote_failed = {
events = {
}
}
#This = Country scope, federation leader
#From = Country to exclude from the federation elections
on_federation_leader_elections = {
events = {
}
}
#This = Country scope, federation leader
#From = Country to exclude from the federation psionicbattle
on_federation_leader_challenge = {
events = {
}
}
#This = destroyed country
#From = optional, destroyer (country)
on_country_destroyed = {
events = {
}
}
# A Megastructure has been built
# Root = Country
# From = Megastructure
# FromFrom = System
# FromFromFrom = Fleet
on_megastructure_built = {
events = {
}
}
# A Megastructure has begun to be upgraded
# Root = Country
# From = Megastructure
# FromFrom = System
on_megastructure_upgrade_begin = {
events = {
}
# A Megastructure has been upgraded
# Root = Country
# From = Megastructure
# FromFrom = System
on_megastructure_upgraded = {
events = {
}
}
# X years has passed since a planet was colonized (won't trigger on empire homeworld)
on_colony_1_year_old = {
events = {
}
}
on_colony_2_years_old = {
events = {
}
}
on_colony_3_years_old = {
events = {
}
}
on_colony_4_years_old = {
events = {
}
}
on_colony_5_years_old = {
events = {
}
}
on_colony_6_years_old = {
events = {
}
}
on_colony_7_years_old = {
events = {
}
}
on_colony_8_years_old = {
events = {
}
}
on_colony_9_years_old = {
events = {
}
}
on_colony_10_years_old = {
events = {
}
}
# Fires for each planet every 5 years (counting up from colonisation date)
on_colony_5_year_pulse = {
events = {
}
}
# a new leader is generated for an empire, to be available for recruitment
# scope: country, from: leader
on_leader_spawned = {
events = {
}
}
# called during empire initialization when starting a new game
# scope: country
empire_init_add_technologies = {
events = {
}
}
# Called during empire initialization when starting a new game if has_secondary_species game rule is true.
# Called before empire_init_create_capital_pops.
# scope: planet
# from: founder species
# fromfrom: secondary species (if exists)
empire_init_capital_planet = {
events = {
# at this point the species might have changed (because we added traits), so FROMFROM might not be the secondary species anymore
}
}
# called during empire initialization when starting a new game
# scope: country
empire_init_create_ships = {
events = {
}
}
# Called when an election starts
# scope: country
on_election_started = {
events = {
}
}
# Called when an election ends
# scope: country
on_election_ended = {
events = {
}
}
# Called upon entering FTL (on-action name scripted on the Bypass type)
# THIS = Fleet
# FROM = System jumping to
# FROMFROM = System jumped from
on_entering_gateway = {
events = {
}
}
# Called upon entering FTL (on-action name scripted on the Bypass type)
# THIS = Fleet
# FROM = System jumping to
# FROMFROM = System jumped from
on_entering_wormhole = {
events = {
}
}
# THIS = Fleet
on_jump_drive = {
events = {
}
}
# this = country
on_pirate_spawn = {
events = {
}
}
# Called when a Starbase changes owner
# THIS = Ship (Starbase)
# FROM = Former Owner (Country)
on_starbase_transfer = {
events = {
}
}
#
# Both the following on_action are called when fleet joined combat
# (The first one is called for the attacker fleet, the second one is called for the defending fleet)
#
# This = Aggressor Fleet
# From = Attacked Fleet
# FromFrom = Additional Attacked Fleet (if part of ongoing combat)
# FromFromFrom = Additional Attacked Fleet (if part of ongoing combat)
on_fleet_combat_joined_attacker = {
events = {
}
}
# This = Attacked Fleet
# From = Aggressor Fleet
# FromFrom = Additional Attacked Fleet (if joining ongoing combat)
# FromFromFrom = Additional Attacked Fleet (if joining ongoing combat)
on_fleet_combat_joined_defender = {
events = {
}
}
# From = system
# FromFrom = country (new owner)
# This = country (previous owner)
on_system_lost = {
events = {
}
}
# From = system
# FromFrom = country (previous owner)
# This = country (new owner)
on_system_gained = {
events = {
}
}
# This = Pop
# From = Country (buyer)
# Fromfrom = Country (seller)
on_slave_sold_on_market = {
events = {
}
}
# This = Country
on_relic_activated = {
events = {
}
}
# This = Fleet ( science vessel )
# From = Archaeological Site
on_arch_stage_finished = {
events = {
}
}
on_arch_site_finished = {
events = {
}
}
# This = Country, first member added
on_galactic_community_formed = {
events = {
}
}
on_galactic_council_established = {
events = {
}
}
# This = Country
on_add_community_member = {
events = {
}
}
on_remove_community_member = {
events = {
}
}
on_add_to_council = {
events = {
}
}
on_remove_from_council = {
events = {
}
}
on_join_alliance = {
events = {
}
}
on_leave_alliance = {
events = {
}
}
# This = subject
# From = subject's overlord
on_becoming_subject = {
events = {
}
}
# This = empire trying to leave federation
# From = empire who declined (federation leader)
on_ask_to_leave_federation_declined = {
events = {
}
}
# Scope:
# this/root = planet that have been fired upon
# from = fleet that fired
#on_destroy_planet_with_PLANET_DESTRUCTION_COMPONENT = {
# events = {
# planet_destruction.1
# }
#}
on_destroy_planet_with_PLANET_KILLER_CRACKER = {
events = {
}
}
on_destroy_planet_with_PLANET_KILLER_SHIELDER = {
events = {
}
}
on_destroy_planet_with_PLANET_KILLER_NEUTRON = {
events = {
}
}
on_destroy_planet_with_PLANET_KILLER_GODRAY = {
events = {
}
}
on_destroy_planet_with_PLANET_KILLER_NANOBOTS = {
events = {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment