aliens

Author Topic: [DONE][Suggestion] Mission sites at xcom base locations  (Read 1883 times)

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9089
    • View Profile
[DONE][Suggestion] Mission sites at xcom base locations
« on: October 12, 2022, 09:01:46 pm »
This feature adds the ability to override standard mission zone area coordinates for mission sites with xcom base coordinates.

Syntax: A new boolean attribute on mission waves: `objectiveOnXcomBase: true` , default is false

It works with all types of direct mission site spawning algorithms:
#1. spawn by mission wave's `ufo` (e.g. xcom2 artifact sites)
#2. spawn by mission's `siteType` (not used by xcom1/xcom2, only used by mods, e.g. XCF uses it quite a lot)
#3. spawn by region's mission zone area texture (e.g. xcom2 ship attack)
#4. are there any other algorithms? I hope not...

It doesn't work with indirect mission site spawning algorithm, i.e. when landed UFO converts into a mission site.
(This is by design... if you're wondering. Just think about it for a few seconds.)

If an xcom base is not found, mission site is NOT generated.
(The xcom base doesn't need to be detected by aliens, all xcom bases are eligible.)

Besides overriding the mission site location, it also clears the point (city) name, if there was any.

Texture is not overridden (it is needed for algorithm #3).
Note: by textures, we mean the virtual globe textures with negative numbers (e.g. TFTD port terror texture, TFTD island terror texture, TFTD ship attack texture, etc.)... i.e. the ones that have `deployments:` attached to them.


Example (spawn artifact sites on top of xcom bases using spawning algorithm #2):

Code: [Select]
missionScripts:
  - type: artifact_sites_on_xcom_bases
    targetBaseOdds: 100               # pick a region with an xcom base
    missionWeights:
      0:
        STR_ALIEN_ARTIFACT_XXX: 100
    useTable: false


Code: [Select]
alienMissions:
  - type: STR_ALIEN_ARTIFACT_XXX
    points: 0
    objective: 3
    spawnZone: 3                      # reuse `cities` mission zone (functionally ignored by spawning algorithms #1 and #2, but needs to be defined anyway!! otherwise crash)
    siteType: STR_ARTIFACT_SITE_P1    # spawn a mission site using this deployment
    raceWeights:
      0:
        STR_MIXED_CREW: 100
    waves:
      - ufo: dummy
        count: 1
        trajectory: P10
        timer: 0
        objective: true
        objectiveOnXcomBase: true     # override the mission site location by an xcom base location (xcom base from the same region as the alien mission)

Offline Dioxine

  • Commander
  • *****
  • Posts: 5455
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: [DONE][Suggestion] Mission sites at xcom base locations
« Reply #1 on: October 21, 2022, 07:31:00 pm »
Hello and sorry for asking, but is the version of OXCE containing this feature available for download yet?

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9089
    • View Profile
Re: [DONE][Suggestion] Mission sites at xcom base locations
« Reply #2 on: October 21, 2022, 08:41:34 pm »
OXCE 7.7.4 or higher is required.
Currently only available on the build farm.

Official version OXCE 7.8 will come out between 27th and 30th October.