Author Topic: [DONE] [Suggestion] Earth-based alien operations  (Read 14624 times)

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
[DONE] [Suggestion] Earth-based alien operations
« on: September 03, 2018, 06:39:07 pm »
These are suggestions for Tech-Comm but that can be used by other mods.

I'll describe each one separately since they can be implemented separately and add new possibilities, although they are all required in order to add a new feature for Tech-Comm - Nuclear Missile Attacks.

The concept behind this idea is that as the war progresses Skynet will turn to desperate measures to stop Tech-Comm and it will activate a nuclear missile base somewhere in the world, that each month will fire a nuclear strike at one of Tech-Comm's bases that will completely destroy it once fire. The only way to stop these attacks is to locate this base and destroy it with a ground assault.

1) Make UFOs spawn/despawn on a specific alien base to simulate take-off/landing

This can be used also for total conversions where the enemy is not an extraterrestrial force parked in Earth's orbit. A player should be able to figure out the location of hostile bases in this matter, with the radar detecting the 'ufos' taking off/landing between their missions (but revealing the bases still requires a craft).

Another suggestion to implement would be through a new waypoint:
Code: [Select]
ufoTrajectories:
  - id: L0
    waypoints:
      - [6, 0, 0]
      - [0, 3, 74]
      - [0, 1, 28]
      - [1, 1, 47]
      - [6, 0, 0]

A 6 setting tells the game that the ufo's starting location is an alien base (the two 0s refer to 0 height and 0 speed)

One issue to solve is how to determine which alien base is used to spawn the ufo. If the mission is spawned by a specific base (through  genMission on alien Deployments) then the issue is solved since that base is used. If the mission is spawned through missionScripts then the game should check for any existing alien bases that fit the criteria (namely any specific regions defined on that missionScript entry) and choose randomly.

2) Retaliation UFOs can destroy XCom bases without any base defense taking place

As it says, once the final retaliation run begins there's no way to stop it short of defense facilities firing. If they fail, then the base is automatically destroyed.

This simulates a missile strike (or a saboteur/infiltrator) and if that sounds too extreme for some, it could be suggested to have a flag on base facilities that defines whether the facility will be destroyed or not by such a strike (underground facilities would survive, surface ones would not), but that would require a ton of more work and I only need the full destruction part at this point.

3) Missions spawned by alien bases can be set to target any region with an XCom base

This allows for an alien base to generate retaliations (or any other missions) on a region different than the one where it is located, by defining regional weights, targetBaseOdds, etc., on genMissions, the same way that is already possible through missionScripts.
« Last Edit: October 29, 2018, 07:45:24 pm by Meridian »

Offline NiceMicro

  • Sergeant
  • **
  • Posts: 34
    • View Profile
Re: [Suggestion] 3 new Geoscape mechanics
« Reply #1 on: September 29, 2018, 06:18:03 am »
Wow, that sounds nice!

I would be happy to see the alien bases to serve some additional purpose, like sending out more UFOs. In that case, even in a faithful mod, assaulting a base would be kinda more of an urgency.
I would also be happy to see the alien supply missions have this kind of effect, it's so weird to me that the supply UFO lands, I land next to it with the Skyranger, and there is nothing else there, the aliens are just hanging around the UFO, no base entrance, nothing. I have no idea how a more "realistic" solution would work though.
And if we are talking about extended stuff about the alien bases, is there any way of keeping track of the health of a UFO base? I.e, combine it with the bases serving as a base of operation for some extra stuff, would it be possible to set it up in a way, that if you sabotage the supply of the base, than they are i.e. low on elerium, so they can't fly out that many missions any more, and if I totally starve them out by destroying all supply vessels, they won't be able to do their operations.

I'm no software developer, so these are just some random ideas that I had last night.

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: [Suggestion] 3 new Geoscape mechanics
« Reply #2 on: September 29, 2018, 03:44:00 pm »
I would be happy to see the alien bases to serve some additional purpose, like sending out more UFOs. In that case, even in a faithful mod, assaulting a base would be kinda more of an urgency.

This is already possible since alien bases can spawn any other mission than Supply. The main issue is game balance because of the negative score from the additional UFOs

Quote
I would also be happy to see the alien supply missions have this kind of effect, it's so weird to me that the supply UFO lands, I land next to it with the Skyranger, and there is nothing else there, the aliens are just hanging around the UFO, no base entrance, nothing. I have no idea how a more "realistic" solution would work though.

