Author Topic: [OXCE+] Upgraded Facilities  (Read 13055 times)

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: [OXCE+] Upgraded Facilities
« Reply #15 on: March 15, 2018, 09:17:22 pm »
I removed this code, and its work, but i dont understand why need this, or how its work
Spoiler:
missionScripts:
  - type: gameStart
    missionWeights:
      0:
        STR_ALIEN_RETALIATION: 100
    lastMonth: 0
    targetBaseOdds: 100
    raceWeights:
      0:
        STR_SECTOID: 100
    startDelay: 120
You don't need or want that in the final mod. I don't know why it would make the game crash, but it's supposed to cause your base to get attacked early in the game so you can check if your facilities look good on the inside.


- When i start new game (and running) i see all upgraded buildings info in UFOpeadia. But i think its not good, because need research first. How can i fix this?

Thank you!
You have to add the tech requirements to the UFOPedia entries for the facilities. For an example, check the original alien containment UFOPedia entry.

There are up to four places to add tech requirements to any thing you add:
1.) research, requirement before it appears on the research list
2.) UFOPedia, requirement before you can read about it
3.) manufacture, requirement before it can be built (for facilities, this is instead done in the facilities entry)
4.) item -- only for items, you can set a tech requirement in order to be able to use the item

For research projects, use the format:
Code: [Select]
    dependencies:
      - STR_

For everything else, use the format:
Code: [Select]
    requires:
      - STR_

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: [OXCE+] Upgraded Facilities
« Reply #16 on: March 15, 2018, 09:30:50 pm »
The crash from having the base defense mission usually occurs because you don't have the proper maps for the facility - did you give your upgraded facilities a "mapName:" definition?  For example, the standard living quarters has

Code: [Select]
  - type: STR_LIVING_QUARTERS
    #...
    mapName: XBASE_01

Offline Biggieboy

  • Colonel
  • ****
  • Posts: 220
    • View Profile
Re: [OXCE+] Upgraded Facilities
« Reply #17 on: March 15, 2018, 09:37:40 pm »
The crash from having the base defense mission usually occurs because you don't have the proper maps for the facility - did you give your upgraded facilities a "mapName:" definition?  For example, the standard living quarters has

Code: [Select]
  - type: STR_LIVING_QUARTERS
    #...
    mapName: XBASE_01

Yes, you can check the mod, there it is:

Spoiler:
  - type: STR_LIVING_QUARTERS
    spriteShape: 1
    spriteFacility: 18
    buildCost: 400000
    refundValue: 400000
    buildTime: 16
    monthlyCost: 10000
    personnel: 50
    mapName: XBASE_01
    canBeBuiltOver: true

But why need this code? Its works without it. Or not?
« Last Edit: March 15, 2018, 09:45:07 pm by Biggieboy »

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: [OXCE+] Upgraded Facilities
« Reply #18 on: March 15, 2018, 09:56:50 pm »
I know it's there for the regular living quarters, but you added upgraded living quarters - if this new facility doesn't have a mapName, then the game will crash when aliens attack your base; the code will be trying to place a block on the battlscape map that doesn't exist.

Offline Biggieboy

  • Colonel
  • ****
  • Posts: 220
    • View Profile
Re: [OXCE+] Upgraded Facilities
« Reply #19 on: March 15, 2018, 10:01:18 pm »
I know it's there for the regular living quarters, but you added upgraded living quarters - if this new facility doesn't have a mapName, then the game will crash when aliens attack your base; the code will be trying to place a block on the battlscape map that doesn't exist.

I check again the code, but all upgraded facilities have this key (exaple:   - type: STR_LIVING_QUARTERS_UPGRADE, mapName: XBASE_01)

Can you check it too, where is the problem?

Thank you!

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: [OXCE+] Upgraded Facilities
« Reply #20 on: March 15, 2018, 10:56:01 pm »
I don't see anything wrong with it. The upgraded facilities all have an existing map definition, and the training facility plus its upgrade all appear to be installed correctly.

Try getting a base defense mission with a training facility in the base, and then try without. If it crashes only with the training facility, we can narrow it down to that.

Offline Biggieboy

  • Colonel
  • ****
  • Posts: 220
    • View Profile
Re: [OXCE+] Upgraded Facilities
« Reply #21 on: March 16, 2018, 12:57:59 am »
I don't see anything wrong with it. The upgraded facilities all have an existing map definition, and the training facility plus its upgrade all appear to be installed correctly.

Try getting a base defense mission with a training facility in the base, and then try without. If it crashes only with the training facility, we can narrow it down to that.

Maybe i found the problem. The error say STR_SECTOID not defined. I search this key in files, and i found this in Area_51_Missions.rul. There is STR_SECTOID_SCI. So, i changed the code to this, and now work! (its not crashed, when i start new game and build the new base).
BUT! If i turn of the Area 51 mod, its crashed again..
How can i define both key?


And the other problem solved, i use "    requires:" to ufopedia, and now not see the upgraded facilities in UFOpeadia, when new game started.

Sadly i dont play too much with this mod, and i cant test the base attack.

Thank you!
« Last Edit: March 16, 2018, 01:00:56 am by Biggieboy »

Offline Biggieboy

  • Colonel
  • ****
  • Posts: 220
    • View Profile
Re: [OXCE+] Upgraded Facilities
« Reply #22 on: April 20, 2018, 02:07:24 pm »
New version coming!

- All building researchable!
- Upgraded buiding need resources!
- 2x2 general store and living room!
- Training Room!
- English and Hungarian language (if need more, send me the traslation!)
« Last Edit: April 20, 2018, 02:52:31 pm by Biggieboy »

Offline yergnoor

  • Colonel
  • ****
  • Posts: 147
    • View Profile
Re: [OXCE+] Upgraded Facilities
« Reply #23 on: April 21, 2018, 06:29:50 am »
New version coming!
I'm sorry, but ... where exactly can I download this new version? The file is not attached to the description, and all other comments in this thread were last edited last month.
Sorry for my Google-English.

Offline Biggieboy

  • Colonel
  • ****
  • Posts: 220
    • View Profile
Re: [OXCE+] Upgraded Facilities
« Reply #24 on: April 21, 2018, 10:09:08 am »
I'm sorry, but ... where exactly can I download this new version? The file is not attached to the description, and all other comments in this thread were last edited last month.
Sorry for my Google-English.

As i say, its comming, i hope today or tomorrow! I work on it Large workshop too :)