Author Topic: UFOs unexpectedly stop spawning after the month of May?  (Read 1105 times)

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
UFOs unexpectedly stop spawning after the month of May?
« on: January 29, 2023, 09:46:09 pm »
After Solarius Scorch suggested using the alienDeployments: to control which alien race will be fought during the Battlescape I set to work creating a mod to up the encounter variety for TFTD using the randomRace: variable, and it works! (At least it appears to be, I haven't tested it thoroughly.)

Unfortunately what doesn't work is that after the month of May the aliens stop spawning most UFOs. (Colony Supply & Terror missions keep occurring, the rest stop completely.)

I'm still missing something crucial about how UFO spawns are setup, I think the problem is in the missionScripts: file but I'm not sure.

How I've got it setup is so that the original 'recon' missionScript: ends and is followed by 'reconAdvanced' which then also ends and is succeeded by 'reconElite'. However it seems that after the 'recon' missionScript: stops running the others are not starting.

I suspect that the 'recurringTerror' 'recurringTerrorAdvanced' 'recurringTerrorElite' missionScript: are also encountering the same problem.


Could someone please take a quick look and see if you spot something?


Mod Download:
Increased Alien Randomization TFTD (V0-1).zip

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: UFOs unexpectedly stop spawning after the month of May?
« Reply #1 on: January 31, 2023, 12:01:28 pm »
In missionScripts: I tried removing 'recon' and waited for 'reconAdvanced' to run but the later mission never seemed to kick in.

I did note that while 'recon' was enabled it is correctly spawning craft crewed with the 'Low Threat' race, so that is working.

Is there something besides assigning the firstMonth: value that I need to set to turn it on?

The Ruleset Reference mentions that default executionOdds: is set to 100 so I thought they should be guaranteed to run as soon as the value for firstMonth: was met.

This has me completely stumped.


The openxcom.log file doesn't show any error messages so everything is loading correctly... I think.
Code: [Select]
[31-01-2023_02-36-13] [INFO] OpenXcom Version: Extended 7.8 (v2022-10-29)
[31-01-2023_02-36-13] [INFO] Platform: Linux
[31-01-2023_02-36-13] [INFO] Data folder is:
[31-01-2023_02-36-13] [INFO] Data search is:
[31-01-2023_02-36-13] [INFO] - /home/username/.local/share/openxcom/
[31-01-2023_02-36-13] [INFO] - /usr/share/mate/openxcom/
[31-01-2023_02-36-13] [INFO] - /home/username/.local/share/flatpak/exports/share/openxcom/
[31-01-2023_02-36-13] [INFO] - /var/lib/flatpak/exports/share/openxcom/
[31-01-2023_02-36-13] [INFO] - /usr/local/share/openxcom/
[31-01-2023_02-36-13] [INFO] - /usr/share/openxcom/
[31-01-2023_02-36-13] [INFO] - /usr/local/share/openxcom/
[31-01-2023_02-36-13] [INFO] - /usr/share/openxcom/
[31-01-2023_02-36-13] [INFO] - ./
[31-01-2023_02-36-13] [INFO] User folder is: ./user/
[31-01-2023_02-36-13] [INFO] Config folder is: /home/username/.config/openxcom/
[31-01-2023_02-36-13] [INFO] Options loaded successfully.
[31-01-2023_02-36-13] [INFO] SDL initialized successfully.
[31-01-2023_02-36-13] [INFO] SDL_mixer initialized successfully.
[31-01-2023_02-36-13] [INFO] Attempted locale: C.UTF-8
[31-01-2023_02-36-13] [INFO] Detected locale: C.UTF-8
[31-01-2023_02-36-13] [INFO] Attempting to set display to 800x600x8...
[31-01-2023_02-36-13] [INFO] Display set to 800x600x8.
[31-01-2023_02-36-13] [INFO] Loading data...
[31-01-2023_02-36-13] [INFO] Scanning standard mods in ''...
[31-01-2023_02-36-13] [INFO] Scanning user mods in './user/'...
[31-01-2023_02-36-13] [INFO] Active mods:
[31-01-2023_02-36-13] [INFO] - xcom2 v1.0
[31-01-2023_02-36-13] [INFO] - IAR v0.1
[31-01-2023_02-36-15] [INFO] Loading begins...
[31-01-2023_02-36-15] [INFO] Pre-loading rulesets...
[31-01-2023_02-36-15] [INFO] Loading vanilla resources...
[31-01-2023_02-36-16] [INFO] Loading rulesets...
[31-01-2023_02-36-16] [INFO] Loading rulesets done.
[31-01-2023_02-36-16] [INFO] Loading fonts... Font.dat
[31-01-2023_02-36-16] [INFO] Lazy loading: 1
[31-01-2023_02-36-16] [INFO] Loading custom palettes from ruleset...
[31-01-2023_02-36-16] [INFO] Making palette backups...
[31-01-2023_02-36-16] [INFO] After load.
[31-01-2023_02-36-16] [INFO] Loading ended.
[31-01-2023_02-36-16] [INFO] Data loaded successfully.
[31-01-2023_02-36-16] [INFO] Loading language...
[31-01-2023_02-36-17] [INFO] Language loaded successfully.
[31-01-2023_02-36-17] [INFO] OpenXcom started successfully!
[31-01-2023_02-36-17] [INFO] Using software scaling routine. For best results, try an OpenGL filter.

Is there a different section I need to change to allow the later missions to be able to start that isn't in the missionScripts: section?


Here is the missionScripts: code from the Increased Alien Randomization TFTD (V0-1) mod:
Code: [Select]
missionScripts:


# [=] DELETE [=]
  - delete: recon
  - delete: invasion
  - delete: researchRetaliation
  - delete: beginnerRetaliation
  - delete: experiencedRetaliation
  - delete: veteranRetaliation
  - delete: geniusRetaliation
  - delete: superhumanRetaliation
  - delete: recurringTerror







# [=] Surface Terror [=]
  - type: recurringTerror
    conditionals: [-1, -2]
    missionWeights:
      0:
        STR_ALIEN_SURFACE_ATTACK: 100
    regionWeights:
      0:
        STR_NORTH_ATLANTIC: 10
        STR_SOUTH_ATLANTIC: 10
        STR_NORTH_PACIFIC: 10
        STR_SOUTH_PACIFIC: 10
        STR_MEDITERRANEAN: 10
        STR_SOUTH_CHINA_SEA: 10
        STR_INDIAN_OCEAN: 10
        STR_THE_EAST_SEA: 10
        STR_NORTH_SEA: 10
        STR_CARRIBEAN: 10
    useTable: false
    startDelay: 150
    lastMonth: 2


# [=] Surface Terror [=] <Advanced>
  - type: recurringTerrorAdvanced
    conditionals: [-1, -2]
    missionWeights:
      0:
        STR_ALIEN_SURFACE_ATTACK_ADVANCED: 100
    regionWeights:
      0:
        STR_NORTH_ATLANTIC: 10
        STR_SOUTH_ATLANTIC: 10
        STR_NORTH_PACIFIC: 10
        STR_SOUTH_PACIFIC: 10
        STR_MEDITERRANEAN: 10
        STR_SOUTH_CHINA_SEA: 10
        STR_INDIAN_OCEAN: 10
        STR_THE_EAST_SEA: 10
        STR_NORTH_SEA: 10
        STR_CARRIBEAN: 10
    useTable: false
    startDelay: 150
    firstMonth: 3
    lastMonth: 5


# [=] Surface Terror [=] <Elite>
  - type: recurringTerrorElite
    conditionals: [-1, -2]
    missionWeights:
      0:
        STR_ALIEN_SURFACE_ATTACK_ELITE: 100
    regionWeights:
      0:
        STR_NORTH_ATLANTIC: 10
        STR_SOUTH_ATLANTIC: 10
        STR_NORTH_PACIFIC: 10
        STR_SOUTH_PACIFIC: 10
        STR_MEDITERRANEAN: 10
        STR_SOUTH_CHINA_SEA: 10
        STR_INDIAN_OCEAN: 10
        STR_THE_EAST_SEA: 10
        STR_NORTH_SEA: 10
        STR_CARRIBEAN: 10
    useTable: false
    startDelay: 150
    firstMonth: 6





# [=] Recon [=]
  - type: recon
    firstMonth: 1
    lastMonth: 2
    missionWeights:
      0:
        STR_ALIEN_PROBE_MISSION: 1
        STR_ALIEN_INTERDICTION: 1
        STR_ALIEN_RESOURCE_RAID: 1
        STR_ALIEN_INFILTRATION: 1
        STR_ALIEN_BASE: 1


# [=] Recon [=] <Advanced>
  - type: reconAdvanced
    firstMonth: 3
    lastMonth: 5
    missionWeights:
      0:
        STR_ALIEN_PROBE_MISSION_ADVANCED: 1
        STR_ALIEN_INTERDICTION_ADVANCED: 1
        STR_ALIEN_RESOURCE_RAID_ADVANCED: 1
        STR_ALIEN_INFILTRATION_ADVANCED: 1
        STR_ALIEN_BASE_ADVANCED: 1



# [=] Recon [=] <Elite>
  - type: reconElite
    firstMonth: 6
    missionWeights:
      0:
        STR_ALIEN_PROBE_MISSION_ELITE: 1
        STR_ALIEN_INTERDICTION_ELITE: 1
        STR_ALIEN_RESOURCE_RAID_ELITE: 1
        STR_ALIEN_INFILTRATION_ELITE: 1
        STR_ALIEN_BASE_ELITE: 1



# [=] Invasion [=] <Elite>
  - type: invasion
    firstMonth: 6
    missionWeights:
      0:
        STR_ALIEN_PROBE_MISSION_ELITE: 1
        STR_ALIEN_INTERDICTION_ELITE: 1
        STR_ALIEN_RESOURCE_RAID_ELITE: 1
        STR_ALIEN_INFILTRATION_ELITE: 1
        STR_ALIEN_BASE_ELITE: 1


# [=] Alien Retaliation - Research [=] <Elite>
  - type: researchRetaliation
    missionWeights:
      0:
        STR_ALIEN_RETALIATION_ELITE: 100
    researchTriggers:
      STR_THE_ULTIMATE_THREAT: true
    startDelay: 150
    targetBaseOdds: 100
    useTable: false
    label: 3


# [=] Alien Retaliation - Beginner [=] <Elite>
  - type: beginnerRetaliation
    missionWeights:
      0:
        STR_ALIEN_RETALIATION_ELITE: 100
    firstMonth: 14
    targetBaseOdds: 100
    useTable: false
    conditionals: [-3]
    label: 4
    startDelay: 150


# [=] Alien Retaliation - Experienced [=] <Elite>
  - type: experiencedRetaliation
    minDifficulty: 1
    missionWeights:
      0:
        STR_ALIEN_RETALIATION_ELITE: 100
    firstMonth: 13
    targetBaseOdds: 100
    useTable: false
    conditionals: [-3, -4]
    label: 5
    startDelay: 150


# [=] Alien Retaliation - Veteran [=] <Elite>
  - type: veteranRetaliation
    minDifficulty: 2
    missionWeights:
      0:
        STR_ALIEN_RETALIATION_ELITE: 100
    firstMonth: 12
    targetBaseOdds: 100
    useTable: false
    conditionals: [-3, -4, -5]
    label: 6
    startDelay: 150


# [=] Alien Retaliation - Genius [=] <Elite>
  - type: geniusRetaliation
    minDifficulty: 3
    missionWeights:
      0:
        STR_ALIEN_RETALIATION_ELITE: 100
    firstMonth: 10
    targetBaseOdds: 100
    useTable: false
    conditionals: [-3, -4, -5, -6]
    label: 7
    startDelay: 150


# [=] Alien Retaliation - Superhuman [=] <Elite>
  - type: superhumanRetaliation
    minDifficulty: 4
    missionWeights:
      0:
        STR_ALIEN_RETALIATION_ELITE: 100
    firstMonth: 8
    targetBaseOdds: 100
    useTable: false
    conditionals: [-3, -4, -5, -6, -7]
    startDelay: 150

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: UFOs unexpectedly stop spawning after the month of May?
« Reply #2 on: January 31, 2023, 09:55:43 pm »
I tried adding "useTable: false" to both 'reconAdvanced' and 'reconElite' but there was no change, the missions still appear not to be generating new UFOs.

Just in case it wasn't using the default value of 100 I also tested it with "executionOdds: 100" added to both 'reconAdvanced' and 'reconElite' but still no effect.

The first 'recon' does run as does the first 'recurringTerror', just not the Advanced or Elite entries, what is the difference between these two entries that is keeping the second one from running?
Code: [Select]
missionScripts:

# [=] Recon [=]
  - type: recon
    firstMonth: 1
    lastMonth: 2
    missionWeights:
      0:
        STR_ALIEN_PROBE_MISSION: 1
        STR_ALIEN_INTERDICTION: 1
        STR_ALIEN_RESOURCE_RAID: 1
        STR_ALIEN_INFILTRATION: 1
        STR_ALIEN_BASE: 1


# [=] Recon [=] <Advanced>
  - type: reconAdvanced
    firstMonth: 3
    lastMonth: 5
    missionWeights:
      0:
        STR_ALIEN_PROBE_MISSION_ADVANCED: 1
        STR_ALIEN_INTERDICTION_ADVANCED: 1
        STR_ALIEN_RESOURCE_RAID_ADVANCED: 1
        STR_ALIEN_INFILTRATION_ADVANCED: 1
        STR_ALIEN_BASE_ADVANCED: 1

I'm out of ideas on why the UFOs are not spawning, as far as I can see my code looks the same as what I'm finding in other people's missionScripts.rul.

Offline Buscher

  • Colonel
  • ****
  • Posts: 167
    • View Profile
Re: UFOs unexpectedly stop spawning after the month of May?
« Reply #3 on: February 01, 2023, 12:38:55 am »
Your mod factually creates missions. For example my savegame for August of the first year says
Spoiler:
Code: [Select]
alienMissions:
  - type: STR_ALIEN_RESOURCE_RAID_ELITE
    region: STR_SOUTH_PACIFIC
    race: STR_IAR_HIGH_THREAT
    nextWave: 3
    nextUfoCounter: 0
    spawnCountdown: 8190
    liveUfos: 0
    uniqueID: 21
    missionSiteZone: -1
  - type: STR_ALIEN_SUPPLY
    region: STR_SOUTH_PACIFIC
    race: STR_IAR_LOW_THREAT
    nextWave: 0
    nextUfoCounter: 0
    spawnCountdown: 5970
    liveUfos: 0
    uniqueID: 22
    alienBase:
      lon: 4.7983683028015633
      lat: 0.51529618532766863
      type: STR_ALIEN_BASE
      id: 4
    missionSiteZone: -1
  - type: STR_ALIEN_SURFACE_ATTACK_ELITE
    region: STR_SOUTH_ATLANTIC
    race: STR_IAR_LOW_THREAT
    nextWave: 0
    nextUfoCounter: 0
    spawnCountdown: 120
    liveUfos: 0
    uniqueID: 23
    missionSiteZone: 0
  - type: STR_ALIEN_PROBE_MISSION_ELITE
    region: STR_SOUTH_CHINA_SEA
    race: STR_IAR_HIGH_THREAT
    nextWave: 0
    nextUfoCounter: 0
    spawnCountdown: 12600
    liveUfos: 0
    uniqueID: 24
    missionSiteZone: -1
  - type: STR_ALIEN_INFILTRATION_ELITE
    region: STR_SOUTH_PACIFIC
    race: STR_IAR_HIGH_THREAT
    nextWave: 0
    nextUfoCounter: 0
    spawnCountdown: 12810
    liveUfos: 0
    uniqueID: 25
    missionSiteZone: -1


Looking at the first mission STR_ALIEN_RESOURCE_RAID_ELITE in alienMissions it says

Spoiler:
Code: [Select]
  - type: STR_ALIEN_RESOURCE_RAID_ELITE
    refNode: *STR_ALIEN_RESOURCE_RAID
    raceWeights:
      0:
          STR_IAR_HIGH_THREAT: 100
    waves:
      - ufo: STR_SURVEY_SHIP_ELITE
        count: 1
        trajectory: P0
        timer: 15000
      - ufo: STR_ESCORT_ELITE
        count: 1
        trajectory: P1
        timer: 18000
      - ufo: STR_CRUISER_ELITE
        count: 1
        trajectory: P3
        timer: 9000
      - ufo: STR_HEAVY_CRUISER_ELITE
        count: 1
        trajectory: P3
        timer: 9000
      - ufo: STR_HEAVY_CRUISER_ELITE
        count: 2
        trajectory: P4
        timer: 60

but there is no ufos: STR_SURVEY_SHIP_ELITE, etc.
The game probably tries to create an UFO and seems to default to spawn nothing.

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: UFOs unexpectedly stop spawning after the month of May?
« Reply #4 on: February 01, 2023, 11:50:23 pm »
Thank you that got it! The UFOs are spawning again.
Spoiler:

As you said I had missed defining matching entries in the ufo: section.
« Last Edit: February 01, 2023, 11:54:48 pm by The Martian »