OpenXcom Forum

Modding => Help => Topic started by: bulletdesigner on December 13, 2017, 01:38:32 am

Title: Invalid zone number help
Post by: bulletdesigner on December 13, 2017, 01:38:32 am
So i´m playing 40k mod and at the beginning of the month after rating, the new month starts to spawns missions .. 1 mission site and other event site , and when i "think" is about to spawn another this error occurs anyone can shed some light (is it too many missions with same spawn?)
Title: Re: Invalid zone number help
Post by: Hobbes on December 13, 2017, 02:01:22 am
So i´m playing 40k mod and at the beginning of the month after rating, the new month starts to spawns missions .. 1 mission site and other event site , and when i "think" is about to spawn another this error occurs anyone can shed some light (is it too many missions with same spawn?)

I'm looking at your rulesets. In which regions are those new missions supposed to spawn?
Title: Re: Invalid zone number help
Post by: Warboy1982 on December 13, 2017, 02:39:53 am
it'll probably be a terror mission or something using spawnZone 3 (normal for actual countries and whatnot) in a region that's specifically for terror missions (typically only containing 1 set of zones)
Title: Re: Invalid zone number help
Post by: bulletdesigner on December 13, 2017, 12:44:16 pm
the zone is asia like pic in attachment both missions

  - type: STR_M_4MISSION #cathedral
    points: 10
    objective: 0
    waves:
      - ufo: STR_CAT
        count: 2
        trajectory: B0
        timer: 5000   

  - type: STR_ALIEN_ARTIFACT
    points: 10
    objective: 3
    spawnZone: 0
    waves:
      - ufo: STR_ARTIFACT_SITE_P1 # spawn this site directly
        count: 1
        trajectory: P10
        timer: 0
        objective: true   

i think the third one  that causes the crash must be war or terror

  - type: STR_ALIEN_WAR
    points: 10
    objective: 3
    retaliationOdds: 0
    spawnZone: 0
    waves:
      - ufo: STR_SUPPLY_SHIP
        count: 1
        trajectory: P1
        timer: 15000
      - ufo: STR_LARGE_SCOUT
        count: 1
        trajectory: P1
        timer: 9600
      - ufo: STR_SUPPLY_SHIP
        count: 1
        trajectory: P0
        timer: 12000
      - ufo: STR_SUPPLY_SHIP
        count: 1
        trajectory: P7
        timer: 9000
        objective: true

  - type: STR_ALIEN_TERROR
    points: 10
    objective: 3
    spawnZone: 3 #Mission zone for terror missions
    waves:
      - ufo: STR_MEDIUM_SCOUT
        count: 1
        trajectory: P1
        timer: 15000
      - ufo: STR_LARGE_SCOUT
        count: 1
        trajectory: P1
        timer: 9600
      - ufo: STR_TERROR_SHIP
        count: 1
        trajectory: P0
        timer: 12000
      - ufo: STR_TERROR_SHIP
        count: 1
        trajectory: P7
        timer: 9000
        objective: true
Title: Re: Invalid zone number help
Post by: Warboy1982 on December 13, 2017, 03:29:43 pm
try changing alien terror to spawnzone 0 and see if the crash persists
Title: Re: Invalid zone number help
Post by: Hobbes on December 13, 2017, 08:01:13 pm
try changing alien terror to spawnzone 0 and see if the crash persists

This results on the mission never being spawned

@bulletdesigner

Try rechecking the ufoTrajectories
Title: Re: Invalid zone number help
Post by: bulletdesigner on December 14, 2017, 03:06:44 am

try changing alien terror to spawnzone 0 and see if the crash persists, tried it but crash presist

Maybe abnormal ufoTrajectories in my part?:
ufoTrajectories:
the rest is the same vanila oxcom
  - id: P10
    groundTimer: 0
    waypoints:
      - [0, 0, 0]
  - id: B0
    groundTimer: 50000000
    waypoints:
      - [1, 1 , 100]
      - [1, 0 , 100]

