ST NewHorizons/Events/Xindi Crisis

Flowchart[编辑 | 编辑源代码]

A flowchart of the full outcome of the Xindi Crisis.

Trigger Event[编辑 | 编辑源代码]

The trigger event starts the whole event chain and has a MTTH of 60 months, or 5 years. The event is set to trigger from Earth, which is referred to in the events as "ROOT". The event is triggered with a trigger using the following conditions:

has_owner = yes
has_planet_flag = sol_earth
owner = {
	has_country_flag = united_earth
	is_ai = no
	NOT = { has_country_flag = easy_mode } #OUTDATED FUNCTION
	NOT = { has_country_flag = united_federation_of_planets }
	NOT = { has_country_flag = xindi_crisis_started }
	NOT = { has_country_flag = xindi_probe_target_country } 
}
NOT = { any_country = { has_country_flag = xindi_council } }
NOT = { any_country = { has_country_flag = syrrannite_crisis } }
num_pops > 0
years_passed > 5

These conditions effectively check for the following:

  • The planet is colonized by United Earth, and has people on it.
  • The planet is Earth.
  • United Earth has not formed the UFP.
  • The event has not fired before.
  • The Xindi Nation is uncontacted.
  • The syrranite crisis is not happening.

If this trigger is met, then the event has a chance of triggering randomly around 60 months (5 Years) into the campaign. After this event is triggered, several things will happen, each with its own code. All of them are explained below (NOTE: All of these are contained within an "immediate" scope):

Block #1[编辑 | 编辑源代码]

save_event_target_as = xindi_probe_target_planet

The above line creates a flag for Earth for the probe to use.

Block #2[编辑 | 编辑源代码]

owner = { 
	set_country_flag = xindi_probe_target_country
	save_global_event_target_as = xindi_probe_target_country
	set_country_flag = xindi_crisis_started 
	set_timed_country_flag = { flag = xindi_crisis days = 5000 }
	set_timed_country_flag = { flag = enterprise_era_crisis_ongoing days = 3600 }
}

The above block of code effectively does the following:

  • Tells the game that the event chain has been fired, and to not fire it again.
  • Sets two flags for internal usage.

Block #3[编辑 | 编辑源代码]

create_country = {
	name = "Xindi Probe"
	type = faction
	auto_delete = no
	flag = {
		icon = { category = "trek" file = "xindi.dds" }
		background = { category = "backgrounds" file = "new_dawn.dds" }
		colors = { "black" "black" "null" "null" }
	}
}

The above block of code effectively does the following:

  • Sets up the requirements to spawn the probe.
    • Country will be named "Xindi Probe"
    • Will not delete itself automatically, so that it can be used later.
  • Creates the flag for the probe, which looks as follows:
    • Xindi export.png

Block #4[编辑 | 编辑源代码]

last_created_country = {
	establish_communications_no_message = root.owner
	set_country_flag = xindi_probe_country
	create_fleet = {
		settings = { spawn_debris = no is_boss = yes }
		name = "Unknown Probe"
		effect = {
			set_aggro_range = 0
			set_fleet_stance = aggressive
			set_aggro_range_measure_from = self
			set_owner = PREV
			set_fleet_flag = xindi_probe_fleet 
			save_event_target_as = xindi_probe_fleet
			create_ship = { name = "Unknown Probe" design = "Xindi Probe" }
			set_location = { target = ROOT distance = 400 angle = 100 }
			queue_actions = {
				move_to = ROOT
				effect = {
					id = "STH_united_earth_story.9.effect.1"
					ROOT = { 
						planet_event = { id = STH_united_earth_story.12 }
					}
				}
			}
		}
	}
	set_relation_flag = {
		who = root.owner
		flag = xindi_probe_enemy
	}
}

The above block of code effectively does the following:

  • Sets the probe's faction to be contacted so that a contact window does not trigger.
  • Sets a flag for internal usage.
  • Spawns the probe with the following conditions:
    • Will not spawn debris when destroyed.
    • Replace fleet power estimate with a skull icon.
    • Name of the ship is "Unknown Probe"
    • Will not automatically move to attack another ship.
    • Getting close will trigger combat.
    • Sets it to be owned by the Xindi Probe, which displays the flag from earlier.
    • Sets some flags of the fleet for later events.
  • Spawns the probe 400 units away from the Sun, at an angle of 100o relative to the Sun.
  • Sets the probe to go in orbit of Earth.
  • Allows players with peaceful first contact policy to attack it.

The ship design is below:

ship_design = {
	name = "Xindi Probe"
	ship_size = xindi_probe
	hide_size = yes
	section = {
		template = "xindi_weapon_mid_2"
		slot = "mid"
		component = { slot = "SMALL_UTILITY_1" template = "utility_small_armor_1" }
		component = { slot = "AUX_UTILITY_1" template = "utility_aux_cargo_1" }
		component = { slot = "LARGE_UTILITY_1" template = "utility_large_tracking_1" }
	}
}

