Skip to content

HQ Discovery (Terran)

The HQ Discovery arc is how the player first encounters and claims the Player Headquarters in the Terran DLC story line. It’s a 3-chapter narrative covering finding the HQ, repairing satellites, and EVA-exploring the abandoned facility.

  • Script: story_hq_discovery.xml (1,664 lines)
  • Text page: 30223
  • DLC: Cradle of Humanity
  • MDScript name: Story_HQ_Discovery

The arc activates if any of:

  • Player started from x4ep1_gamestart_terran1 (Terran Cadet game start)
  • Player started from x4ep1_gamestart_terran2 (Pioneer Variant game start)
  • gamestart.storystate.story_hq_secret_service is set (custom game start hook)

Additional: player.galaxy.macro.ismacro.{macro.xu_ep2_universe_macro} — only in main galaxy.

The arc anchors these sectors:

VariableSector macroVanilla name
$Neptunecluster_110_sector001Neptune
$BrennansTriumphcluster_115_sector001Brennan’s Triumph
$HQSectorcluster_114_sector001(HQ Sector)
$GrandExchangecluster_01_sector001Grand Exchange

The HQ itself uses macro station_pla_headquarters_base_01_macro with constructionplan x4ep1_playerheadquarters_pioneer_configuration. Two creation paths:

  1. Custom game start skip ($HasCustomGamestartSkip): The script creates the HQ directly:
    • At cluster_114_sector001, position x=-207000, y=-1100, z=-31000
    • Owner: faction.pioneers
    • Encyclopedia: true
  2. Standard path: find_station retrieves the HQ that’s already spawned by god.xml

$PioneerVariant = not $HasCustomGamestartSkip and player.module == 'x4ep1_gamestart_terran2' — affects dialogue (Pioneer-allied player gets different intro).


The player must travel to a specific NPC scientist and deliver an item.

Mission entry: “Pioneer Intro Dialogue”

Section titled “Mission entry: “Pioneer Intro Dialogue””
  • Cue: Ch1_Intro_Dialogue_Pioneer
  • In-game name: Initial Pioneer briefing
  • Path/Chapter: HQ Discovery Chapter 1
  • Find in game: After Ch1_Force triggers (game start hooks complete + briefing started)
  • Prerequisites: Arc activated, briefing complete
  • What player encounters:
    • Pioneer NPC speaks intro lines
    • Dialogue reference: Ch1_Intro_Dialogue_Pioneer_Refmd.LIB_Dialog.Speak_Actor
    • Variant for Terran Cadet players: Ch1_Terran_Cadet_Handler — additional handler for cadet-specific dialogue
  • Where: Player starting location (Terran or Pioneer territory)
  • NPCs involved: Pioneer commander
  • Reward: Chapter 1 mission unlocked
  • Chains to: Ch1_Intro_Fly_To_Scientist
  • Code reference: story_hq_discovery.xml Ch1_Intro_Dialogue_Pioneer
  • Pioneer faction-disable mods break this dialogue
  • Mods that intercept LIB_Dialog.Speak_Actor affect the intro line delivery
  • Terran Cadet start mods that don’t trigger $PioneerVariant correctly skip the cadet handler

  • Cue: Ch1_Intro_Fly_To_Scientist
  • In-game name: Travel to Scientist (location-based objective)
  • Path/Chapter: HQ Discovery Chapter 1
  • Find in game: Active after Pioneer intro complete
  • Prerequisites: Pioneer Intro done
  • What player encounters:
    • Player must fly to the scientist’s location
    • Two sub-cues handle en-route logic:
      • Ch1_Intro_Cadet_En_Route — cadet commentary during travel (Ch1_Intro_Cadet_En_Route_Comment polls every 10s for triggered comments)
      • Ch1_Intro_At_Scientist — checks every 1s if player has reached scientist
  • Objectives:
    • Travel to scientist’s station
    • Trigger arrival event
  • Where: Scientist location (specific Pioneer station in HQ region)
  • NPCs involved: Cadet (companion comments), Scientist (destination)
  • Reward: Arrival triggers Deliver Item mission
  • Chains to: Ch1_Intro_At_Scientist_Dialogue_RefCh1_Deliver_Item
  • Code reference: story_hq_discovery.xml Ch1_Intro_Fly_To_Scientist
  • Mods that change Pioneer territory layout affect scientist location reachability
  • Cadet companion mods may collide with the en-route comment system
  • Sector ownership mods on Pioneer space break navigation expectations

