aliens

Author Topic: Removing all default UFOs & Aliens?  (Read 2081 times)

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Removing all default UFOs & Aliens?
« on: September 17, 2020, 11:34:22 am »
(Currently using: OXCE V6.5.5)

I just tried to remove all X-Com: Enemy Unknown UFOs and alien units from the game and got the following error when launching.

Code: [Select]
[17-09-2020_02-05-25] [ERROR] failed to load 'Test Mod'; mod disabled
Error with MissionWeights: Region: STR_ANTARCTICA: alien mission type: STR_ALIEN_BASE not defined, do not incite the judgement of Amaunator.

I received a similar errors messages for:
Code: [Select]
alienMissions:
  - delete: STR_ALIEN_RESEARCH
  - delete: STR_ALIEN_ABDUCTION
  - delete: STR_ALIEN_HARVEST
  - delete: STR_ALIEN_INFILTRATION

However I was able to launch OXCE without an error if I only removed these three from the alienMissions: section:
Code: [Select]
alienMissions:
  - delete: STR_ALIEN_TERROR
  - delete: STR_ALIEN_RETALIATION
  - delete: STR_ALIEN_SUPPLY

Does this mean it is ok to leave those three deleted or will this generate a problem when those alienMissions: are called by some hard coded portion of the game now that they no longer exist?

Also are there any other ones in the below code I should not remove or alter? I'd rather not "incite the judgement of Amaunator" if I can avoid it.

My plan is to slowly add back in what I want one by one as I learn how each section of these .rul files operate.


Here is the code in the .rul file I ran that produced the original error:

Code: [Select]
alienDeployments:
  - delete: STR_SMALL_SCOUT
  - delete: STR_MEDIUM_SCOUT
  - delete: STR_LARGE_SCOUT
  - delete: STR_HARVESTER
  - delete: STR_ABDUCTOR
  - delete: STR_TERROR_SHIP
  - delete: STR_BATTLESHIP
  - delete: STR_SUPPLY_SHIP
  - delete: STR_TERROR_MISSION
  - delete: STR_ALIEN_BASE_ASSAULT
  - delete: STR_BASE_DEFENSE
  - delete: STR_MARS_CYDONIA_LANDING
  - delete: STR_MARS_THE_FINAL_ASSAULT

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_SUPPLY

alienRaces:
  - delete: STR_SECTOID
  - delete: STR_SNAKEMAN
  - delete: STR_ETHEREAL
  - delete: STR_MUTON
  - delete: STR_FLOATER
  - delete: STR_MIXED

armors:
  - delete: SECTOID_ARMOR0
  - delete: FLOATER_ARMOR0
  - delete: FLOATER_ARMOR1
  - delete: FLOATER_ARMOR2
  - delete: CYBERDISC_ARMOR
  - delete: REAPER_ARMOR
  - delete: SECTOPOD_ARMOR
  - delete: SNAKEMAN_ARMOR0
  - delete: SNAKEMAN_ARMOR1
  - delete: SNAKEMAN_ARMOR2
  - delete: MUTON_ARMOR0
  - delete: MUTON_ARMOR1
  - delete: MUTON_ARMOR2
  - delete: ETHEREAL_ARMOR0
  - delete: ETHEREAL_ARMOR1
  - delete: ETHEREAL_ARMOR2
  - delete: CHRYSSALID_ARMOR
  - delete: ZOMBIE_ARMOR
  - delete: SILACOID_ARMOR
  - delete: CELATID_ARMOR

missionScripts:
  - delete: gameStart
  - delete: recurringTerror
  - delete: recon
  - delete: invasion
  - delete: researchRetaliation
  - delete: beginnerRetaliation
  - delete: experiencedRetaliation
  - delete: veteranRetaliation
  - delete: geniusRetaliation
  - delete: superhumanRetaliation

ufos:
  - delete: STR_SMALL_SCOUT
  - delete: STR_MEDIUM_SCOUT
  - delete: STR_LARGE_SCOUT
  - delete: STR_HARVESTER
  - delete: STR_ABDUCTOR
  - delete: STR_TERROR_SHIP
  - delete: STR_BATTLESHIP
  - delete: STR_SUPPLY_SHIP

