Done.
You can now define a "interruptPercentage" on alien mission waves (by default 0) that define how likely the mission becomes inactive.
Notes... read
CAREFULLY:
- already spawned UFOs will not be removed
- new UFOs won't spawn
- game checks every 30 minutes if a mission can be removed completely (when all flying, landed and crashed UFOs disappear)
- retaliation base attack battleship doesn't have a wave defined in the ruleset! ...
for purpose of this feature, it takes its wave definition from the last mission wave in the ruleset instead-
alien bases are created when a UFO from the last wave is spawned... so if you want to prevent alien bases spawning in alien base and infiltration missions, you should add one more dummy wave to the mission definition, so that you have enough time to shoot down UFOs
- interruption check is done when UFO crashes (both land and water), or when it's destroyed (both in dogfight and during base defense by base facilities)
EDIT, see also:
https://openxcom.org/forum/index.php/topic,6461.0.htmlExample:
alienMissions:
- type: STR_ALIEN_RETALIATION
objective: 4
spawnUfo: STR_BATTLESHIP # Spawned for the final retaliation run
waves:
- ufo: STR_SMALL_SCOUT
interruptPercentage: 5 # 5% chance to finish mission when shot down
count: 1
trajectory: P8
timer: 3000
- ufo: STR_MEDIUM_SCOUT
interruptPercentage: 10 # 2x 10% chance to finish mission
count: 2
trajectory: P8
timer: 3000
- ufo: STR_LARGE_SCOUT
interruptPercentage: 10 # 3x 10% chance to finish mission
count: 3
trajectory: P8
timer: 3000
- ufo: STR_BATTLESHIP
interruptPercentage: 80 # 2x 80% chance to finish mission
count: 2
trajectory: P8
timer: 3000