aliens

Author Topic: Large (2x2) X-Com facility.. Segmentation Error..  (Read 3205 times)

Offline robin

  • Commander
  • *****
  • Posts: 1203
  • ULTIMATE ROOKIE
    • View Profile
Large (2x2) X-Com facility.. Segmentation Error..
« on: October 21, 2018, 02:31:56 pm »
The hangar is split into 4 10*10 map blocks.
Should all 2*2 facilities for X-Com base be split like that, or can I make them a single 20*20 map block?
Thanks
« Last Edit: May 18, 2019, 11:38:44 pm by robin »

Offline Hobbes

  • Commander
  • *****
  • Posts: 2101
  • Infiltration subroutine in progress
    • View Profile
Re: Large (2x2) X-Com facilities, 1 map block or 4?
« Reply #1 on: October 21, 2018, 02:51:24 pm »
The hangar is split into 4 10*10 map blocks.
Should all 2*2 facilities for X-Com base be split like that, or can I make them a single 20*20 map block?
Thanks

All 20x20 facilities (and larger) need to be split into 10x10 blocks

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1931
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: Large (2x2) X-Com facilities, 1 map block or 4?
« Reply #2 on: October 21, 2018, 04:28:25 pm »
OXCE code allows them to be made as 20x20, if you use verticalLevels instead of mapName to define the mapblock.

Offline robin

  • Commander
  • *****
  • Posts: 1203
  • ULTIMATE ROOKIE
    • View Profile
Re: Large (2x2) X-Com facility.. Segmentation Error..
« Reply #3 on: May 18, 2019, 11:45:21 pm »
So I finally made a 2x2 X-Com facility... and it doesn't work, I get Segmentation Fault as soon as I try to place it.

Code: [Select]
facilities:
  - type: STR_WORKSHOP_ADVANCED
    requires:
      - STR_WORKSHOP_ADVANCED
    spriteShape: 209
    spriteFacility: 209
    size: 2
    buildCost: 516000
    buildTime: 18
    monthlyCost: 36500
    workshops: 50
    mapName: XBASEN_22
   

Code: [Select]
extraSprites:
  - type: BASEBITS.PCK
    files:
      209: Resources/apoc/basebits/facility_WORKSHOP_ADVANCED_1.gif
      210: Resources/apoc/basebits/facility_WORKSHOP_ADVANCED_2.gif
      211: Resources/apoc/basebits/facility_WORKSHOP_ADVANCED_3.gif
      212: Resources/apoc/basebits/facility_WORKSHOP_ADVANCED_4.gif
   

Icons do exist at the correct place (see attached screen). I checked what other modders where doing and I don't seem to be missing anything.

Help

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8597
    • View Profile
Re: Large (2x2) X-Com facility.. Segmentation Error..
« Reply #4 on: May 18, 2019, 11:47:17 pm »
You need 8 sprites, not 4.

2x2 facilities don't use spriteFacility.
« Last Edit: May 18, 2019, 11:52:25 pm by Meridian »

Offline robin

  • Commander
  • *****
  • Posts: 1203
  • ULTIMATE ROOKIE
    • View Profile
Re: Large (2x2) X-Com facility.. Segmentation Error..
« Reply #5 on: May 18, 2019, 11:54:24 pm »
What should I put in the other 4? The selection box for large buildings? (Solarius is doing that in his mod, but it seems pointless because that sprite already exists at position 13, 14, 15, 16).

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8597
    • View Profile
Re: Large (2x2) X-Com facility.. Segmentation Error..
« Reply #6 on: May 19, 2019, 12:01:04 am »
First 4 are for finished facility, second 4 are for facility being built.

Offline robin

  • Commander
  • *****
  • Posts: 1203
  • ULTIMATE ROOKIE
    • View Profile
Re: Large (2x2) X-Com facility.. Segmentation Error..
« Reply #7 on: May 19, 2019, 12:14:08 am »
I thought it automatically used the Hangar's box, when defining "size: 2".
Anyway it works now, thank you.