also i got a mission 3 still in place because of that ground timer (but is not spawning because mission 4 research cancels it out) so i got to assume is the STR_ALIEN_WAR mission
Title: Re: Invalid zone number help
Post by: Warboy1982 on December 14, 2017, 04:37:57 am
i know you're using oxce+ but i've added some more detailed crash info in the upstream nightly that should spit out the information you need to fix this.
Title: Re: Invalid zone number help
Post by: Hobbes on December 14, 2017, 05:06:25 am
i know you're using oxce+ but i've added some more detailed crash info in the upstream nightly that should spit out the information you need to fix this.

I've first tried using the 40k mod on nightly I had, since I figured that the 40k mission generation code should work in both the nightlies and OXCE+, and it did work, and I was able to reproduce the crash that bulletdesigner described.

Then I downloaded the nightly build you just uploaded, switched verbose to true in options.cfg, tried again the 40k but this time I'm getting a segmentation error the moment I click start game and Geoscape appears
Title: Re: Invalid zone number help
Post by: Warboy1982 on December 14, 2017, 05:43:54 am
yeah looking at it i didn't cover all cases it seems, you shouldn't need verbose logging btw
Title: Re: Invalid zone number help
Post by: Hobbes on December 14, 2017, 08:57:23 pm
yeah looking at it i didn't cover all cases it seems, you shouldn't need verbose logging btw

I think I nailed the error but it doesn't make much sense.

I started spawning each of the individual missions separately, and when I tried the STR_ALIEN_WAR I got this error message:

[14-12-2017_18-45-59]   [FATAL]   OpenXcom has crashed: Error occurred while trying to determine waypoint for mission type: STR_ALIEN_WAR in region: STR_NORTH_AMERICA, mission tried to find a waypoint in zone 6 but this region only has 6zone types defined.

And STR_ALIEN_TERROR seems to be also crashing for the same reason:

[14-12-2017_18-54-31]   [FATAL]   OpenXcom has crashed: Error occurred while trying to determine waypoint for mission type: STR_ALIEN_TERROR in region: STR_SOUTHERN_AFRICA, mission tried to find a waypoint in zone 6 but this region only has 6zone types defined.

@bulletdesigner

You should add an entry for month 0, on all settings where months are defined, like this:

Quote
    raceWeights:
      0:
        STR_WARWARPTALON: 30
        STR_ASSAULTCHAOS: 70
      12:
        STR_WARWARPTALON: 30
        STR_ASSAULTCHAOS: 70

This helps with testing - the segmentation error before was because of no month 0 defined
Title: Re: Invalid zone number help
Post by: Warboy1982 on December 15, 2017, 07:23:18 am
ah, i guess for reference i should point out that "mission tried to find a waypoint in zone 6" starts counting from 0 and "this region only has 6 zone types defined." starts counting from 1.
it's trying to spawn stuff in the seventh zone out of a set of six.
i've tried to clarify it a little in today's commit.
Title: Re: Invalid zone number help
Post by: bulletdesigner on December 15, 2017, 11:59:28 am

You should add an entry for month 0, on all settings where months are defined, like this:

This helps with testing - the segmentation error before was because of no month 0 defined

ok done, i thought because mission only starts to appear at 13th month there was no worry about month 0  :P

so i should  add more zones to regions?
#NORTH AMERICA
        - [280, 280, -38.43, -38.43, -5]
        - [237, 237, -42.33, -42.33, -5]
        - [248, 248, -48.27, -48.27, -5]
        - [262, 262, -35.33, -35.33, -5]
        - [261.2, 261.2, -20, -20, -5]
        - [257.9, 257.9, -30.1, -30.1, -5]
        - [261, 261, -33.7, -33.7, -5]
        - [281.9, 281.9, -35.3, -35.3, -5]
        - [241.2, 241.2, -34.5, -34.5, -5]
        - [240.4, 240.4, -44, -44, -5]
        - [276.8, 276.8, -46.4, -46.4, -5]
        - [251, 251, -49.5, -49.5, -5]