units:
  - delete: STR_SECTOID_SOLDIER
  - delete: STR_SECTOID_ENGINEER
  - delete: STR_SECTOID_MEDIC
  - delete: STR_SECTOID_NAVIGATOR
  - delete: STR_SECTOID_LEADER
  - delete: STR_SECTOID_COMMANDER
  - delete: STR_CYBERDISC_TERRORIST
  - delete: STR_FLOATER_SOLDIER
  - delete: STR_FLOATER_ENGINEER
  - delete: STR_FLOATER_NAVIGATOR
  - delete: STR_FLOATER_MEDIC
  - delete: STR_FLOATER_LEADER
  - delete: STR_FLOATER_COMMANDER
  - delete: STR_REAPER_TERRORIST
  - delete: STR_SNAKEMAN_SOLDIER
  - delete: STR_SNAKEMAN_NAVIGATOR
  - delete: STR_SNAKEMAN_ENGINEER
  - delete: STR_SNAKEMAN_LEADER
  - delete: STR_SNAKEMAN_COMMANDER
  - delete: STR_CHRYSSALID_TERRORIST
  - delete: STR_MUTON_SOLDIER
  - delete: STR_MUTON_NAVIGATOR
  - delete: STR_MUTON_ENGINEER
  - delete: STR_SILACOID_TERRORIST
  - delete: STR_CELATID_TERRORIST
  - delete: STR_ETHEREAL_SOLDIER
  - delete: STR_ETHEREAL_LEADER
  - delete: STR_ETHEREAL_COMMANDER
  - delete: STR_SECTOPOD_TERRORIST
  - delete: STR_ZOMBIE


For convenience I've also attached a .rul to this post with the above code and the four error producing lines from alienMissions: commented out.
« Last Edit: September 18, 2020, 12:52:49 pm by The Martian »

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8626
    • View Profile
Re: Removing all default UFOs & Aliens?
« Reply #1 on: September 17, 2020, 01:10:18 pm »
If you remove any object from the ruleset, you need to remove also all references of that object.