From a gameplay perspective it's the best solution - if there was a base entrance, wouldn't it also be weird that you couldn't assault the base at the same time? And if you did, would you be willing to play a 2 part mission?

Offline NiceMicro

  • Sergeant
  • **
  • Posts: 34
    • View Profile
Re: [Suggestion] 3 new Geoscape mechanics
« Reply #3 on: September 29, 2018, 03:52:32 pm »
From a gameplay perspective it's the best solution - if there was a base entrance, wouldn't it also be weird that you couldn't assault the base at the same time? And if you did, would you be willing to play a 2 part mission?

Yeah I get that :) sometimes the gaming experience is more important than realism, but I would kinda wonder if I attack a landed UFO next to a base, wouldn't the soldiers stationed at the base would help? Of course it could mean either a very difficult mission, or a nerfed supply ship. I would imagine a situation where you can just destroy the alien food or something in the supply ship and abort to cancel the supply of the base, or you can also assault the base if you feel like.

Thanks for the reply! I am just throwing ideas around.

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: [Suggestion] 3 new Geoscape mechanics
« Reply #4 on: September 29, 2018, 08:14:17 pm »
Yeah I get that :) sometimes the gaming experience is more important than realism, but I would kinda wonder if I attack a landed UFO next to a base, wouldn't the soldiers stationed at the base would help? Of course it could mean either a very difficult mission, or a nerfed supply ship. I would imagine a situation where you can just destroy the alien food or something in the supply ship and abort to cancel the supply of the base, or you can also assault the base if you feel like.

Thanks for the reply! I am just throwing ideas around.

From a technical point, it would be needed to redesign the maps to add the underground base and/or the connections to the surface.

Or just turn it into a two-part mission, where on the 1st part you'd assault the Supply Ship, and on the 2nd part assault the base itself, although that would require some new coding to remove the base in case of a successful 2nd part. With that, you could also abort at the beginning of 2nd part to keep the base intact, if you didn't want to continue the fighting, or even just steal some Elerium before withdrawing.

The 2nd solution would address the issue of Supply Ship milk runs getting too hard/long, since the player would be given the option not to proceed with part 2. It could also be used in other sorts of scenarios, such the player needs to assault a landed UFO in order to get access to the base, if the vanilla base assault would be impossible because of how the terrain is designed, so by getting the landed UFO you also get access to the less guarded back entrance. 

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9061
    • View Profile
Re: [WIP] [Suggestion] Earth-based alien operations
« Reply #5 on: October 07, 2018, 05:58:14 pm »
1) Make UFOs spawn/despawn on a specific alien base to simulate take-off/landing

This can be used also for total conversions where the enemy is not an extraterrestrial force parked in Earth's orbit. A player should be able to figure out the location of hostile bases in this matter, with the radar detecting the 'ufos' taking off/landing between their missions (but revealing the bases still requires a craft).

Another suggestion to implement would be through a new waypoint:
Code: [Select]
ufoTrajectories:
  - id: L0
    waypoints:
      - [6, 0, 0]
      - [0, 3, 74]
      - [0, 1, 28]
      - [1, 1, 47]
      - [6, 0, 0]

A 6 setting tells the game that the ufo's starting location is an alien base (the two 0s refer to 0 height and 0 speed)

One issue to solve is how to determine which alien base is used to spawn the ufo. If the mission is spawned by a specific base (through  genMission on alien Deployments) then the issue is solved since that base is used. If the mission is spawned through missionScripts then the game should check for any existing alien bases that fit the criteria (namely any specific regions defined on that missionScript entry) and choose randomly.

So, I have added some new attributes to alien mission ruleset.
The main attribute is "operationType", which says if it is an Earth-based operation or not.

Possible values:
 - 0 (default) = AMOT_SPACE = not Earth-based, UFOs enter and exit in the upper atmosphere; all values > 0 represent Earth-based operations
 - 1 = AMOT_REGION_EXISTING_BASE = use an existing alien base in the mission region, if there is none, abort the mission
 - 2 = AMOT_REGION_NEW_BASE = create a new operation base in the mission region
 - 3 = AMOT_REGION_NEW_BASE_IF_NECESSARY = use an existing alien base in the mission region, if there is none, create a new one
 - 4 = AMOT_EARTH_EXISTING_BASE = use any existing alien base, regardless of region, if there is none, abort the mission
 - 5 = AMOT_EARTH_NEW_BASE_IF_NECESSARY = use any existing alien base, regardless of region, if there is none, create a new one (in the mission region)
 - 6 = AMOT_EXISTING_BASE_HUNT_MISSION = don't do anything = use the already assigned base that spawned this mission

