aliens

Author Topic: Weird error.  (Read 1738 times)

wcho035

  • Guest
Weird error.
« on: January 25, 2020, 06:50:00 pm »
Hi, recently have a hard crash that doesn't make sense. A mission in my missionscript, STR_SEARESOURCERAIDTASOTH, it is not suppose to spawn till December of the year.  I have put in the checks in the missionscript,

    raceWeights:
      12:
          STR_TASOTH: 100

This mission is not suppose to spawn till STR_THE_MARTIAN_SOLUTION is researched.

Yet it spawn on the 29 feb of the year, two months after the game start. Why? I have include a screenshot of the error, and the error log. Perhaps it can be explained.

In alienmission raceweight: 12,

This is my missionscript in relating to the crash.

 missionscript

  - type: resourceraidTFTD
    firstMonth: 8
    missionWeights:
      8:
        STR_SEARESOURCERAIDSECTOID: 50
        STR_SEARESOURCERAIDGILLMAN: 50
      9:
        STR_SEARESOURCERAIDSECTOID: 44
        STR_SEARESOURCERAIDGILLMAN: 33
        STR_SEARESOURCERAIDLOBSTERMAN: 23   
      12:
        STR_SEARESOURCERAIDSECTOID: 22
        STR_SEARESOURCERAIDGILLMAN: 33
        STR_SEARESOURCERAIDLOBSTERMAN: 23   
        STR_SEARESOURCERAIDTASOTH: 22         
    researchTriggers:                   
      STR_THE_MARTIAN_SOLUTION: true
    maxRuns: -1
    varName: resourceraidTFTD
    executionOdds: 60


Alien mission

  - type: STR_SEARESOURCERAIDTASOTH
    points: 50
    retaliationOdds: 20   
    raceWeights:
      12:
          STR_TASOTH: 100
    waves:
      - ufo: STR_SURVEY_SHIP
        count: 1
        trajectory: P0
        timer: 15000
        hunterKillerPercentage: 70
        huntMode: 2
        huntBehavior: 2
        escort: true      
        interruptPercentage: 20         
      - ufo: STR_ESCORT
        count: 1
        trajectory: P1
        timer: 18000
        hunterKillerPercentage: 70
        huntMode: 2
        huntBehavior: 2
        escort: true      
        interruptPercentage: 20         
      - ufo: STR_CRUISER
        count: 1
        trajectory: P3
        timer: 9000
        hunterKillerPercentage: 70
        huntMode: 2
        huntBehavior: 2
        escort: true      
        interruptPercentage: 20         
      - ufo: STR_HEAVY_CRUISER
        count: 1
        trajectory: P3
        timer: 9000
        hunterKillerPercentage: 70
        huntMode: 2
        huntBehavior: 2
        escort: true      
        interruptPercentage: 20         
      - ufo: STR_HEAVY_CRUISER
        count: 2
        trajectory: P4
        timer: 60
        hunterKillerPercentage: 70
        huntMode: 2
        huntBehavior: 2
        escort: true      
        interruptPercentage: 20   

wcho035

  • Guest
Re: Weird error.
« Reply #1 on: January 25, 2020, 06:52:49 pm »
I do understand the error is because of no alien race spawn because Tasloth was set to appear at Dec, before that there is no race set to the mission. HOWEVER, what I don't understand is, despite all the checks, this mission spawn months it is suppose to.

The check of research and month of appearance are both override. How and why?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 6915
  • OXCE developer
    • View Profile
    • My Wiki
Re: Weird error.
« Reply #2 on: January 25, 2020, 06:54:46 pm »
Hi, recently have a hard crash that doesn't make sense. A mission in my missionscript, STR_SEARESOURCERAIDTASOTH, it is not suppose to spawn till December of the year.  I have put in the checks in the missionscript,

    raceWeights:
      12:
          STR_TASOTH: 100

That's not missionScript.
That's just alienMission.

Mission script doesn't say anywhere that it should start in December... it says it should start in August (month 8 ).

missionscript

  - type: resourceraidTFTD
    firstMonth: 8
« Last Edit: January 25, 2020, 06:57:41 pm by Meridian »

wcho035

  • Guest
Re: Weird error.
« Reply #3 on: January 25, 2020, 06:57:22 pm »
So what am I missing here in my code to make it needs to start in dec?

Also why is the researchtrigger was over ridden? I have not researched  STR_THE_MARTIAN_SOLUTION


wcho035

  • Guest
Re: Weird error.
« Reply #4 on: January 25, 2020, 06:58:48 pm »
    raceWeights:
      12:

Doesn't this force the mission to start at dec? Or am I mistaken that 12 is dec start? If I am mistaken in assuming 12 is december start. What does 12: stand for here?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 6915
  • OXCE developer
    • View Profile
    • My Wiki
