Author Topic: [Solved] Crash when trying to generate Alien Base Mission from a Alien base  (Read 1102 times)

Offline hellrazor

  • Commander
  • *****
  • Posts: 2013
  • Deep Ruleset Digger & Bughunter
    • View Profile
    • Github Account
Hi,

I wanted to let alien bases, be also able to directly call in the construction of another alien base.

The following setup I have tried so far:

Code: [Select]
alienMissions:
#BEGIN ALIEN BASE BASE MISSION
  - type: STR_ALIEN_BASE_BASE_MISSION
    points: 250
    objective: 2 #Built a alien base
    siteType: STR_ALIEN_BASE_ASSAULT
    spawnZone: 4 #Mission zone for alien bases
    operationType: 5
    operationSpawnZone: 4 #Mission zone for alien bases
    operationBaseType: STR_ALIEN_BASE_ASSAULT
    raceWeights: *BASE_TERROR_INFILTRATION
    waves:
      - ufo: STR_EXCAVATOR
        count: 1
        trajectory: P4
        timer: 25501
      - ufo: STR_SUPPLY_SHIP
        count: 1
        trajectory: P5
        timer: 60
      - ufo: STR_LAB_SHIP
        count: 1
        trajectory: P5
        timer: 60
      - ufo: STR_BATTLESHIP
        count: 1
        trajectory: P6
        timer: 60
        objectiveOnTheLandingSite: true
        interruptPercentage: 33
#END ALIEN BASE BASE MISSION