Nice side effect is that you can create new alien bases with this at the beginning of the alien mission... I will leave it to your imagination, how this can be used.
The alien base will need to know where to spawn... for that there is a new attribute "operationSpawnZone", which works same way as "spawnZone"... I used a new attribute so that you can have different zones for operation base and other bases or mission sites created by this mission.
The base will also need a deployment, which can be defined in the attribute "operationBaseType", which again works similar to "siteType" attribute, but I created a new one so that you can use the old one to spawn mission sites.
Both new attributes are necessary only when creating a new base... so for operation types 2, 3 and 5.

This operation base assignment is only relevant for alien missions created by mission scripts and from dogfights.
"Hunt missions" and "Supply missions" created by bases themselves will already be assigned to those bases and will skip the above functionality.

Please note that you SHOULD still mark your hunt missions as Earth-based, any value > 0 will do, but I recommend setting = 6 (AMOT_EXISTING_BASE_HUNT_MISSION), as it was added exactly for this case.
This is needed, because it tells the spawned UFOs they should take off from the base and land at the base... instead of at random locations.
The hunt missions were taking off at the base automatically until now... since now, you need to specify it explicitly.

Also, I don't recommend setting the Earth-based operations to ALIEN_SUPPLY missions, because you don't want them to start at the same base they are supplying (and reach destination immediately)... these missions are just inherently Space-based, so leave them like that...

All mission types and UFO types support taking off at the operation base, even supply ships and retaliation ships.
Landing at the operation base is also supported for all mission types and UFO types, but will be overridden by functionality that transforms a landed UFO into a mission site... since we still might want to use that.
Everything else will just ignore the trajectory's last waypoint's zone and go fixed back to operation base. Altitude and speed from the trajectory is still used.

If the operation base is destroyed, any live UFOs obviously cannot return to it... so they will then use the last waypoint's zone (so don't ignore it and define it properly).
After the base is destroyed, all missions based in that operation base are interrupted and won't generate anything anymore.

Feedback welcome.

Code: [Select]
alienMissions:
  - type: STR_ALIEN_TERROR_FROM_EARTH_BASE
#
    operationType: 3       #Use an existing base in the region or create a new one if there is none
    operationSpawnZone: 4  #Mission zone for alien bases
    operationBaseType: STR_ALIEN_OUTPOST
#
    points: 10
    objective: 3  #OBJECTIVE_SITE
    spawnZone: 3  #Mission zone for terror missions
    siteType: STR_MY_CUSTOM_TERROR_SITE
    raceWeights:
      0:
        STR_SECTOID: 30
        STR_FLOATER: 70
      1:
        STR_SECTOID: 60
        STR_FLOATER: 40
    waves:
      - ufo: STR_SMALL_SCOUT
        count: 1
        trajectory: P1
        timer: 15000
      - ufo: STR_LARGE_SCOUT
        count: 1
        trajectory: P1
        timer: 9600
      - ufo: STR_TERROR_SHIP
        count: 1
        trajectory: P7
        timer: 9000
        objective: true
« Last Edit: October 12, 2018, 04:50:21 pm by Meridian »

Offline Nord

  • Commander
  • *****
  • Posts: 1744
  • The Gate is open.
    • View Profile
Re: [WIP] [Suggestion] Earth-based alien operations
« Reply #6 on: October 07, 2018, 10:44:45 pm »
Damn, Meridian, i cannot draw sprites fast enough to implement all these wonderful new abilities!  ;D ;D ;D
Great job indeed.

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: [WIP] [Suggestion] Earth-based alien operations
« Reply #7 on: October 11, 2018, 05:13:38 pm »
Great work, I actually got more than I asked on my first and third suggestion on the first post :)

With all these changes now I need to rethink the whole mission schedule in Tech-Comm, although it should be actually made simpler than its current version. Lots of effect on gameplay!

I'll give better feedback later once I start actually implementing everything

Big thank you to Meridian!

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9061
    • View Profile
Re: [DONE] [Suggestion] Earth-based alien operations
« Reply #8 on: October 14, 2018, 12:43:09 pm »
2) Retaliation UFOs can destroy XCom bases without any base defense taking place

As it says, once the final retaliation run begins there's no way to stop it short of defense facilities firing. If they fail, then the base is automatically destroyed.

