From 52f840c2703e990fcd6ddd651a5b2d962a694c0e Mon Sep 17 00:00:00 2001 From: dutchie031 Date: Tue, 8 Sep 2026 15:47:11 +0200 Subject: [PATCH] Initial Deep Strike implementation --- .docs/web/js/components/sidebar.js | 2 +- .docs/web/pages/advanced/missions.html | 136 ++++++++++++++---- .docs/web/style/style.css | 2 +- .../stageClasses/missions/ZoneMission.lua | 32 +++-- .../missions/baseMissions/Mission.lua | 2 +- 5 files changed, 133 insertions(+), 41 deletions(-) diff --git a/.docs/web/js/components/sidebar.js b/.docs/web/js/components/sidebar.js index c4b685a..a786af7 100644 --- a/.docs/web/js/components/sidebar.js +++ b/.docs/web/js/components/sidebar.js @@ -169,7 +169,7 @@ class Sidebar extends HTMLElement { render() { var betaHtml = ''; - if (true || window.location.hostname.toLowerCase() == 'beta.spearhead.rocks') { + if (window.location.hostname.toLowerCase() == 'beta.spearhead.rocks') { betaHtml = 'You are looking at docs that are released with the beta version.'; } diff --git a/.docs/web/pages/advanced/missions.html b/.docs/web/pages/advanced/missions.html index 49c07bb..85f0e1e 100644 --- a/.docs/web/pages/advanced/missions.html +++ b/.docs/web/pages/advanced/missions.html @@ -26,42 +26,118 @@

Advanced Tutorial: Missions

-

Strike

-

- Naming: MISSION_STRIKE_[Name]
-

-

Specific Targets

-

TBD

+
+

Strike

+

+ Naming: MISSION_STRIKE_[Name]
+

+

Specific Targets

+

TBD

+

Scenery Targets

+

+ Bridges, buildings or other type of targets that are baked into the map are awesome targets.
+ We wanted to make sure they were easily integrated in Spearhead. +

-

Scenery Targets

-

- Bridges, buildings or other type of targets that are baked into the map are awesome targets.
- We wanted to make sure they were easily integrated in Spearhead. -

- - - Spearhead detects scenery targets by the trigger zone name. A zone named scenerytarget_[freeform] or - scenerytargets (case-insensitive) will be scanned and any scenery objects that has the attribute "Buildings" inside the zone - will be added as mission scenery targets. - - -

- Scenery targets are treated like mission targets: they are included in the mission completion calculation - (their `IsAlive()` state is checked) and their state is persisted/updated when missions spawn or resume. -

- - - Due to Object IDs changing when maps are updated and edited the "Assign as..." functionality does not work for scenery targets. - Hence the need to use trigger zones to define them. + + Spearhead detects scenery targets by the trigger zone name. A zone named + scenerytarget_[freeform] or + scenerytargets (case-insensitive) will be scanned and any scenery objects that + has the attribute "Buildings" inside the zone + will be added as mission scenery targets. - -

Here's two images showing how a bridge is added to a mission.

- +

+ Scenery targets are treated like mission targets: they are included in the mission completion + calculation + (their `IsAlive()` state is checked) and their state is persisted/updated when missions spawn or + resume. +

+ + + Due to Object IDs changing when maps are updated and edited the "Assign as..." functionality + does not work for scenery targets. + Hence the need to use trigger zones to define them. + + + +

Here's two images showing how a bridge is added to a mission.

+ +
+
+

CAS

+

+ Naming: MISSION_CAS_[Name]
+

+ +

Battle Manager

+

TBD

+
+
+

DEAD

+

+ Naming: MISSION_DEAD_[Name]
+ Naming: MISSION_SAM_[Name]
+

+ +

SAM vs DEAD

+

TBD

+
+ +
+

BAI

+

+ Naming: MISSION_BAI_[Name]
+

+
+ +
+

DEEPSTRIKE

+

+ Naming: MISSION_DEEPSTRIKE_[Name]
+
+ When you, as a mission editor, want to create a mission that's further away from the current front-line you can use the Deep Strike mission type.
+ This allows you to plan missions that require more strategic positioning and timing.
+

+ +

Activation

+

+ Deep Strike missions are activated when the Stage in which they are located becomes "PreActive" or "Active".
+ "PreActive" is when either the current active StageNumber is a certain number of stages away OR the stage has "CAP" airbases active .
+ SpearheadConfig.StageConfig.preactivateStage changes the configuration.
+
+ For example:
+ If the current active stage is MissionStage_2_[name] and preActivate config is set to 2.
+ Then both MissionStage_3_[name] and MissionStage_4_[name] would become "PreActive". +

+

Make Primary

+

+ By default DEEPSTRIKE missions are "Secondary" missions when spawned as a pre-activated stage.
+ Then when the stage they are in is "Active", the mission becomes a "Primary" mission.
+
+ If you want to make it a "Primary" mission from the start, you can overwrite it.
+ Click the mission's trigger zone. Add a property named primary and set it to true. + This will make the mission "Primary" from the start.
+
+ If you want it to "Secondary" even when its stage is the active stage, you can set "primary" to false.
+
+ If you want to have it be "Secondary" when its stage is "Pre-Active" and "primary" when its stage is "Active" you don't have to do anything. +

+ +

Future

+

+ In the future we're thinking it would be cool to make the Deep Strike missions + be more integrated with the CAP airbases and/or logistics.
+ Eg. Completing a DEEPSTRIKE mission would disable CAP for X amount of minutes after completion.
+ This still needs to be refined, but we've already have ideas. +

+ +
+
- +