Code: [Select]
alienDeployments:
#BEGIN ALIEN BASE ASSAULT
  - type: STR_ALIEN_BASE_ASSAULT
    data:
      - alienRank: 6
        lowQty: 1
        highQty: 2
        dQty: 2
        percentageOutsideUfo: 50
        itemSets: *EMPTY
      - alienRank: 7
        lowQty: 1
        highQty: 2
        dQty: 2
        percentageOutsideUfo: 50
        itemSets: *EMPTY
      - alienRank: 8
        lowQty: 1
        highQty: 2
        dQty: 2
        percentageOutsideUfo: 50
        itemSets: *EMPTY
      - alienRank: 9
        lowQty: 1
        highQty: 3
        dQty: 0
        percentageOutsideUfo: 50
        itemSets: *EMPTY
      - alienRank: 11
        lowQty: 1
        highQty: 3
        dQty: 0
        percentageOutsideUfo: 60
        itemSets: *RANK_11_LARGE
      - alienRank: 10
        lowQty: 1
        highQty: 3
        dQty: 0
        percentageOutsideUfo: 60
        itemSets: *RANK_10_LARGE
      - alienRank: 5
        lowQty: 5
        highQty: 8
        dQty: 4
        percentageOutsideUfo: 0
        itemSets: *RANK_5_LARGE
      - alienRank: 4
        lowQty: 1
        highQty: 2
        dQty: 0
        percentageOutsideUfo: 0
        itemSets: *RANK_4_LARGE
      - alienRank: 3
        lowQty: 1
        highQty: 2
        dQty: 0
        percentageOutsideUfo: 0
        itemSets: &RANK_3_LARGE_HE
          -
            - STR_PLASMA_RIFLE
            - STR_PLASMA_RIFLE_CLIP
            - STR_PLASMA_RIFLE_CLIP
            - STR_ALIEN_GRENADE
          -
            - STR_SMALL_LAUNCHER
            - STR_ELERIUM_BOMB
            - STR_ELERIUM_BOMB
            - STR_ELERIUM_BOMB
            - STR_ELERIUM_BOMB
            - STR_FIRE_BOMB
          -
            - STR_PLASMA_SHOTGUN
            - STR_PLASMA_SHOTGUN_ELERIUM_CLIP
            - STR_PLASMA_SHOTGUN_ELERIUM_CLIP
            - STR_ALIEN_GRENADE
          -
            - STR_SMALL_LAUNCHER
            - STR_ELERIUM_BOMB
            - STR_ELERIUM_BOMB
            - STR_ELERIUM_BOMB
            - STR_ELERIUM_BOMB
            - STR_FIRE_BOMB
          -
            - STR_HEAVY_PLASMA
            - STR_HEAVY_PLASMA_ELERIUM_CLIP
            - STR_HEAVY_PLASMA_ELERIUM_CLIP
            - STR_ALIEN_GRENADE
          -
            - STR_SMALL_LAUNCHER
            - STR_ELERIUM_BOMB
            - STR_ELERIUM_BOMB
            - STR_ELERIUM_BOMB
            - STR_ELERIUM_BOMB
            - STR_FIRE_BOMB
          -
            - STR_PLASMA_SHOTGUN
            - STR_PLASMA_SHOTGUN_ELERIUM_CLIP
            - STR_PLASMA_SHOTGUN_ELERIUM_CLIP
            - STR_ALIEN_GRENADE
      - alienRank: 2
        lowQty: 1
        highQty: 4
        dQty: 0
        percentageOutsideUfo: 0
        itemSets: &RANK_2_BASE
          -
            - STR_PLASMA_SHOTGUN
            - STR_PLASMA_SHOTGUN_CLIP
            - STR_PLASMA_SHOTGUN_CLIP
            - STR_ALIEN_GRENADE
          -
            - STR_SMALL_LAUNCHER
            - STR_ELERIUM_BOMB
            - STR_ELERIUM_BOMB
            - STR_ELERIUM_BOMB
            - STR_ELERIUM_BOMB
            - STR_FIRE_BOMB
          -
            - STR_PLASMA_SHOTGUN
            - STR_PLASMA_SHOTGUN_ELERIUM_CLIP
            - STR_PLASMA_SHOTGUN_ELERIUM_CLIP
            - STR_ALIEN_GRENADE
          -
            - STR_SMALL_LAUNCHER
            - STR_ELERIUM_BOMB
            - STR_ELERIUM_BOMB
            - STR_ELERIUM_BOMB
            - STR_ELERIUM_BOMB
            - STR_FIRE_BOMB
          -
            - STR_HEAVY_PLASMA
            - STR_HEAVY_PLASMA_ELERIUM_CLIP
            - STR_HEAVY_PLASMA_ELERIUM_CLIP
            - STR_ALIEN_GRENADE
          -
            - STR_BLASTER_LAUNCHER
            - STR_BLASTER_BOMB
            - STR_BLASTER_BOMB
            - STR_BLASTER_BOMB
            - STR_BLASTER_BOMB
            - STR_PLASMA_SWORD
          -
            - STR_BLASTER_LAUNCHER
            - STR_BLASTER_BOMB
            - STR_BLASTER_BOMB
            - STR_BLASTER_BOMB
            - STR_BLASTER_BOMB
            - STR_PLASMA_SWORD
      - alienRank: 1
        lowQty: 2
        highQty: 4
        dQty: 0
        percentageOutsideUfo: 0
        itemSets: *RANK_1_LARGE
      - alienRank: 0
        lowQty: 1
        highQty: 1
        dQty: 0
        percentageOutsideUfo: 0
        itemSets:
          -
            - STR_PLASMA_RIFLE
            - STR_PLASMA_RIFLE_CLIP
            - STR_PLASMA_RIFLE_CLIP
            - STR_ALIEN_GRENADE
            - STR_ALIEN_DATA_SLATE
          -
            - STR_HEAVY_PLASMA
            - STR_HEAVY_PLASMA_CLIP
            - STR_HEAVY_PLASMA_CLIP
            - STR_ALIEN_GRENADE
            - STR_ALIEN_DATA_SLATE
          -
            - STR_PLASMA_RIFLE
            - STR_PLASMA_RIFLE_ELERIUM_CLIP
            - STR_PLASMA_RIFLE_ELERIUM_CLIP
            - STR_ALIEN_GRENADE
            - STR_ALIEN_DATA_SLATE
          -
            - STR_PLASMA_SHOTGUN
            - STR_PLASMA_SHOTGUN_ELERIUM_CLIP
            - STR_PLASMA_SHOTGUN_ELERIUM_CLIP
            - STR_ALIEN_GRENADE
            - STR_ALIEN_DATA_SLATE
          -
            - STR_PLASMA_SNIPER_RIFLE
            - STR_PLASMA_SNIPER_RIFLE_ELERIUM_CLIP
            - STR_PLASMA_SNIPER_RIFLE_ELERIUM_CLIP
            - STR_ALIEN_GRENADE
            - STR_ALIEN_DATA_SLATE
          -
            - STR_HEAVY_PLASMA
            - STR_HEAVY_PLASMA_ELERIUM_CLIP
            - STR_HEAVY_PLASMA_ELERIUM_CLIP
            - STR_ALIEN_GRENADE
            - STR_ALIEN_DATA_SLATE
          -
            - STR_PLASMA_SHOTGUN
            - STR_PLASMA_SHOTGUN_ELERIUM_CLIP
            - STR_PLASMA_SHOTGUN_ELERIUM_CLIP
            - STR_ALIEN_GRENADE
            - STR_ALIEN_DATA_SLATE
    width: 60
    length: 60
    height: 2
    terrains:
      - UBASE
    shade: 10
    script: ALIENBASE
    briefing:
      textOffset: -16
      background: BACK01.SCR
      showTarget: false
    objectiveType: 3
    markerName: STR_ALIEN_BASE
    markerIcon: 7
    genMission:
      STR_ALIEN_BASE_BASE_MISSION: 100
      #STR_ALIEN_BASE_ABDUCTION_MISSION: 10
      #STR_ALIEN_BASE_HARVEST_MISSION: 10
      #STR_ALIEN_BASE_TERROR_MISSION: 20
      #STR_ALIEN_SUPPLY: 70
    genMissionFreq: 10 #60% chance to generate a mission each time the trigger is called, usually daily
    genMissionRaceFromAlienBase: false #Supply is still alien base race, all others pick from mission raceweights
    alienBase: true # this is only to tell new battle mode what to do with this deployment
    objectivesRequired: 16 #MCD defined specialtype
    objectiveComplete: [STR_ALIEN_BASE_CONTROL_DESTROYED, 500]
    objectivePopup: STR_CONTROL_CENTER_DESTROYED
    points: 34 #points aliens get for a base each day
    cheatTurn: 7 #Force Attack Mode
    winCutscene: winMiss
    loseCutscene: loseMiss
    abortCutscene: abortMiss
