aliens

Author Topic: [Solved] Spawning Alienbases without ufo.  (Read 4482 times)

wcho035

  • Guest
[Solved] Spawning Alienbases without ufo.
« on: October 14, 2019, 11:44:42 am »
Hi Meridian, I am trying to spawn an Alienbase without an ufo.

Is this even possible?

This is my AlienMission.rul coding

  - type: STR_TLETH_BASESPAWN
    points: 50
    objective: 2
    siteType: STR_TLETH_P0
    spawnZone: 4 #Mission zone for alien bases
    #spawnUfo:
    #raceWeights:
    #  0:
    #    STR_LOBSTERMAN: 3

From my missionscript.rul.

  - type: TlethFinalAlienbase
    researchTriggers:                   
      STR_THE_ULTIMATE_THREAT: true
      STR_TLETH_TH_ALIEN_CITY: true
    executionOdds: 100
    maxRuns: 1
    varName: researching
    missionWeights:
      0:
        STR_TLETH_BASESPAWN: 100

Really appreciate if you can help me with this.
« Last Edit: February 11, 2023, 06:59:54 pm by Meridian »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8628
    • View Profile
Re: Spawning Alienbases without ufo.
« Reply #1 on: October 14, 2019, 11:53:30 am »
Hi Meridian, I am trying to spawn an Alienbase without an ufo.

Is this even possible?

Yes: https://openxcom.org/forum/index.php/topic,6557.msg104669.html#msg104669

I would however still use a UFO to spawn it.

wcho035

  • Guest
Re: Spawning Alienbases without ufo.
« Reply #2 on: October 14, 2019, 12:02:50 pm »
As much as I wish, these are game critical bases. If the ufo spawning the base is shot down, there's no chance of the game story ending with the base not created.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8628
    • View Profile
Re: Spawning Alienbases without ufo.
« Reply #3 on: October 14, 2019, 12:03:29 pm »
As much as I wish, these are game critical bases. If the ufo spawning the base is shot down, there's no chance of the game story ending with the base not created.

Then make the UFO 10x faster than any craft and it will not be shot down.

Or give it impenetrable armor.

Or hide it completely from detection using scripts.

Or do nothing, bases are spawned together with the UFO, there is no need for the UFO to land.
« Last Edit: October 14, 2019, 01:58:52 pm by Meridian »

wcho035

  • Guest
Re: Spawning Alienbases without ufo.
« Reply #4 on: October 14, 2019, 12:08:54 pm »
True, I will experiment as see how it goes.

wcho035

  • Guest
Re: Spawning Alienbases without ufo.
« Reply #5 on: October 14, 2019, 12:19:48 pm »
Err.. Meridian.

Just to clarify some details.

operationType 2 = from a new alien base in the mission region

This is you have an Alien base spawned, brand new in the mission region. Correct?

Also

interruptPercentage=0

Ufo spawning the base can never be intercepted?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8628
    • View Profile
Re: Spawning Alienbases without ufo.
« Reply #6 on: October 14, 2019, 12:29:55 pm »
Yes.

wcho035

  • Guest
Re: Spawning Alienbases without ufo.
« Reply #7 on: October 14, 2019, 12:43:50 pm »
Now I am getting an error using the features.

From the logs.

