Author Topic: [DONE][Suggestion] UFO spawned when mission site expires  (Read 1622 times)

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11721
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
[DONE][Suggestion] UFO spawned when mission site expires
« on: April 10, 2024, 07:59:08 pm »
I would like to make a request.

The feature:
If a mission site (such as a terror mission) is not resolved by victory (battle won by X-Com) before it expires, or if X-Com loses this battle, a UFO spawns at the same location.
This UFO and its trajectory is defined in alienDeployments.
If the trajectory not specified, the UFO should do the "GTFO into space" manoeuvre.

The justification:
It would expand a modder's tools, allowing for new ways of mission presentation.

A simple example: Alien Abduction. Instead of vanilla, each Abductor now generates a mission site. This mission site (battle) contains the UFO and its crew, as well as some civilians to harass and whatever you want. If you lose this mission, or you don't go at all, it vanishes, spawning an Abductor which then leaves the planet.

Thanks, and I hope that this request is not too silly or anything. :)
« Last Edit: April 10, 2024, 08:03:26 pm by Solarius Scorch »

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9078
    • View Profile
Re: [Suggestion] UFO spawned when mission site expires
« Reply #1 on: April 28, 2024, 05:11:26 pm »
So, in other words, you are asking for mission sites instead of landing sites?

Should it be the original landing UFO (hidden during the duration of the mission), or should it be a completely new auto-magically repaired, restocked and remanned UFO (in worst case even a new UFO type)?

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11721
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [Suggestion] UFO spawned when mission site expires
« Reply #2 on: May 01, 2024, 10:50:32 am »
So, in other words, you are asking for mission sites instead of landing sites?

Yes; I want to keep the general UFO behaviour (it flies, it lands, it takes off), but mission sites offer additional options which landing sites do not.

Should it be the original landing UFO (hidden during the duration of the mission), or should it be a completely new auto-magically repaired, restocked and remanned UFO (in worst case even a new UFO type)?

Anything will be helpful, really. I guess recreating the original UFO (with its damage etc.) would indeed be the simplest and least problematic way.

I can imagine an option to spawn brand-new UFOs from mission sites being useful, but I don't have any specific plans for using that myself.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9078
    • View Profile
Re: [Suggestion] UFO spawned when mission site expires
« Reply #3 on: May 01, 2024, 11:21:03 am »
todolisted

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9078
    • View Profile
Re: [DONE][Suggestion] UFO spawned when mission site expires
« Reply #4 on: August 18, 2024, 06:53:52 pm »
Done.

If enabled, original UFO will be hidden and ignored until:
1. site expires -> UFO reappears
2. xcom aborts the mission -> UFO reappears
3. xcom loses the mission -> UFO reappears
4. xcom wins the mission (and doesn't abort it) -> UFO is destroyed

Code: [Select]
alienMissions:
  - type: STR_ALIEN_TERROR
    respawnUfoAfterSiteDespawn: true    # default false

UFO will continue in its original trajectory, here's a more complicated example:

Code: [Select]
ufoTrajectories:
  - id: P7
    groundTimer: 9000
    waypoints:
      - [5, 4, 100]
      - [0, 3, 60]
      - [0, 2, 30]
      - [3, 1, 20]  # first number (3) is the mission site spawn zone

      - [0, 0, 10]  # second number must be 0 (=UFO lands)
      - [0, 1, 20]
      - [0, 2, 30]
      - [0, 3, 40]
      - [0, 4, 50]

      - [5, 4, 100] # changed second number from 0 to 4 so that the UFO doesn't land again

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11721
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [DONE][Suggestion] UFO spawned when mission site expires
« Reply #5 on: August 19, 2024, 08:10:21 pm »
Great, thank you!