Re: Weird error.
« Reply #5 on: January 25, 2020, 07:00:57 pm »
So what am I missing here in my code to make it needs to start in dec?

change 8 to 12?

Also why is the researchtrigger was over ridden? I have not researched  STR_THE_MARTIAN_SOLUTION

probably the mission is generated by something else

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 6915
  • OXCE developer
    • View Profile
    • My Wiki
Re: Weird error.
« Reply #6 on: January 25, 2020, 07:02:29 pm »
    raceWeights:
      12:

Doesn't this force the mission to start at dec? Or am I mistaken that 12 is dec start? If I am mistaken in assuming 12 is december start. What does 12: stand for here?

No, it doesn't force anything.

It says, if month is at least 12, use this.
(If month is less than 12, it will crash because it doesn't find required data)

wcho035

  • Guest
Re: Weird error.
« Reply #7 on: January 25, 2020, 07:05:58 pm »
change 8 to 12?

This I understand, yet what is this

    raceWeights:
      12:

What does 12: stand for here? I can't find any documentation to clearly state the use of 12: I thought from what I had read that this mean the race appeared in Dec. Is this assumption of mine in correct?

probably the mission is generated by something else

This is not the first error I had on this. I have another just now, the research trigger is ineffective. So, is there a bug? I did declared everything correctly. This this research trigger is important in making the plot of this game worked.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 6915
  • OXCE developer
    • View Profile
    • My Wiki
Re: Weird error.
« Reply #8 on: January 25, 2020, 07:08:19 pm »
This is not the first error I had on this. I have another just now, the research trigger is ineffective. So, is there a bug? I did declared everything correctly. This this research trigger is important in making the plot of this game worked.

There is no bug there.
The research trigger is working correctly.
You have a mistake somewhere else.

wcho035

  • Guest
Re: Weird error.
« Reply #9 on: January 25, 2020, 07:09:56 pm »
Well, it appear I have to rework the alienmission again to fix up the spawn. I can fix the raceweight and the start month, but as for research trigger. I don't know why it is not working then.

Anyway, thanks for the diagnostic Meridian. 

wcho035

  • Guest
Re: Weird error.
« Reply #10 on: January 25, 2020, 07:11:10 pm »
It can't be the research tree. I haven't researched anything. So where could I even start to do a root cause analysis on this?

wcho035

  • Guest
Re: Weird error.
« Reply #11 on: January 25, 2020, 07:12:30 pm »
It should not have trigger the mission this early in end of Feb, even if it is suppose to start in august.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 6915
  • OXCE developer
    • View Profile
    • My Wiki
Re: Weird error.
« Reply #12 on: January 25, 2020, 07:14:36 pm »
It should not have trigger the mission this early in end of Feb, even if it is suppose to start in august.

That's why I say you have a mistake somewhere else.

wcho035

  • Guest
Re: Weird error.
« Reply #13 on: January 25, 2020, 07:26:25 pm »
Can you think of a cause? I mean only missionscript decides of the appearance of a mission in game. Correct? Unless the source can come from another rul file.

Another possibility could be, in my alienbase, I have this.

    genMission:
      STR_SEASURFACEATTACK: 5
      STR_SEACOLONY: 5
      STR_SEABASETFTDSEA: 5
      STR_SEAINFILTRATION: 5
      STR_SEASUPPLY: 60
      STR_SEAPROBEMISSIONSECTOID: 2
      STR_SEAPROBEMISSIONGILLMAN: 1
      STR_SEAPROBEMISSIONLOBSTERMAN: 1
      STR_SEAPROBEMISSIONTASOTH: 1    
      STR_SEAINTERDICTIONSECTOID: 3
      STR_SEAINTERDICTIONGILLMAN: 3
      STR_SEAINTERDICTIONLOBSTERMAN: 1
      STR_SEAINTERDICTIONTASOTH: 3   
      STR_SEARESOURCERAIDSECTOID: 2
      STR_SEARESOURCERAIDGILLMAN: 1
      STR_SEARESOURCERAIDLOBSTERMAN: 1   
      STR_SEARESOURCERAIDTASOTH: 1   

Gen mission from alienbases are independent from missionscript correct?

IF that is the case, then I have a TFTD base in the globe and I have yet to discover it. It is not suppose to spawn an alien base this early in the game.

Offline Yankes

  • Commander
  • *****
  • Posts: 2495
    • View Profile
Re: Weird error.
« Reply #14 on: January 25, 2020, 07:32:07 pm »
I suggest start using Git, this will allow you to track changes and find places where you make mistaken. You will stop guessing why game stop working wen you will see all changes you did recently.