OpenXcom Forum

Modding => Help => Topic started by: Nikita1221 on November 07, 2021, 08:08:44 am

Title: Error with MissionWeights After deleting missions
Post by: Nikita1221 on November 07, 2021, 08:08:44 am
I tried to delete Vanilla aliens missions. I deleted them in AlienMissions and MissionScript, but i get following error:
Error with MissionWeights: Region: STR_ANTARCTICA: alien mission type: STR_ALIEN_BASE not defined, do not incite the judgement of Amaunator.
I downloaded clear region ruleset using Flako's world redactor, which contains no Mission Weights, but i still get this error.
How do i fix this?
Title: Re: Error with MissionWeights After deleting missions
Post by: Meridian on November 07, 2021, 08:40:39 am
It's still there.
How exactly did you delete it? In the original file? By a mod? Using delete command or just redefined? Just ommitted the mission list in the redefined ruleset or by specifying an empty list?
Title: Re: Error with MissionWeights After deleting missions
Post by: Nikita1221 on November 07, 2021, 09:49:58 am
I deleted it by using delete command in ruleset, like this:
alienMissions:
  - delete: STR_ALIEN_RESEARCH
  - delete: STR_ALIEN_HARVEST
  - delete: STR_ALIEN_ABDUCTION
  - delete: STR_ALIEN_INFILTRATION
  - delete: STR_ALIEN_BASE
  - delete: STR_ALIEN_TERROR
  - delete: STR_ALIEN_RETALIATION
  - delete: STR_ALIEN_SUPPLYs
missionScripts:
  - delete: gameStart
  - delete: recon
  - delete: invasion
  - delete: researchRetaliation
  - delete: beginnerRetaliation
  - delete: experiencedRetaliation
  - delete: veteranRetaliation
  - delete: geniusRetaliation
  - delete: superhumanRetaliation
  - delete: recurringTerror
  - delete: alienBase
Title: Re: Error with MissionWeights After deleting missions
Post by: Buscher on November 07, 2021, 11:34:18 am
You also have to delete the references in the missionsWeights for regions:

Code: [Select]
regions:
  - type: STR_NORTH_AMERICA
    cost: 800000
    areas:
      - [195, 305, -70, -55]
      - [230, 305, -55, -30]
      - [240, 300, -30, -10]
    regionWeight: 18
    missionWeights:
      STR_ALIEN_RESEARCH: 14
      STR_ALIEN_HARVEST: 17
      STR_ALIEN_ABDUCTION: 20
      STR_ALIEN_INFILTRATION: 20
      STR_ALIEN_BASE: 20
    missionZones:
...

that's because the file of Falko is only a differential file as in it will not modify these values if missionWeights is not in them. You can delete a region and redefine it without the missionWeights or you create a diff file with a missionWeights list with different missions or an empty list. Interestingly enough this only works if you set the weight for current missions to 0.

Code: [Select]
regions:
  - &STR_NO_MISSIONS
    type: STR_NORTH_AMERICA
    missionWeights:
      STR_ALIEN_RESEARCH: 0
      STR_ALIEN_ABDUCTION: 0
      STR_ALIEN_BASE: 0
      STR_ALIEN_HARVEST: 0
      STR_ALIEN_INFILTRATION: 0
  - type: STR_ARCTIC
    refNode: *STR_NO_MISSIONS
  - type: STR_ANTARCTICA
    refNode: *STR_NO_MISSIONS
  - type: STR_SOUTH_AMERICA
    refNode: *STR_NO_MISSIONS
  - type: STR_EUROPE
    refNode: *STR_NO_MISSIONS
  - type: STR_NORTH_AFRICA
    refNode: *STR_NO_MISSIONS
  - type: STR_SOUTHERN_AFRICA
    refNode: *STR_NO_MISSIONS
  - type: STR_CENTRAL_ASIA
    refNode: *STR_NO_MISSIONS
  - type: STR_SOUTH_EAST_ASIA
    refNode: *STR_NO_MISSIONS
  - type: STR_SIBERIA
    refNode: *STR_NO_MISSIONS
  - type: STR_AUSTRALASIA
    refNode: *STR_NO_MISSIONS
  - type: STR_PACIFIC
    refNode: *STR_NO_MISSIONS
  - type: STR_NORTH_ATLANTIC
    refNode: *STR_NO_MISSIONS
  - type: STR_SOUTH_ATLANTIC
    refNode: *STR_NO_MISSIONS
  - type: STR_INDIAN_OCEAN
    refNode: *STR_NO_MISSIONS

alienMissions:
  - delete: STR_ALIEN_RESEARCH
  - delete: STR_ALIEN_HARVEST
  - delete: STR_ALIEN_ABDUCTION
  - delete: STR_ALIEN_INFILTRATION
  - delete: STR_ALIEN_BASE
  - delete: STR_ALIEN_TERROR
  - delete: STR_ALIEN_RETALIATION
  - delete: STR_ALIEN_SUPPLYs

missionScripts:
  - delete: gameStart
  - delete: recon
  - delete: invasion
  - delete: researchRetaliation
  - delete: beginnerRetaliation
  - delete: experiencedRetaliation
  - delete: veteranRetaliation
  - delete: geniusRetaliation
  - delete: superhumanRetaliation
  - delete: recurringTerror
  - delete: alienBase
Title: Re: Error with MissionWeights After deleting missions
Post by: Nikita1221 on November 07, 2021, 04:34:57 pm
Thank you, redefining helped.