[14-10-2019_20-37-20]   [INFO]   SDL_mixer initialized successfully.
[14-10-2019_20-37-54]   [WARN]   Image Resources/Crafts/MWingBase.gif (from SDL) has incorrect transparent color index 255 (instead of 0).
[14-10-2019_20-37-54]   [WARN]   Image Resources/Crafts/XTritonBase.png (from lodepng) has incorrect transparent color index 255 (instead of 0).
[14-10-2019_20-37-54]   [WARN]   Image Resources/Crafts/SakurabusBase.gif (from SDL) has incorrect transparent color index 255 (instead of 0).
[14-10-2019_20-37-54]   [WARN]   Image Resources/Crafts/ShadowbatBase.gif (from SDL) has incorrect transparent color index 1 (instead of 0).
[14-10-2019_20-37-54]   [WARN]   Image Resources/Crafts/XTritonsuperBase.png (from lodepng) has incorrect transparent color index 255 (instead of 0).
[14-10-2019_20-38-18]   [WARN]   STR_SOUTH_CHINA_SEA not found in en-US
[14-10-2019_20-38-22]   [FATAL]   A fatal error has occurred: vector::_M_range_check: __n (which is 18446744073709551615) >= this->size() (which is 6)
[14-10-2019_20-38-22]   [FATAL]   0x58c910 OpenXcom::CrossPlatform::stackTrace(void*)
[14-10-2019_20-38-22]   [FATAL]   0x58d780 OpenXcom::CrossPlatform::crashDump(void*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
[14-10-2019_20-38-22]   [FATAL]   0x41e8c0 exceptionLogger()
[14-10-2019_20-38-22]   [FATAL]   0xb17700 MPEGaction::MPEGaction()
[14-10-2019_20-38-22]   [FATAL]   0xcd0400 void std::iter_swap<__gnu_cxx::__normal_iterator<OpenXcom::ScriptProcData*, std::vector<OpenXcom::ScriptProcData, std::allocator<OpenXcom::ScriptProcData> > >, __gnu_cxx::__normal_iterator<OpenXcom::ScriptProcData*, std::vector<OpenXcom::ScriptProcData, std::allocator<OpenXcom::ScriptProcData> > > >(__gnu_cxx::__normal_iterator<OpenXcom::ScriptProcData*, std::vector<OpenXcom::ScriptProcData, std::allocator<OpenXcom::ScriptProcData> > >, __gnu_cxx::__normal_iterator<OpenXcom::ScriptProcData*, std::vector<OpenXcom::ScriptProcData, std::allocator<OpenXcom::ScriptProcData> > >)
[14-10-2019_20-38-22]   [FATAL]   0xcd55d0 OpenXcom::ScriptGlobal::addTagType<OpenXcom::ScriptTag<OpenXcom::RuleItem, unsigned char> >()::{lambda(unsigned long long)#1}::_FUN(unsigned long long)
[14-10-2019_20-38-22]   [FATAL]   0xcc4a50 void std::__merge_sort_with_buffer<__gnu_cxx::__normal_iterator<OpenXcom::Soldier**, std::vector<OpenXcom::Soldier*, std::allocator<OpenXcom::Soldier*> > >, OpenXcom::Soldier**, __gnu_cxx::__ops::_Iter_comp_iter<OpenXcom::SortFunctor> >(__gnu_cxx::__normal_iterator<OpenXcom::Soldier**, std::vector<OpenXcom::Soldier*, std::allocator<OpenXcom::Soldier*> > >, __gnu_cxx::__normal_iterator<OpenXcom::Soldier**, std::vector<OpenXcom::Soldier*, std::allocator<OpenXcom::Soldier*> > >, OpenXcom::Soldier**, __gnu_cxx::__ops::_Iter_comp_iter<OpenXcom::SortFunctor>)
[14-10-2019_20-38-22]   [FATAL]   0x820690 OpenXcom::AlienMission::start(OpenXcom::Game&, OpenXcom::Globe const&, unsigned long long)
[14-10-2019_20-38-22]   [FATAL]   0x69ac50 OpenXcom::GeoscapeState::processCommand(OpenXcom::RuleMissionScript*)
[14-10-2019_20-38-22]   [FATAL]   0x6a0ac0 OpenXcom::GeoscapeState::determineAlienMissions()
[14-10-2019_20-38-22]   [FATAL]   0x6a2620 OpenXcom::GeoscapeState::time1Month()
[14-10-2019_20-38-22]   [FATAL]   0x6a28c0 OpenXcom::GeoscapeState::timeAdvance()
[14-10-2019_20-38-22]   [FATAL]   0x662100 OpenXcom::Timer::think(OpenXcom::State*, OpenXcom::Surface*)
[14-10-2019_20-38-22]   [FATAL]   0x5a3800 OpenXcom::Game::run()
[14-10-2019_20-38-22]   [FATAL]   0x41e990 SDL_main
[14-10-2019_20-38-22]   [FATAL]   0x932b40 console_main
[14-10-2019_20-38-22]   [FATAL]   0x932c60 WinMain
[14-10-2019_20-38-22]   [FATAL]   ??
[14-10-2019_20-38-22]   [FATAL]   ??
[14-10-2019_20-38-22]   [FATAL]   0x7ff928341fd0 BaseThreadInitThunk
[14-10-2019_20-38-22]   [FATAL]   0x7ff928dcef90 RtlUserThreadStart
[14-10-2019_20-38-52]   [FATAL]   OpenXcom has crashed: vector::_M_range_check: __n (which is 18446744073709551615) >= this->size() (which is 6)

This is my current coding.

For Alienmission.rul

  - type: STR_TLETH_BASESPAWN
    points: 50
    objective: 2
    siteType: STR_TLETH_P0
    operationType: 2
    spawnZone: 4 #Mission zone for alien bases
    #spawnUfo: STR_DREADNOUGHT
    raceWeights:
      0:
        STR_LOBSTERMAN: 100
    waves:
      - ufo: STR_DREADNOUGHT
        count: 2
        trajectory: P8
        timer: 2500
        interruptPercentage: 0

For Missionscript.rul

  - type: TlethFinalAlienbase
    researchTriggers:                   
      STR_THE_ULTIMATE_THREAT: true
      #STR_TLETH_TH_ALIEN_CITY: true
    executionOdds: 100
    maxRuns: 1
    varName: researching
    missionWeights:
      0:
        STR_TLETH_BASESPAWN: 100

I am out of ideas. Can you help me modify this to work?
« Last Edit: October 14, 2019, 12:47:43 pm by Precentor Apollyon »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8628
    • View Profile
Re: Spawning Alienbases without ufo.
« Reply #8 on: October 14, 2019, 12:59:40 pm »
Read the description I linked and provide all necessary attributes.

wcho035

  • Guest
Re: Spawning Alienbases without ufo.
« Reply #9 on: October 14, 2019, 01:37:35 pm »
Okay, I manage to overcome the error, now I have a new one.

[14-10-2019_21-29-23]   [FATAL]   0x7ff928dcef90 RtlUserThreadStart
[14-10-2019_21-29-44]   [FATAL]   OpenXcom has crashed: Error occurred while trying to determine waypoint for mission type: STR_TLETH_BASESPAWN in region: STR_SOUTH_PACIFIC, mission tried to find a waypoint in zone 6 but this region only has zones valid up to 5.
Log file: C:/games/XCOM UFO/My Xcom Mod/user/openxcom.log

Updated Alienmission.rul

  - type: STR_TLETH_BASESPAWN
    points: 50
    objective: 2
    #siteType: STR_TLETH_P0
    #siteType: STR_ALIEN_BASE_ASSAULT2
    operationType: 2
    #spawnZone: 4 #Mission zone for alien bases
    operationSpawnZone: 4
    operationBaseType: STR_ALIEN_BASE_ASSAULT2
    #spawnUfo: STR_DREADNOUGHT
    raceWeights:
      0:
        STR_LOBSTERMAN: 100
    waves:
      - ufo: STR_DREADNOUGHT
        count: 2
        trajectory: P13
        timer: 2500
        interruptPercentage: 0

UFotrajectories

  - id: P13
    waypoints:
      - [6, 0, 0]
      - [0, 3, 74]
      - [0, 1, 28]
      - [1, 1, 47]
      - [6, 0, 0]

is this to do with  operationSpawnZone: 4 ? The details of this attribute is vague. What is 0 to 4? If this is a 4 (0 to 4) then it should be a zone 5 not 6 above?


Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8628
    • View Profile
Re: Spawning Alienbases without ufo.
« Reply #10 on: October 14, 2019, 01:57:38 pm »
You have zone 6 in your trajectory.

wcho035

  • Guest
Re: Spawning Alienbases without ufo.
« Reply #11 on: October 14, 2019, 02:43:32 pm »
I got the spawnzone sorted out, now I am having the same error again.

What happen was, the UFO spawning the Alien base succeeds in spawning it, but when it is leaving, this error keep popping up.

[14-10-2019_22-37-32]   [WARN]   STR_SOUTH_CHINA_SEA not found in en-US
[14-10-2019_22-37-38]   [WARN]   STR_TLETH_BASESPAWN not found in en-US
[14-10-2019_22-37-38]   [WARN]   STR_THE_EAST_SEA not found in en-US
[14-10-2019_22-37-59]   [FATAL]   A fatal error has occurred: vector::_M_range_check: __n (which is 18446744073709551615) >= this->size() (which is 6)
[14-10-2019_22-38-00]   [FATAL]   0x58c910 OpenXcom::CrossPlatform::stackTrace(void*)
[14-10-2019_22-38-00]   [FATAL]   0x58d780 OpenXcom::CrossPlatform::crashDump(void*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
[14-10-2019_22-38-00]   [FATAL]   0x41e8c0 exceptionLogger()
[14-10-2019_22-38-00]   [FATAL]   0xb17700 MPEGaction::MPEGaction()
[14-10-2019_22-38-00]   [FATAL]   0xcd0400 void std::iter_swap<__gnu_cxx::__normal_iterator<OpenXcom::ScriptProcData*, std::vector<OpenXcom::ScriptProcData, std::allocator<OpenXcom::ScriptProcData> > >, __gnu_cxx::__normal_iterator<OpenXcom::ScriptProcData*, std::vector<OpenXcom::ScriptProcData, std::allocator<OpenXcom::ScriptProcData> > > >(__gnu_cxx::__normal_iterator<OpenXcom::ScriptProcData*, std::vector<OpenXcom::ScriptProcData, std::allocator<OpenXcom::ScriptProcData> > >, __gnu_cxx::__normal_iterator<OpenXcom::ScriptProcData*, std::vector<OpenXcom::ScriptProcData, std::allocator<OpenXcom::ScriptProcData> > >)
[14-10-2019_22-38-00]   [FATAL]   0xcd55d0 OpenXcom::ScriptGlobal::addTagType<OpenXcom::ScriptTag<OpenXcom::RuleItem, unsigned char> >()::{lambda(unsigned long long)#1}::_FUN(unsigned long long)
[14-10-2019_22-38-00]   [FATAL]   0xcc4a50 void std::__merge_sort_with_buffer<__gnu_cxx::__normal_iterator<OpenXcom::Soldier**, std::vector<OpenXcom::Soldier*, std::allocator<OpenXcom::Soldier*> > >, OpenXcom::Soldier**, __gnu_cxx::__ops::_Iter_comp_iter<OpenXcom::SortFunctor> >(__gnu_cxx::__normal_iterator<OpenXcom::Soldier**, std::vector<OpenXcom::Soldier*, std::allocator<OpenXcom::Soldier*> > >, __gnu_cxx::__normal_iterator<OpenXcom::Soldier**, std::vector<OpenXcom::Soldier*, std::allocator<OpenXcom::Soldier*> > >, OpenXcom::Soldier**, __gnu_cxx::__ops::_Iter_comp_iter<OpenXcom::SortFunctor>)
[14-10-2019_22-38-00]   [FATAL]   0x820be0 OpenXcom::AlienMission::think(OpenXcom::Game&, OpenXcom::Globe const&)
[14-10-2019_22-38-00]   [FATAL]   0x699650 OpenXcom::GeoscapeState::time30Minutes()
[14-10-2019_22-38-00]   [FATAL]   0x6a28c0 OpenXcom::GeoscapeState::timeAdvance()
[14-10-2019_22-38-00]   [FATAL]   0x662100 OpenXcom::Timer::think(OpenXcom::State*, OpenXcom::Surface*)
[14-10-2019_22-38-00]   [FATAL]   0x5a3800 OpenXcom::Game::run()
[14-10-2019_22-38-00]   [FATAL]   0x41e990 SDL_main
[14-10-2019_22-38-00]   [FATAL]   0x932b40 console_main
[14-10-2019_22-38-00]   [FATAL]   0x932c60 WinMain
[14-10-2019_22-38-00]   [FATAL]   ??
[14-10-2019_22-38-00]   [FATAL]   ??
[14-10-2019_22-38-00]   [FATAL]   0x7ff928341fd0 BaseThreadInitThunk
[14-10-2019_22-38-00]   [FATAL]   0x7ff928dcef90 RtlUserThreadStart
[14-10-2019_22-38-05]   [FATAL]   OpenXcom has crashed: vector::_M_range_check: __n (which is 18446744073709551615) >= this->size() (which is 6)
Log file: C:/games/XCOM UFO/My Xcom Mod/user/openxcom.log
If this error was unexpected, please report it on OpenXcom forum or discord.

I played around with the operationType from 0 and 2.

Same results. I am not really sure what the error is now. I think it has to do with the terrain it spawn from a rough guess.

Meridian, can you help troubleshoot? I used all the attribute from the link you send me.

From Alienmission.rul

  - type: STR_TLETH_BASESPAWN
    points: 50
    objective: 2
    #siteType: STR_TLETH_P0
    #siteType: STR_ALIEN_BASE_ASSAULT2
    operationType: 0
    #spawnZone: 4 #Mission zone for alien bases
    operationSpawnZone: 4
    operationBaseType: STR_ALIEN_BASE_ASSAULT2
    #spawnUfo: STR_DREADNOUGHT
    raceWeights:
      0:
        STR_LOBSTERMAN: 100
    waves:
      - ufo: STR_DREADNOUGHT
        count: 2
        trajectory: P6
        timer: 2500
        interruptPercentage: 0

From missionscript.rul


  - type: TlethFinalAlienbase
    researchTriggers:                   
      STR_THE_ULTIMATE_THREAT: true
      #STR_TLETH_TH_ALIEN_CITY: true
    executionOdds: 100
    maxRuns: 1
    varName: researching
    missionWeights:
      0:
        STR_TLETH_BASESPAWN: 100

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8628
    • View Profile
Re: Spawning Alienbases without ufo.
« Reply #12 on: October 14, 2019, 03:48:20 pm »
operationType: 0 doesn't create any base, it means the feature is disabled

also, why don't you just use one of the other 4 much easier solutions I gave you?
« Last Edit: October 14, 2019, 04:01:39 pm by Meridian »

wcho035

  • Guest
Re: Spawning Alienbases without ufo.
« Reply #13 on: October 14, 2019, 03:58:58 pm »
You mean spawning from an existing alien base?

I don’t have any other alien base in the map yet. I have accelerated the game like in Jan of the year.

Tell me this, can Alien base have unique names assign to them? Or they are given the usual bland Alien base then number?

The error I am encountering, can you tell me what kind of error is it and the cause behind it? I cane across it before, not sure what is it.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8628
    • View Profile
Re: Spawning Alienbases without ufo.
« Reply #14 on: October 14, 2019, 04:02:18 pm »
no, I mean spawning a new base...  that's what YOU wanted, no?

try
    objective: 0
    operationType: 2
    operationSpawnZone: 4
    operationBaseType: STR_ALIEN_BASE_ASSAULT

and you can remove
        interruptPercentage: 0
it doesn't do anything since you create the base before the first UFO, there is nothing to interrupt


and the 4 other solutions I gave you are here: https://openxcom.org/forum/index.php/topic,7485.msg117965.html#msg117965
« Last Edit: October 14, 2019, 04:13:29 pm by Meridian »