Mission entry: “Deliver Item to Scientist”

Section titled “Mission entry: “Deliver Item to Scientist””
  • Cue: Ch1_Deliver_Item
  • In-game name: Deliver Item (RML_Deliver_Inventory)
  • Path/Chapter: HQ Discovery Chapter 1 (main)
  • Find in game: Active after arrival at scientist
  • Prerequisites: Reached scientist
  • What player encounters:
    • Mission delivers specific inventory item to scientist
    • Reference library: md.RML_Deliver_Inventory.Deliver_Inventory
    • Briefing description via Ch1_Deliver_Item_Map_Text
    • Periodic hints via Ch1_Deliver_Item_Hint (5s interval)
      • Ch1_Deliver_Item_Hint_Ref → speech hint
      • Ch1_Deliver_Item_Hint_Box → visual hint box
      • Ch1_Deliver_Item_Cadet_Comment → cadet adds commentary
    • Dock hint via Ch1_Deliver_Item_Dock_Hint
    • Periodic “near station” check (Ch1_Deliver_Item__Near_Station) at 1s interval
    • Police scan suppression: Ch1_Suppress_Police_Scans checked at 1s — player NOT scanned during this delivery (story content)
  • Objectives:
    • Acquire the item (may be in inventory already, or pickup elsewhere)
    • Travel to delivery station
    • Dock at delivery station
    • Hand over the item
  • Where: Scientist’s station
  • NPCs involved: Scientist (recipient), Cadet (commentary)
  • Reward: Mission complete; Chapter 1 ends; police scan suppression released
  • Chains to: Ch1_Deliver_Item_EndCh1_Deliver_Item_FadeoutCh1_Reset_Police_Scan_Suppression → Chapter 2
  • Code reference: story_hq_discovery.xml Ch1_Deliver_Item (with multiple sub-cues)
  • Mods that affect RML_Deliver_Inventory affect delivery verification
  • Police scan mods that override Ch1_Suppress_Police_Scans cause player to get unwanted scans
  • Mods that change cargo / inventory mechanics affect item handover
  • Custom mission mods using same delivery station collide

Repair satellite network around the HQ region.

Mission entry: “Satellite Network Repair”

Section titled “Mission entry: “Satellite Network Repair””
  • Cue: Ch2_Satellites
  • In-game name: Repair satellite network
  • Path/Chapter: HQ Discovery Chapter 2 (main)
  • Find in game: Active after Chapter 1 complete
  • Prerequisites: Ch1_Deliver_Item complete
  • What player encounters:
    • Conversation scene: Ch2_ConvScene_1_StartCh2_ConvScene_1_End
    • Player must repair satellites: Ch2_Sat_Repair
    • Reference library: md.RML_RepairObject.RepairObject (for each satellite)
    • Periodic commentary:
      • Ch2_Sat_Repair_Comment_1 (1s interval) — first comment
      • Ch2_Sat_Repair_Comment_1b — followup comment
    • Periodic hints (Ch2_Sat_Repair_Hint 1s)
    • Per-satellite repair completion: Ch2_Sat_Repair_Object_Repaired
  • Objectives:
    • Reach each damaged satellite
    • Repair it (likely EVA spacesuit work)
    • Move to next
  • Where: HQ region satellite positions
  • NPCs involved: Scientist (oversight via comm), Cadet (commentary)
  • Reward: Satellites repaired; data feed restored
  • Chains to: Ch2_Sat_Repair_EndCh2_End_Conv_StartedCh2_End → Chapter 3
  • Code reference: story_hq_discovery.xml Ch2_Satellites (v3)
  • Mods that change satellite mechanics affect repair sequence
  • Mods that disable spacesuit EVA functionality break Chapter 2
  • Repair-overhaul mods affect RML_RepairObject
  • Combat mods that make satellites hostile introduce unintended danger