The ship has the following stats and components:

  • Travels at 30 units/day, and accelerates at 10 units/day.
  • Has a -80% to evade fire.
  • -10% Upkeep (Not that it matters for a single-ship faction)
  • +2 Tracking
  • 850.002 Armor
  • 5000 Hull Points
  • No weapons.

Event Popup[编辑 | 编辑源代码]

After all of this happens, an event window pops up, with the following text:

Alien Probe
[Sol (Root.System.GetName)] monitoring stations have detected an alien probe on a direct course for [Earth (Root.GetName)]. All attempts to hail the probe have been met with silence, and as such we must now presume the vessel to be hostile.
(Option): Red alert! (Starts the event chain)

Xindi Probe Fails to Reach Earth[编辑 | 编辑源代码]

If the probe is destroyed before it reaches Earth, two events will fire. One for flavor text, and one for internal setup.

Internal Use Event[编辑 | 编辑源代码]

The internal use event sets up all the flags and triggers for later events down the line that are part of the Xindi Crisis. It consists of several blocks, which are detailed below.

id = STH_united_earth_story.10
hide_window = yes
is_triggered_only = yes
trackable = yes
trigger = {
	exists = event_target:xindi_probe_target_country
	exists = from
	from = { has_country_flag = xindi_probe_country }
}

This segment sets up the event, as well as detecting when to fire the event. This trigger, which causes the rest of the event to fire, checks for the following:

  • United Earth, as an empire, still exists.
  • The probe exists and was destroyed.
  • The ship destroyed belonged to the Xindi Probe Faction.

After that, a series of immediate effects fire, the first of which looks like this:

random_planet = {
	limit = { has_planet_flag = sol_earth }
	save_event_target_as = solEarth
}

This checks if Earth still exists, and if it does, saves it for later use in further events.

The next section looks like this:

if = {
	limit = { exists = fromfrom }
	create_ambient_object = { 
		type = small_debris_object 
		location = fromfromfrom
		entity_offset = { min = 10 max = 20 }
		entity_offset_height = { min = 10 max = 15 }
	}
	last_created_ambient_object = { 
		set_ambient_object_flag = xindiProbeDebris
		save_global_event_target_as = xindiProbeDebris 
	}
}	
else = {
	create_ambient_object = { 
		type = small_debris_object 
		location = event_target:solEarth
		entity_offset = { min = 10 max = 20 }
		entity_offset_height = { min = 10 max = 15 }
	}
	last_created_ambient_object = { 
		set_ambient_object_flag = xindiProbeDebris
		save_global_event_target_as = xindiProbeDebris 
	}
}

This block does the following:

  • If the event fires in time, right as the probe is being destroyed, the following happens:
    • Debris is spawned where the ship is, replacing it when it gets destroyed.
    • Sets it as the target of the special project after the flavor text.
  • If the event fires late, or on accident, the following will occur instead:
    • Debris is spawned in orbit of Earth.
    • Sets it as the target of the special project after the flavor text.

After that, another if statement fires:

if = {
	limit = { NOT = { has_special_project = "XINDI_1_PROJECT" } }
	enable_special_project = { name = "XINDI_1_PROJECT" location = event_target:xindiProbeDebris owner = event_target:xindi_probe_target_country }
}

This block checks if the special project to investigate the debris has been enabled, and if not, starts the project.
The next block is as follows:

event_target:xindi_probe_target_country = {
	random_owned_planet = {
		limit = { has_planet_flag = sol_earth }
		planet_event = { id = STH_united_earth_story.11 }
	}
}

This block fires the flavor text event from Earth.

Flavor Text Event[编辑 | 编辑源代码]

We have successfully prevented the alien probe from entering [Earth (Root.GetName)] orbit. Preliminary scans of the wreckage indicate the probe carried within it a single-use condensed energy weapon which had it fired would have been capable of destroying large region of the [Earth (Root.GetName)]'s surface.

[President (Root.Owner.GetRulerTitle)] [Root.Owner.GetRulerName]'s administration has planned a series of celebrations to honour the men and women of Starfleet who averted this tragedy.

The question now remains, who sent this weapon of mass destruction?

[Excellent. (Response)]

This event also deletes the Xindi Probe faction, so it no longer shows up in the contacts. In addition, a flag is re-added for later use. The code for this is as follows:

immediate = {
	fromfrom = {
		remove_relation_flag = { who = root.owner flag = xindi_probe_enemy }
		destroy_country = yes
	}
	random_country = {
		limit = { has_country_flag = xindi_probe_target_country }
		save_event_target_as = xindi_probe_target_country
	}
}

