OpenXcom Forum

Modding => Help => Topic started by: The Martian on May 25, 2023, 12:45:21 am

Title: [Solved] Setting up the X-Com Craft's landing zone location?
Post by: The Martian on May 25, 2023, 12:45:21 am
How do I setup the area for the X-Com craft to land on a map?

If possible I'm trying to have the ship land on this roof in the middle.
(https://openxcom.org/forum/index.php?action=dlattach;topic=11272.0;attach=59827)
(https://openxcom.org/forum/index.php?action=dlattach;topic=11272.0;attach=59829)

From what I'm seeing I think the landing zone is setup using this command.
Code: [Select]
mapScripts:
  - type: ALIEN_COLONY_P1
    commands:
    - type: addCraft
      rects:
       - [1,0,1,2]
       - [4,0,1,2]
       - [1,4,1,2]
       - [4,4,1,2]

But I'm guessing vertically placing the craft may not be supported as I'm only seeing X and Y.
(https://openxcom.org/forum/index.php?action=dlattach;topic=11272.0;attach=59834)

If landing on the roof can't be done I'll try expanding the map and placing the landing zone over here at ground level:
(https://openxcom.org/forum/index.php?action=dlattach;topic=11272.0;attach=59831)


Here are the map files:
Warehouse Map.zip (https://openxcom.org/forum/index.php?action=dlattach;topic=11272.0;attach=59833)

And the terrains list:
Code: [Select]
    terrains:
      - PORT01
      - PORT02
      - SEA
      - GRATING_AND_SUPPORTS
      - ROCKET_ONLY
      - TORPEDO_ONLY
      - DECKC_WHITE
      - JUST_RAILING
      - JUST_ELEVATOR
Title: Re: Setting up the X-Com Craft's landing zone location?
Post by: The Martian on May 25, 2023, 07:51:52 pm
I figured it out. What was causing my problem was that the mapScripts: needs a second addCraft command in case the shape of the ship is not a 1x1 map block.

Code: [Select]
mapScripts:

  - type: STR_MFTD_ARMSWAREHOUSE
    commands:
    - type: addCraft
      rects:
        - [1,1,1,1]
      label: 1
    - type: addCraft
      rects:
        - [1,1,1,2]
      conditionals: [-1]
    - type: addBlock
      size: [3,4]

There is no need to define the vertical placement of the craft it automatically places it on the first floor terrain from the top of the map.