ex: adding more locations to this?
Title: Re: Invalid zone number help
Post by: Hobbes on December 15, 2017, 03:54:29 pm
it's trying to spawn stuff in the seventh zone out of a set of six.

But the weird part is that I can't find where exactly where there's a reference to a seventh zone: the ufoTrajectories and regions are the same as vanilla, so it should work. Unless there's a reference to a 7th zone hidden elsewhere.

Also, this bug seems only to affect mission sites (objective 3) which use multiple UFOs - the other missions (Research at least) don't seem to suffer from this bug since the UFOs are spawned without crashes.

so i should  add more zones to regions?
#NORTH AMERICA
        - [280, 280, -38.43, -38.43, -5]
        - [237, 237, -42.33, -42.33, -5]
        - [248, 248, -48.27, -48.27, -5]
        - [262, 262, -35.33, -35.33, -5]
        - [261.2, 261.2, -20, -20, -5]
        - [257.9, 257.9, -30.1, -30.1, -5]
        - [261, 261, -33.7, -33.7, -5]
        - [281.9, 281.9, -35.3, -35.3, -5]
        - [241.2, 241.2, -34.5, -34.5, -5]
        - [240.4, 240.4, -44, -44, -5]
        - [276.8, 276.8, -46.4, -46.4, -5]
        - [251, 251, -49.5, -49.5, -5]
ex: adding more locations to this?

Already tried it by setting all the Terror and Alien War mission to only run in North America and adding a missionZone 6 to that region. I still get the same crash, but now it says that missionZone 7 is missing...

Quote
[15-12-2017_14-09-44]   [FATAL]   OpenXcom has crashed: Error occurred while trying to determine waypoint for mission type: STR_ALIEN_WAR in region: STR_NORTH_AMERICA, mission tried to find a waypoint in zone 7 but this region only has zones valid up to 6
Title: Re: Invalid zone number help
Post by: Hobbes on December 16, 2017, 12:33:01 am
@bulletdesigner

The issue wasn't with your rulesets but with a bug that was affecting all mods and that has been already fixed by Warboy on the nightlies
Title: Re: Invalid zone number help
Post by: bulletdesigner on December 16, 2017, 06:45:28 pm
ok nice,
So i just reinstall nightlies , and oxce+ , but oxce+ is older than latest nightlies, how do i do this?
i´m a long way from vanilla a this point  :P  whats the proper order to do this?
Title: Re: Invalid zone number help
Post by: R1dO on December 16, 2017, 07:26:28 pm
Unless you are comfortable merging the necessary commits from the nightly and with compiling oxce+ yourself. Your best bet is to wait for an update of oxce+
Title: Re: Invalid zone number help
Post by: Hobbes on December 16, 2017, 07:36:49 pm
Your best bet is to wait for an update of oxce+

Which shouldn't take long because without the fix, the game is broken ;)
Title: Re: Invalid zone number help
Post by: Yankes on December 16, 2017, 07:38:23 pm
ok nice,
So i just reinstall nightlies , and oxce+ , but oxce+ is older than latest nightlies, how do i do this?
i´m a long way from vanilla a this point  :P  whats the proper order to do this?
oxce use week old nightly, oxce+ soon will use same. Warboy changes are newer but I plan merge them this week to be up to date.
Title: Re: Invalid zone number help
Post by: Meridian on December 21, 2017, 12:35:43 pm
OXCE+ is merged too, but it has 2 serious issues atm... one with proxies and one with corpse recovery... I'll publish when it's fixed and tested at least a bit.
Title: Re: Invalid zone number help
Post by: Yankes on December 21, 2017, 03:00:45 pm
OXCE+ is merged too, but it has 2 serious issues atm... one with proxies and one with corpse recovery... I'll publish when it's fixed and tested at least a bit.
I will try this fixes in this week