Thanks to Warboy1982's work it is now possible to:
1) Add a turn limit where the game automatically ends after a defined X number of turns, and define how the mission ends
2) Modify the turn where the AI becomes aware of all your units (the original game has it set for turn 20, or if there's 2 or less units by turn 10)
These two variables can be set individually for each mission through alienDeployments:
alienDeployments:
- type: STR_ESCAPE_MISSION
turnLimit: 20
chronoTrigger: 0
cheatTurn: 10
Description:
*
turnLimit is used to define the turn where the game ends, default is 0 (no limit). If the value is changed from default then the game will display the number of turns on the 'Hidden Movement' screens as '1/20', '2/20', etc., and the numbers will switch to red when there's less than 3 turns remaining.
*
chronoTrigger is used with turnLimit and defines what happens when the turn limit is reached. There are 3 possible settings:
** 0 (default) = forces a Loss, meaning that the player loses everything if the mission isn't completed by the time the turn limit is reached. All units are declared dead or MIA when the game ends. This is ideal for bomb defusal type missions.
** 1 = forces a Abort, this is almost the same as above, with the exception that there must be at least 1 solder on an exit-only area (like the green room on the 1st stage of Cydonia) to win at the end of the turn limit.
** 2 = forces a Win, where if you have at least 1 live unit at the end of the turn limit you'll win the mission, regardless of where the soldiers are. This is meant for Survival scenarios.
** Regardless of the setting, the player can always still win by eliminating all alien units before the turn limit, or fail the mission by losing all units.
*
cheatTurn allows to define the turn where the AI becomes aware of all your units (default is 20) for individual missions. Once this turn is reached the aliens will be forced to go into attack mode and engage your units. This is effectively a cheat for the AI which was present on the original game.
As you can imagine this opens a lot of possibilities for designing new missions.
As another example:
alienDeployments:
- type: STR_AREA51_DESTROY_HQ_AREA51
objectivesRequired: 16
objectiveComplete: [STR_MISSILE_SILO_DISABLED, 750]
objectiveFailed: [STR_MISSILE_SILO_OPERATIONAL, -750]
objectivePopup: STR_MISSILE_SILO_DESTROYED
turnLimit: 20
chronoTrigger: 0
cheatTurn: 10
This creates a Destroy mission where you have 20 turns to destroy at least 16 missiles and where the AI becomes aware of all your units after turn 10. You also have two several win conditions: you need to destroy the missiles and get back to the craft with at least 1 soldier before turn 20.