Author Topic: [DONE] [Suggestion] Shoot down ufo to stop alien mission  (Read 2601 times)

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 5571
  • Aaand we're back!
    • View Profile
    • My Wiki
Re: [DONE] [Suggestion] Shoot down ufo to stop alien mission
« Reply #15 on: July 29, 2018, 12:48:49 pm »
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.html

Example:

Code: [Select]
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
« Last Edit: August 20, 2018, 06:08:02 pm by Meridian »

Offline Ethereal

  • Colonel
  • ****
  • Posts: 317
    • View Profile
Re: [DONE] [Suggestion] Shoot down ufo to stop alien mission
« Reply #16 on: July 29, 2018, 01:23:06 pm »
That's great! However several times I encountered a situation when creating a database of aliens is beneficial to the player who is in urgent need of Ellerium 115. With new settings... Oh, don't overdo it! Thank you very much! Dreams come true!

Offline Nord

  • Commander
  • *****
  • Posts: 928
  • The Gate will open... someday.
    • View Profile
Re: [DONE] [Suggestion] Shoot down ufo to stop alien mission
« Reply #17 on: July 29, 2018, 02:35:43 pm »
Great indeed, you are just a wonder, Meridian!

Offline krautbernd

  • Commander
  • *****
  • Posts: 504
    • View Profile
Re: [DONE] [Suggestion] Shoot down ufo to stop alien mission
« Reply #18 on: August 05, 2018, 05:25:59 pm »
Nice addition :D

Does this impact alien supply missions in any way?


Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 5571
  • Aaand we're back!
    • View Profile
    • My Wiki
Re: [DONE] [Suggestion] Shoot down ufo to stop alien mission
« Reply #19 on: August 05, 2018, 06:43:07 pm »
Nice addition :D

Does this impact alien supply missions in any way?

Vanilla alien supply missions only have 1 ufo... so there's nothing to interrupt.