Please help with verifying or updating older sections of this article. At least some were last verified for
version 2.8.
This article is for the PC version of Stellaris only.
This is a quick reference for the different aspects of scripting some fleet events, triggers etc.
Fleet Orders [ ]
The list of known fleet orders, used to define the current fleet action (i.e. has_fleet_order , used in Conditions ).[ 1]
Order
Description
aggressive_stance_fleet_order
Fleet stance is aggressive
analyze_ftl_trail_order
assist_research_order
Ship/fleet is going to assist research on planet
auto_explore_order
Ship/fleet is going to automatically explore space
build_orbital_station_order
Ship/fleet is going to construct any orbital, mining or research station
build_space_station_order
Ship/fleet is going to construct a military station
collect_data_fleet_order
Fleet is going to collect data from debris or ambient object
colonize_planet_order
Ship is going to colonize a planet
combat_order
evade_hostiles_order
follow_order
Ship/fleet is following the ship/fleet
merge_fleet_order
Fleet is going to be merged
move_to_system_point_order
Ship/fleet is moving to a point
land_armies_order
Ship/fleet is going to land troops on planet
orbit_planet_order
Ship/fleet is going to enter orbit of planet
rally_point_fleet_order
Fleet is rallying to a point
research_anomaly_order
Ship is going to research anomaly
return_fleet_order
Fleet is returning
survey_planet_order
Ship is going to survey planet
upgrade_design_fleet_order
Ship/fleet is going to be upgraded
research_discovery_order
upgrade_design_at_starbase_fleet_order
upgrade_design_at_orbitable_fleet_order
repair_fleet_order
Ship/fleet is going to be repaired
repair_ship_fleet_order
Ship/fleet is going to be repaired
build_megastructure_fleet_order
Fleet is going to construct a megastructure
destroy_planet_order
Ship/fleet is going to destroy a planet
planet_killer_weapon_windup_order
planet_killer_weapon_fire_order
explore_bypass_order
use_bypass_order
jumpdrive_order
jumpdrive_windup
experimental_subspace_navigation_fleet_order
excavate_archaeological_site_fleet_order
italics orders - orders which are not studied or probably not working
Fleet Locking [ ]
Fleet could be locked by set_event_locked = yes
effect.
This will prevent any orders to this fleet. Don't forget to unlock it later.
Code examples [ ]
Merge fleets
solar_system = {
random_fleet_in_system = {
limit = {
is_ship_class = shipclass_military
NOT = { is_same_value = root }
owner = { is_same_empire = root.owner }
fleet_power > 0
}
save_event_target_as = EXAMPLE_merge_fleet
}
}
queue_actions = {
find_random_fleet = {
found_fleet = {
merge_fleet = {
target = event_target:EXAMPLE_merge_fleet
allow_ftl = no
}
}
}
}
Note: Vanilla doesn't use this (plain) command at all. Mods using this are e.q. "Aggressive Crisis Engine" and "A Deadly Tempest".
Change fleet leader on army/transport fleets.
As simple leader assign to transport fleets is not working (as to military fleets) and furthermore the documented scope from ships to army unexpectedly is not working (possible bug), there is a workaround to solve this supposed scope problem.[ 2]
# Just find the right army to the fleet to assign a leader to the appropriate army.
random_fleet_in_system = {
limit = {
exists = owner
owner = { is_same_empire = event_target:EXAMPLE_empire }
is_ship_class = shipclass_transport
# NOT = { exists = leader }
}
owner = {
random_owned_army = {
limit = {
exists = fleet
fleet = { is_same_value = PREVPREVPREV }
# NOT = { exists = leader }
}
assign_leader = event_target:EXAMPLE_leader
}
}
}
Note: Vanilla doesn't use this (plain) at all, e.q. mod using this is "Decentralized Empires (Regentmaker)".
"Jump" fleet to the scope
Transfers fleet to the selected scope.[ 3]
# Jumps to the capital scope.
fleet_event = {
id = acemod_fleet.600
hide_window = yes
is_triggered_only = yes
immediate = {
set_location = {
target = owner.capital_scope
distance = 5
angle = random
direction = in_system
}
clear_orders = yes
clear_fleet_actions = this
}
}
Order colossus to fire on a planet in the same system[ 4]
solar_system = {
random_system_planet = {
limit = {
has_planet_flag = shroud_target
}
save_event_target_as = killtarget
}
}
queue_actions = {
if = {
limit = {
exists = event_target:killtarget
}
clear_orders = yes
clear_fleet_actions = THIS # Colossus fleet scope
find_closest_planet = {
trigger = {
id = schroud_target_1
is_same_value = event_target:killtarget
}
found_planet = {
move_to = this
orbit_planet = this
destroy_planet = this
}
}
}
}
References [ ]