OpenXcom Forum

Modding => Help => Topic started by: robin on October 21, 2018, 02:31:56 pm

Title: Large (2x2) X-Com facility.. Segmentation Error..
Post by: robin 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
Title: Re: Large (2x2) X-Com facilities, 1 map block or 4?
Post by: Hobbes 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
Title: Re: Large (2x2) X-Com facilities, 1 map block or 4?
Post by: ohartenstein23 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.
Title: Re: Large (2x2) X-Com facility.. Segmentation Error..
Post by: robin 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
Title: Re: Large (2x2) X-Com facility.. Segmentation Error..
Post by: Meridian on May 18, 2019, 11:47:17 pm
You need 8 sprites, not 4.

2x2 facilities don't use spriteFacility.
Title: Re: Large (2x2) X-Com facility.. Segmentation Error..
Post by: robin 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).
Title: Re: Large (2x2) X-Com facility.. Segmentation Error..
Post by: Meridian on May 19, 2019, 12:01:04 am
First 4 are for finished facility, second 4 are for facility being built.
Title: Re: Large (2x2) X-Com facility.. Segmentation Error..
Post by: robin 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.