Player physically explores the abandoned HQ via spacesuit, scanning signal leaks.

  • Cue: Ch3_HQ_EVA
  • In-game name: Explore abandoned HQ (EVA)
  • Path/Chapter: HQ Discovery Chapter 3 (main)
  • Find in game: Active after Chapter 2 complete
  • Prerequisites: Ch2_Satellites complete
  • What player encounters:
    • Conversation scene: Ch3_HQ_EVA_ConvScene_1_StartedCh3_HQ_EVA_ConvScene_1_End
    • Player exits ship in spacesuit
    • Objective: explore HQ exterior
      • Sub-cue Ch3_HQ_EVA_Objective
    • Signal leaks scattered on HQ exterior
      • Ch3_HQ_EVA_Leak_Scanned (instanced — fires per leak) — track scanned leaks
      • Ch3_HQ_EVA_Last_Leak_Destroyed — last leak destroyed event
  • Objectives:
    • Exit ship in spacesuit
    • Scan all signal leaks on HQ exterior
    • Survive any hazards
  • Where: HQ exterior (cluster_114_sector001)
  • NPCs involved: Scientist (oversight)
  • Reward: HQ data unlocked; player gains HQ access
  • Chains to: Ch3_HQ_Warping (v2) — HQ warps to player faction territory or similar transition
  • Code reference: story_hq_discovery.xml Ch3_HQ_EVA (v2)
  • Mods that disable spacesuit EVA break Chapter 3
  • Signal-leak modifying mods affect scan mechanics
  • Mods that change HQ macro break the entire chapter
  • Combat mods that spawn hostiles at HQ add unintended danger during EVA

  • Cue: Ch3_HQ_Warping
  • In-game name: HQ warps to player territory
  • Path/Chapter: HQ Discovery Chapter 3 (conclusion)
  • Find in game: After all signal leaks scanned + last leak destroyed
  • Prerequisites: Ch3_HQ_EVA_Last_Leak_Destroyed fired
  • What player encounters:
    • HQ undergoes a warp / transition sequence
    • Cutscene
    • Arc concludes — HQ is now claimable by player
  • Where: HQ Sector (cluster_114_sector001) → wherever it ends up
  • NPCs involved: Scientist, Pioneer commander
  • Reward: HQ unlocked + claimable + arc complete
  • Chains to: End of HQ Discovery; Terran Core arc may activate
  • Code reference: story_hq_discovery.xml Ch3_HQ_Warping

A completed HQ Discovery yields:

  • Player Headquarters unlocked + accessible
  • HQ pre-configured with x4ep1_playerheadquarters_pioneer_configuration constructionplan
  • Pioneer-affiliated player gets specific dialogue paths
  • Storystate flag story_hq_secret_service set
  • Unlocks subsequent arcs (Terran Core, Terraforming research, Welfare research arc)

Mod conflict patterns specific to HQ Discovery

Section titled “Mod conflict patterns specific to HQ Discovery”

If your mod replaces the HQ with a custom station OR pre-spawns it at game start, Ch1 / Ch2 / Ch3 all break:

  • Chapter 1 references the existing HQ (no Pioneer scientist context)
  • Chapter 2 satellite repair assumes HQ surroundings
  • Chapter 3 EVA assumes specific HQ exterior geometry

Solution: hold off HQ-replacement until after arc completes (or set $HasCustomGamestartSkip true via custom gamestart).

Pioneer-faction-removal mods break dialog. Pioneer-relation mods affect arc dialogue tone.

The whole arc requires CoH. Without it: script fails to load. See Wiki: DLC handling.

ConcernCue
Sector setupStart.Setup
HQ creation (custom start skip)Start do_if $HasCustomGamestartSkip
Chapter 1 entryCh1_Force + Ch1_Intro
Item deliveryCh1_Deliver_Item_Ref (refs md.RML_Deliver_Inventory.Deliver_Inventory)
Police scan suppressionCh1_Suppress_Police_Scans (v2)
Chapter 2 satellite repairCh2_Satellites (v3) Ch2_Sat_Repair_Ref
Chapter 3 EVACh3_HQ_EVA (v2) + leak scan handlers
Chapter 3 warpCh3_HQ_Warping (v2)

The HQ Discovery is the gateway to the Cradle of Humanity DLC’s late-game content. Your mod’s interference with Pioneer faction, the HQ macro, the signal-leak mechanic, or police-scan suppression all silently break a 3-chapter arc that some players spend their first 20 hours building toward.