Xindi Probe Reaches Earth[编辑 | 编辑源代码]

If the player allows the probe to reach Earth, or fails to stop it, two events fire, the first for immediate effects and flavor text, and the second for setting up later events in the event chain.

Flavor Text Event[编辑 | 编辑源代码]

This event has four possible descriptions, and every time the game runs the event, a random one is chosen.

The alien probe cut through [Root.GetName]'s defenses with ease before taking up position in geosynchronous orbit.

After several minutes of apparent inactivity the probe fired a condensed energy beam at the surface of the planet, burning large swathes of the East Coast of North America to ashes before powering down.

The few remaining ground batteries and a contingent from the Mars Defence Perimeter on patrol near Jupiter at the time of the attack were able to take advantage of pause and successfully destroyed the vessel.

It will take weeks to fully assess the extent of the casualties in North America, but preliminary analysis indicates the total could reach several hundred million.

The people of [Root.GetName] are shocked by the losses, as they turn to [Root.Owner.GetRulerTitle] [Root.Owner.GetRulerName] to answer the question: who sent this weapon of mass destruction? 
The alien probe cut through [Root.GetName]'s defenses with ease before taking up position in geosynchronous orbit.

After several minutes of apparent inactivity the probe fired a condensed energy beam at the surface of the planet, burning large swathes of the West Coast of Europe to ashes before powering down.

The few remaining ground batteries and a contingent from the Mars Defence Perimeter on patrol near Jupiter at the time of the attack were able to take advantage of pause and successfully destroyed the vessel.

It will take weeks to fully assess the extent of the casualties in Europe, but preliminary analysis indicates the total could reach several hundred million.

The people of [Root.GetName] are shocked by the losses, as they turn to [Root.Owner.GetRulerTitle] [Root.Owner.GetRulerName] to answer the question: who sent this weapon of mass destruction?
The alien probe cut through [Root.GetName]'s defenses with ease before taking up position in geosynchronous orbit.

After several minutes of apparent inactivity the probe fired a condensed energy beam at the surface of the planet, burning large swathes of the Indian sub-continent to ashes before powering down.

The few remaining ground batteries and a contingent from the Mars Defence Perimeter on patrol near Jupiter at the time of the attack were able to take advantage of pause and successfully destroyed the vessel.

It will take weeks to fully assess the extent of the casualties in India, but preliminary analysis indicates the total could reach several hundred million.

The people of [Root.GetName] are shocked by the losses as they turn to [Root.Owner.GetRulerTitle] [Root.Owner.GetRulerName] to answer the question: who sent this weapon of mass destruction?
The alien probe cut through [Root.GetName]'s defenses with ease before taking up position in geosynchronous orbit.

After several minutes of apparent inactivity the probe fired a condensed energy beam at the surface of the planet, burning large swathes of the East African coast to ashes before powering down.

The few remaining ground batteries and a contingent from the Mars Defence Perimeter on patrol near Jupiter at the time of the attack were able to take advantage of pause and successfully destroyed the vessel.

It will take weeks to fully assess the extent of the casualties in Africa, but preliminary analysis indicates the total could reach nearly several hundred million.

The people of [Root.GetName] are shocked by the losses as they turn to [Root.Owner.GetRulerTitle] [Root.Owner.GetRulerName] to answer the question: who sent this weapon of mass destruction?

With this event, two blocks of code fire, with the effects described below.

immediate = {
	owner = { country_event = { id = STH_united_earth_story.13 days = 1 } }
	add_planet_devastation = 50
	owner = { 
		save_event_target_as = xindi_probe_target_country 
		set_timed_country_flag = { flag = xindi_attack_recent days = 1080 }
	}
	save_event_target_as = xindi_probe_target_planet
		
}

The above block of code does the following:

  • Sets these flags:
    • "xindi_attack_recent" (Timed Empire Flag, ~36 Months)
    • "xindi_probe_target_planet" (Planet Flag on Earth, removed by a later event)
    • "xindi_probe_target_country " (Empire Flag, removed by a later event)
  • Increases planetary devastation by 50% on Earth.
option = {
	name = STH_united_earth_story.12.a
	random_owned_pop = { kill_pop = yes }
	hidden_effect = { enable_special_project = { name = "XINDI_1_PROJECT" location = root owner = event_target:xindi_probe_target_country } }
}

The above code does the following:

  • Shows the option "This is a tragedy!"
  • Kills a random pop on Earth
  • Sets up the "XINDI_1_PROJECT", which will be further explained below.

Xindi Wreckage[编辑 | 编辑源代码]

After either Earth is hit by the probe or the probe is destroyed, a special project is added, in which the player is tasked with investigating the debris for clues on who or what sent the probe.