aliens

Author Topic: [Solved] genMissionRaceFromAlienBase: appears to still be spawning the base race  (Read 984 times)

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
OpenXcom Extended version: 7.8 (v2022-10-29)

I've been trying to use alienDeployments: genMissionRaceFromAlienBase: false to cause an alien base's colony supply mission to use the alienMissions: raceWeights: settings to assign the UFO's race instead of the base itself.

Code: [Select]
alienDeployments:

# [=] Fleet Supply Cruiser [=]
  - &STR_FLEET_SUPPLY_CRUISER
    type: STR_FLEET_SUPPLY_CRUISER
    genMissionRaceFromAlienBase: false    # true (default) = take race from base (vanilla behavior); false = take from mission 'raceWeights' if not empty (if empty take from base)

Code: [Select]
alienMissions:

# [=] Alien Supply [=]
  - &STR_ALIEN_SUPPLY
    type: STR_ALIEN_SUPPLY
    points: 0
    objective: 5
#    raceWeights: {} #Special case, race comes from base.
    raceWeights:
      0:
          STR_IAR_EXTREME_THREAT: 100
    waves:
      - ufo: STR_FLEET_SUPPLY_CRUISER
        count: 1
        trajectory: P9
        timer: 6000
        objective: true

Unfortunately instead of the race being "Extreme Threat" I keep getting other races assigned like "Intermediate Threat" and "Low Threat" which makes me think that it is still inheriting its race from the base that is spawning the mission.


Using the saved game attached to this post the Colony Supply Mission will appear on either 31st Aug 2040 (Sub-147) or 6th Aug 2040 (Sub-134) depending on if you've turned on debug mode while still in July.


Loaded save without re-activating debug in July: Alien Sub-147 31st Aug 2040
Spoiler:

Loaded save and re-activated debug in July: Alien Sub-134 6th Aug 2040
Spoiler:


Am I using genMissionRaceFromAlienBase: incorrectly?
« Last Edit: February 07, 2023, 09:23:00 am by The Martian »

Offline Buscher

  • Colonel
  • ****
  • Posts: 167
    • View Profile
To my understanding you are supposed to put genMissionRaceFromAlienBase on the alienDeployments related to the base (f. ex. STR_ALIEN_BASE_ASSAULT) and not on the ufo (STR_FLEET_SUPPLY_CRUISER).

When you look in the reference where you can find a description for genMissionRaceFromAlienBase, it says above the table
"The following group of attributes is related only to alien bases"


Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
The Ruleset Reference included a link to a forum post in the genMissionRaceFromAlienBase: description that mentions using it for STR_ALIEN_SUPPLY:
https://openxcom.org/forum/index.php/topic,5717.msg143441.html#msg143441

New feature since OXCE 7.4.4

Supply missions and Hunt missions generated by alien bases can now use also explicitly defined alien race(s)... until now the race always came from the alien base itself.

Attributes `genMissionRaceFromAlienBase` and `huntMissionRaceFromAlienBase`.

Example for supply missions:

Code: [Select]
alienDeployments:
  - type: STR_ALIEN_BASE_ASSAULT
    genMission:
      STR_ALIEN_SUPPLY: 25
      STR_ALIEN_TEST1: 25
      STR_ALIEN_TEST2: 25
      STR_ALIEN_TEST3: 25
    genMissionFreq: 6
    genMissionRaceFromAlienBase: false    # true (default) = take race from base (vanilla behavior); false = take from mission 'raceWeights' if not empty (if empty take from base)

Code: [Select]
alienMissions:
  - type: STR_ALIEN_SUPPLY
    raceWeights:
      0:
        STR_ETHEREAL: 50
        STR_MUTON: 50

Hunt missions work similarly.


Edit:
I think I see what you mean. The STR_ALIEN_BASE_ASSAULT alienDeployments: represents the alien base that is launching the UFOs. So any STR_ALIEN_SUPPLY spawned for that base(STR_ALIEN_BASE_ASSAULT) will be effected by the base's alienDeployments: not the STR_ALIEN_SUPPLY alienDeployments: entry.

I'll try this right now.
« Last Edit: February 07, 2023, 08:56:00 am by The Martian »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8616
    • View Profile
The ruleset reference clearly says it works only on alien bases.
The example above is the only valid combination.
Putting the attribute on the ufo will do nothing.

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
It makes so much more sense now, thank you both for explaining that.

When I first read "The following group of attributes is related only to alien bases (listed in a separate table just for convenience)." I made the mistake of taking it to mean all missions spawned by a base not that they had to be setup from the base's siteType: alienDeployments: entry itself.

The supply mission now spawns correctly.
Spoiler:


My understanding is now that the alien base itself is created by an alienMissions: entry's siteType: variable when that mission concludes successfully. (Example: Alien Infiltration or Alien Colony Expansion)
Code: [Select]
alienMissions:

  - type: STR_ALIEN_INFILTRATION
    siteType: STR_ALIEN_BASE_ASSAULT

  - type: STR_ALIEN_BASE
    siteType: STR_ALIEN_BASE_ASSAULT

After the base is created any missions related to that base's siteType: are controlled by the base's matching alienDeployments: entry. (Example: STR_ALIEN_BASE_ASSAULT)
Code: [Select]
alienDeployments:

  - type: STR_ALIEN_BASE_ASSAULT
    genMissionRaceFromAlienBase: false
« Last Edit: February 07, 2023, 09:28:14 am by The Martian »