Otherwise you will get validation errors during startup (where we already validate) or crashes during runtime (where we don't validate yet).

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1510
    • View Profile
Re: Removing all default UFOs & Aliens?
« Reply #2 on: September 17, 2020, 02:02:06 pm »
If you're going to remove missions from alienMissions, then you have to remove the scripts that run those missions from missionScripts. This includes the scripts 'recon' and 'invasion', even though they have almost no ruleset attributes. A mission script with no defined attributes will run one mission every month, selected randomly from the missionWeights as defined under regions (IIRC). To have those scripts run without the vanilla missions, you'd have to change the regions to no longer have vanilla missions available as an option.

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: Removing all default UFOs & Aliens?
« Reply #3 on: September 18, 2020, 03:25:43 pm »
If you remove any object from the ruleset, you need to remove also all references of that object.

Otherwise you will get validation errors during startup (where we already validate) or crashes during runtime (where we don't validate yet).

That makes sense. When I was deleting equipment in the items: section similar messages were displayed about manufacturing projects that no longer had an item linked to it. I'll keep an eye out for other referenced objects.

If you're going to remove missions from alienMissions, then you have to remove the scripts that run those missions from missionScripts. This includes the scripts 'recon' and 'invasion', even though they have almost no ruleset attributes. A mission script with no defined attributes will run one mission every month, selected randomly from the missionWeights as defined under regions (IIRC). To have those scripts run without the vanilla missions, you'd have to change the regions to no longer have vanilla missions available as an option.

So the missionScripts: actually spawn the UFOs and when they do alienMissions: is referenced to assign the spawned UFO with a craft type and mission task.

I wouldn't have thought to look inside the regions.rul thank you for pointing it out.

To remove the missionWeights: from the regions: section each "- type: STR_REGION_NAME" can be deleted then re-added without the missionWeights: variables like this:

Code: [Select]
regions:
# Remove North America
  - delete: STR_NORTH_AMERICA
# Re-add North America without missionWeights:
  - 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:
      -
        - [200, 220, -65, -60]
        - [230, 260, -65, -55]
        - [280, 290, -50, -40]
        - [230, 250, -50, -40]
        - [260, 280, -50, -40]
        - [230, 250, -40, -30]
        - [250, 272, -40, -28]
        - [270, 290, -42, -25]
        - [275, 295, -35, -10]
        - [240, 280, -30, -10]
      -
        - [200, 225, -63.75, -60.75]
        - [245, 260, -54, -50]
        - [250, 260, -50, -40]
        - [270, 280, -37, -34]
        - [255, 260, -40, -30]
        - [255, 260, -25, -20]
        - [258.75, 263.75, -19, -17.5]
        - [286.5, 289.5, -19.375, -18.625]
        - [240, 242, -45, -44]
        - [260, 270, -44, -34]
      -
        - [236, 240, -50, -45]
        - [260, 262, -50, -45]
        - [265, 270, -18, -17]
        - [273.125, 275.75, -13.25, -12.25]
        - [241.875, 245.875, -36.5, -34.625]
        - [286.375, 291, -46.625, -45]
        - [252.75, 263.125, -42.25, -39]
        - [286.875, 289, -19, -18.5]
        - [274.5, 276.25, -44.375, -43.375]
        - [200.625, 216.75, -64.75, -62.25]
      -
        - [286.125, 286.125, -40.75, -40.75, -1, STR_NEW_YORK]
        - [282.875, 282.875, -38.75, -38.75, -1, STR_WASHINGTON]
        - [241.75, 241.75, -34.125, -34.125, -1, STR_LOS_ANGELES]
        - [284.25, 284.25, -45.5, -45.5, -1, STR_MONTREAL]
        - [277.625, 277.625, -22.5, -22.5, -1, STR_HAVANA]
        - [260.875, 260.875, -19.375, -19.375, -1, STR_MEXICO_CITY]
        - [272.375, 272.375, -41.875, -41.875, -1, STR_CHICAGO]
        - [236.75, 236.75, -49.375, -49.375, -1, STR_VANCOUVER]
        - [263.375, 263.375, -32.75, -32.75, -1, STR_DALLAS]
      -
        - [250, 270, -66, -64]
        - [280, 292.5, -51, -46]
        - [267.5, 269.5, -30, -29.5]
        - [240, 246, -45, -38]
        - [277.5, 278.5, -31, -28]
        - [286.875, 288.75, -19.5, -18.75]
        - [273.25, 275.75, -13.125, -11.875]
        - [247, 247.5, -27.25, -26.75]
        - [222.875, 239.25, -63.625, -59.875]
        - [258.125, 267.125, -40.75, -36.875]
      -
        - [0, 359.875, -90, -80]
        - [0, 359.875, 80, 90]
        - [180, 200, 0, 10]
        - [355, 365, -5, 5]
        - [170, 190, -60, -40]
        - [305, 325, -60, -30]
        - [280, 300, 16.125, 36.125]
        - [4.75, 27.625, -52, -44.375]
        - [75, 89, -39, -34.375]
        - [115, 132.5, 21, 25.5]

Instead of that is there a way to return missionWeights: to an empty state? When I check the "UFOpaedia - Ruleset Reference Nightly" page it lists the default state of this missionWeights: as "-". I do not know how to achieve that NULL/Empty state.

Is the syntax to do so for example something like:
Code: [Select]
regions:
  - type: STR_NORTH_AMERICA
    missionWeights: NULL

Or:
Code: [Select]
regions:
  - type: STR_NORTH_AMERICA
    missionWeights: FALSE

Or would just leaving the variable empty be the correct syntax to overwrite missionWeights: with a blank/empty setting?
Code: [Select]
regions:
  - type: STR_NORTH_AMERICA
    missionWeights:

Offline Yankes

  • Commander
  • *****
  • Posts: 3209
    • View Profile
Re: Removing all default UFOs & Aliens?
« Reply #4 on: September 18, 2020, 07:41:46 pm »
I would suggest using `{}`, same as Json syntax: `{STR_ALIEN_RESEARCH:3, STR_ALIEN_HARVEST:10}`
If some property is array (each line start with `-`) then empty list can be written as `[]`.