#END ALIEN BASE ASSAULT

The other commented out genMissions do work as expected and i was able to test them successfully.
But when the game tries to generate this STR_ALIEN_BASE_BASE_MISSION, it just crashes.

Maybe i did oversee something, but I am at a loss here. Any Ideas?
« Last Edit: February 15, 2023, 01:51:08 pm by Meridian »

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8598
    • View Profile
Re: Crash when trying to generate Alien Base Mission from a Alien base
« Reply #1 on: February 14, 2023, 02:03:29 pm »
The concept should be possible, if I remember correctly TWoTS also implemented such feature.

I cannot check the details right now, but if nobody answers until then, I'll have a look on Thursday evening.

Offline hellrazor

  • Commander
  • *****
  • Posts: 2013
  • Deep Ruleset Digger & Bughunter
    • View Profile
    • Github Account
Re: Crash when trying to generate Alien Base Mission from a Alien base
« Reply #2 on: February 14, 2023, 04:39:34 pm »
The concept should be possible, if I remember correctly TWoTS also implemented such feature.

I cannot check the details right now, but if nobody answers until then, I'll have a look on Thursday evening.

Thanks Meridian it is really appreciated.

Maybe the game couldn't spawn do counter: 25501 UFO's with timer: 0....
That should have been counter: 1 and timer: 25501 (I corrected it in the message above, will test at home.)

I will check if these transponded numbers were the issue :D

Offline hellrazor

  • Commander
  • *****
  • Posts: 2013
  • Deep Ruleset Digger & Bughunter
    • View Profile
    • Github Account
Re: Crash when trying to generate Alien Base Mission from a Alien base
« Reply #3 on: February 14, 2023, 08:48:59 pm »
Ok it was indeed the counter.

Now it works is intended and Alien Bases can propagate around Earth muhahahahahaha

Offline Xilmi

  • Commander
  • *****
  • Posts: 589
    • View Profile
Re: Crash when trying to generate Alien Base Mission from a Alien base
« Reply #4 on: February 15, 2023, 11:36:00 am »
Yay! Exponential growth of the amount of alien-bases! ;D

Were you able to also find and fix the reason for still spawning supply-missions when you had disabled that?

Offline hellrazor

  • Commander
  • *****
  • Posts: 2013
  • Deep Ruleset Digger & Bughunter
    • View Profile
    • Github Account
Re: Crash when trying to generate Alien Base Mission from a Alien base
« Reply #5 on: February 15, 2023, 01:49:10 pm »
Yay! Exponential growth of the amount of alien-bases! ;D

Potentially yes. This will need some careful balancing with all the other missions and especially how many missions occur.

Were you able to also find and fix the reason for still spawning supply-missions when you had disabled that?

I was happy to see i got it working, but it seems deleting the vanilla deloyments totally and only use the ones loaded by my mod seemed to do the trick, for some reason...

Anyway this topic can be closed @Mod.