A brief explanation of X-Com missionsBefore explaining the rest of the changes, I think it's time for a primer on X-Com missions, because they probably look confusing as all hell to outsiders, so here's a very very simplified explanation.
Let's take a mission like this:
type: STR_ALIEN_RESEARCH
points: 0
raceWeights: ...
0:
STR_SECTOID: 70
STR_SNAKEMAN: 10
STR_FLOATER: 20
1:
...
waves:
- ufo: STR_SMALL_SCOUT
count: 1
trajectory: P0
timer: 9000
- ufo: STR_MEDIUM_SCOUT
count: 1
trajectory: P2
timer: 7800
- ufo: STR_LARGE_SCOUT
count: 2
trajectory: P4
timer: 9000
What does this all mean? Well, when this mission is first generated, the race is picked based on the current game month. If you're on the first month (0), then there's a 70% chance of sectoids, 20% chance of snakemen and 10% chance of floaters.
Then, the UFO waves begin. Only one UFO runs at once. The first wave consists of 1 Small Scout with trajectory P0 with 9000s between them. What's trajectory P0?
id: P0
groundTimer: 3000
waypoints:
- [5, 4, 100]
- [0, 3, 74]
- [0, 1, 28]
- [1, 1, 47]
- [5, 2, 100]
Each waypoint consists of a [zone, altitude, speed]. So first, the Small Scout will spawn in a point in mission zone 5 at altitude 4 at 100% speed. Then it will travel to the next waypoint in mission zone 0, at which point it will switch to altitude 3 and 74% speed. And so on. If the UFO reaches a ground waypoint, it will spend 3000s landed on it before moving on to the next.
So what are these mysterious zones? Well, let's go look at a region:
missionZones:
-
- [200, 220, -65, -60]
- [230, 260, -65, -55]
- [280, 290, -50, -40]
- [230, 250, -50, -40]
- [260, 280, -50, -40]
- [230, 250, -40, -30]
- [250, 272, -40, -28]
- [270, 290, -42, -25]
- [275, 295, -35, -10]
- [240, 280, -30, -10]
- ...
Each region has a series of areas [lonMin, lonMax, latMin, latMax]. The first group is
zone 0, the next is
zone 1, etc. So when a UFO has a waypoint in zone 0, what this means is it'll go to a random point inside one of the zone 0 areas.
And the UFOs carry on their business until the mission is over. So let's move on.
Changes to mission behaviorUp until recently, OpenXcom missions were pretty damn strict. You couldn't really add, remove or mess around with them much, because they had pretty hardcoded behavior. After all, that's how vanilla worked! But of course TFTD went and threw a wrench into that, so now missions are split by objective:
objective:- 0 = score (default)
- 1 = infiltration
- 2 = alien base
- 3 = mission site (terror etc)
- 4 = retaliation
- 5 = supply
So yes, they're still the same missions as before, this is still X-Com.
But now you don't need to worry about hardcoded string IDs. Plus now you can have multiple missions of the same type! So when the game needs for example an "infiltration", it'll pick one randomly from the available ones. Why would you wanna do that? I dunno, maybe you want the late-game to be nothing but battleships. You can also add missionWeights in a similar format to raceWeights:
missionWeights:
0: 50
2: 43
3: 89
They only apply when deciding from multiple missions of the same type.
There's also these special properties based on the mission objective (see the vanilla missions for more details):
spawnZone: mission zone to use when spawning mission sites / alien bases.
spawnUfo: UFO to spawn for retaliation.
objective: true Marks this wave as the one that carries out the mission objective (for mission site / supply missions).
Odds and endsNew Battle mode now lets you select the terrain for any mission (not just UFO missions).
Extra properties added to alien deployments:
alert: Alert message to use when this mission site is spawned.
briefing: Custom briefing data to use for this mission.
duration: Number of hours the mission site lasts [min, max].
markerName: Custom name for the mission site marker on the globe.
markerIcon: Custom icon for the mission site marker on the globe.
Extra properties added to crafts/UFOs:
marker: Custom icon for the marker on the globe.
I think that's everything, grab the latest nightly if you wanna try it out! Please make sure the vanilla behavior still works as vanilla, and the new features work as advertised.