Author Topic: AlienMission changes not working?  (Read 1993 times)

Offline Docent

  • Colonel
  • ****
  • Posts: 101
    • View Profile
AlienMission changes not working?
« on: April 13, 2022, 05:58:45 pm »
Hello.
I made this code in AllienMissions of my submod:
Code: [Select]
alienMissions:
  - delete: STR_ALIEN_RESEARCH
  - delete: STR_ALIEN_RETALIATION

  - type: STR_ALIEN_RESEARCH
    points: 0
    raceWeights:
      0:
          STR_SECTOID_EARLY: 80
          STR_CHTONITE: 20
      1:
          STR_SECTOID_EARLY: 35
          STR_CHTONITE: 55
          STR_FLOATER: 10
      2:
          STR_SECTOID: 30
          STR_CHTONITE: 20
          STR_FLOATER: 50

  - type: STR_ALIEN_RETALIATION
    points: 0
    objective: 4
    spawnUfo: STR_BATTLESHIP #Spawned for the final retaliation run
    raceWeights: # In the case of a shootdown, race comes from the UFO that triggered the mission.
      0:
          STR_CHTONITE: 50
          STR_FLOATER: 45
          STR_RAIDERS_EARLY: 5
      1:
          STR_CHTONITE: 45
          STR_FLOATER: 40
          STR_RAIDERS_EARLY: 15
      2:
          STR_CHTONITE: 25
          STR_FLOATER: 25
          STR_RAIDERS_EARLY: 20
          STR_SECTOID: 30

But STR_SECTOID flew to my base in the first month. Okay, they probably came in response to the downed UFO. But why is it written in the save file that they were doing ALIEN_RESEARCH??? In the first month! In accordance with the rules, this race should not engage in ALIEN_RESEARCH before the third month.

from save:
Quote
alienMissions:
  - type: STR_ALIEN_RESEARCH
    region: STR_EUROPE
    race: STR_SECTOID
    nextWave: 3
    nextUfoCounter: 0
    spawnCountdown: 7770
    liveUfos: 0
    uniqueID: 1
    missionSiteZone: -1
  - type: STR_ALIEN_RETALIATION
    region: STR_EUROPE
    race: STR_SECTOID
    nextWave: 2
    nextUfoCounter: 1
    spawnCountdown: 8820
    liveUfos: 1
    uniqueID: 4
    missionSiteZone: -1
What have I done wrong? Please, help!

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9091
    • View Profile
Re: AlienMission changes not working?
« Reply #1 on: April 13, 2022, 06:10:43 pm »
if you're using the vanilla xcom1 mission script. STR_SECTOID is hardcoded there for the first month

Code: [Select]
missionScripts:
  - type: gameStart
    missionWeights:
      0:
        STR_ALIEN_RESEARCH: 100
    lastMonth: 0
    targetBaseOdds: 100
    raceWeights:
      0:
        STR_SECTOID: 100
    startDelay: 120

Offline Docent

  • Colonel
  • ****
  • Posts: 101
    • View Profile
Re: AlienMission changes not working?
« Reply #2 on: April 13, 2022, 06:17:11 pm »
Thanks, it's clear now!