This simulates a missile strike (or a saboteur/infiltrator) and if that sounds too extreme for some, it could be suggested to have a flag on base facilities that defines whether the facility will be destroyed or not by such a strike (underground facilities would survive, surface ones would not), but that would require a ton of more work and I only need the full destruction part at this point.

Done.
Topic was extracted into a separate thread: https://openxcom.org/forum/index.php/topic,6668.0.html

3) Missions spawned by alien bases can be set to target any region with an XCom base

This allows for an alien base to generate retaliations (or any other missions) on a region different than the one where it is located, by defining regional weights, targetBaseOdds, etc., on genMissions, the same way that is already possible through missionScripts.

Missions generated by alien bases (using "genMission" and "genMissionFreq") can now target other regions than the region where the alien base is located.
Hunt missions CANNOT do this... they always operate in alien base region.
Retaliation missions spawned in dogfights CANNOT do this... they have their own fixed algorithm.
Missions spawned by mission script DO NOT use this... they have their own similar attributes in the mission script ruleset.

Code: [Select]
alienDeployments:
  - type: STR_ALIEN_BASE_ASSAULT
    genMission:
      STR_ALIEN_RETALIATION_SPAWNED_BY_BASE: 100
    genMissionFreq: 6

Code: [Select]
alienMissions:
  - type: STR_ALIEN_RETALIATION_SPAWNED_BY_BASE
    targetBaseOdds: 60    # default 0
    regionWeights:        # default empty
      0:
        STR_EUROPE: 50
        STR_NORTH_AMERICA: 30
        STR_SOUTH_EAST_ASIA: 20
    points: 0
    objective: 4
    spawnUfo: STR_BATTLESHIP
    waves:
      - ufo: STR_SMALL_SCOUT
        count: 1
        trajectory: P8
        timer: 3000
      - ufo: STR_MEDIUM_SCOUT
        count: 2
        trajectory: P8
        timer: 3000
      - ufo: STR_LARGE_SCOUT
        count: 3
        trajectory: P8
        timer: 3000
      - ufo: STR_BATTLESHIP
        count: 2
        trajectory: P8
        timer: 3000

Example above has 60% chance to set the mission target region to any region with an xcom base.
If RNG says no, then it will choose europe, north america or south east asia based on defined weights and game months passed.
If the weights would be missing completely, it would default to region of the alien base (vanilla behavior).
« Last Edit: October 29, 2018, 07:48:51 pm by Meridian »

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: [DONE] [Suggestion] Earth-based alien operations
« Reply #9 on: April 23, 2019, 12:20:58 am »
In my mod all the alien missions are spawned by "Dimensional Gates" in the same manner the supply mission is spawned from an alien base in vanilla UFOEU. (Dimensional Gates are themselves base-like sites).
The idea is that the UFOs should take off (spawn) at the gate location (the one that generated it), do the nasty stuff, then go to any (nearest?) gate to despawn. The despawn location must be a gate-type base; if this isn't possible, then I'd set it to go back to the spawning gate.

As far as I understand this can be achieved by using:
operationType
operationSpawnZone
operationBaseType
but I honestly don't understand these (especially the latter two). I tried to set "operationType: 6" but it crashes the game (M range).

Halp!

P.S.
I'm also using the feature to "upgrade" the alien gates as time passes. So actually there are several gate-type sites. I don't know how this factors in the above issue.[/s}
« Last Edit: April 23, 2019, 11:52:50 am by robin »

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: [DONE] [Suggestion] Earth-based alien operations
« Reply #10 on: April 23, 2019, 11:52:06 am »
Alright I think I understand why the game crashed.

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: [WIP] [Suggestion] Earth-based alien operations
« Reply #11 on: April 09, 2024, 10:31:20 pm »
So, I have added some new attributes to alien mission ruleset.
The main attribute is "operationType", which says if it is an Earth-based operation or not.

Possible values:

 - 3 = AMOT_REGION_NEW_BASE_IF_NECESSARY = use an existing alien base in the mission region, if there is none, create a new one
 - 5 = AMOT_EARTH_NEW_BASE_IF_NECESSARY = use any existing alien base, regardless of region, if there is none, create a new one (in the mission region)
 - 6 = AMOT_EXISTING_BASE_HUNT_MISSION = don't do anything = use the already assigned base that spawned this mission


Doubt:
Do these work only for alienMissions created from genMission, or also for alienMissions created by missionScripts?

edit: I guess this is a dumb question, values 3 and 5 must work with missionScripts otherwise it would make no sense.
« Last Edit: April 10, 2024, 09:37:55 pm by robin »