# Spearhead ## For the Story tellers Spearhead. A framework created for the mission maker.
For those who do want to create a mission with a story and progress, but do not want to get into scripting. Creating an engaging mission can be an incredible feat. First think of the mission, the submission, the placement, the time. Once the concept is done you'll need to place all the objects into the editor. Not too many, but also not too little. Then comes the scripts to make it feel engaging and organic. The latter is probably the biggest hurdle. Spearhead is created to try and make this entire process a lot easier. It keeps track of completed missions, moves the stages forward once all mission are complete.
Manages CAP in an easy to setup way (no scripting required) and gives a lot of possibilities to the mission maker.
The goal is for the mission maker to focus on the story and the detailed missions, without having to worry about all the triggers and mission management the scripts normally take care off. ## Index - [The Concept](#concept) - [Debugging](#debugging) - [Stage](#stage) - [Completion](#completion) - [On Completion](#on-completion) - [How To] ## Concept Spearhead is very naming convention heavy. It combines trigger-zones and naming conventions to detect all units and their configuration at the start of the mission and will then run from there.
#### Debugging Working with naming conventions and the script only running when the mission starts causes the feedback to always be delayed.
We have found a way to make it very insightful for the mission maker.
The best way to do so is run the mission in single player.
Apart from seeing the mission unfold you will be able to see in the `DCS.log` if the mission parsing went correctly.
Open the `DCS.log` file and search for `[MISSIONPARSER]`. This should normally be totally on the bottom.
All issues found by the Spearhead parsers will be logged all at once.
Since Spearhead is built to not crash on issues, but merely ignore the issues groups/zones it's best to always check!
It might cause for weird side effects if you don't and there is groups not spawning for example.
## Stage A stage is a logical part of a mission. It's isn't anything special per se, but everything revolves around stages in Spearhead.
Everything is tied to at a stage.
A ### Completion ### On Completion ## Mission A mission is a completable objective with a state and a continuous check to see if itself is completed.
The delay between checks is quite big, but it also is checked on unit deaths and other events. ### Placement The placement of MISSION trigger zones can be anywhere.
The order of unit detection is `CAP` > `MISSION` > `AIRBASE` > `STAGE`
This means that if a unit has a name that starts with `"CAP_"` it will not be included in a mission.
But all other units in a `MISSION` trigger zone will be managed as part of that mission. Units inside a `MISSION` do not have to stay within the triggerzone.
They just need to be inside the zone at the start of the mission.
You can for example let a `BAI` mission drive back and forth between airbases. The `MISSIONZONE` only needs to be around the units that are part of the objective, not the waypoints. ### Naming `MISSION__`
`RANDOMMISSION___` (Read RANDOMISATION below) With:
`name` = A name that is easy to remember and type. Like a codename. Exmaples: BYRON, PLUKE, etc.
`type` = any of the below described types. Special types are marked with an * TIP: You can click on the type to get more details
SAM*   SAM Sites are managed a little different. SAM Sites can be used to guide players and to protect airfields.
  In the future when deepstrike missions might come into scope these SAM sites will also be more important.
  SAM sites will be activated when a zone is "Pre-Active".
  A stage is "Pre-Active" when there is a CAP base active, or there is other things to do that would need the SAM site to be live (OCA, DEEPSTRIKE, EXTRACTION \<= all feature development)
  If you want a SAM site to become active ONLY when the stage is fully active, then `DEAD` is the type for you!   Completion logic
  TODO: documentation: Completion logic
DEAD   DEAD missions will be spawned on activation of the stage.
  ALL DEAD missions will be activated right at the start of a stage.
  This might be against the "randomisation" feel, but it is to make sure mission don't get activated randomly and players get ambushed by a random spawn.
Completion logic
  TODO: documentation: Completion logic
BAI
STRIKE   STRIKE missions will be activated randomly until all of them are completed.
  A strike mission can be placed anywhere, even on airbases   Completion logic
  TODO: documentation: Completion logic
### Randomisation You can randomize missions.
Spearhead will pick up all mission zones that start with `"RANDOMMISSION_"`
Then it will combine each `RANDOMMISSION` in a zone with the same `` and pick a random one.
It will always pick 1 and only 1. This means you have some options for randomisation.
For example, if you have 1 missionzone with name `RANDOMMISSION_SAM_PLUKE_1` that is filled with an SA-2 and another zone with `RANDOMMISSION_SAM_PLUKE_2` filled with an SA-3 then some runs of the mission it will spawn an SA-3 and sometimes spawn an SA-3. (works for any mission type) What you can also do is add empty `RANDOMMISSION_` zones next to the filled `RANDOMMISSION_` zone. For example. You have a `RANDOMMISSION_DEAD_BYRON_1` filled with an SA-19 driving around and 2 more `RANDOMMISSION_DEAD_BYRON_<2 & 3>` zones then it will have a 33% chance of being spawned. If a zone is empty it will not be briefed, activated or count towards completion of the `STAGE` ## CAP