Author Topic: multi-crafts?  (Read 3702 times)

Hyper2Snyper

  • Guest
multi-crafts?
« on: December 20, 2017, 06:06:33 am »
is it possible to make it so you could have multiple crafts in one hangar?

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: multi-crafts?
« Reply #1 on: December 20, 2017, 07:38:50 am »
I am also interested in knowing if this is possible.

If two craft can be housed in one facility are both craft's base sprites rendered overlapping on the hanger's tile or can you choose which one is displayed?


(EDIT)


I did some quick tests with this code:
Code: [Select]
extraStrings:
  - type: en-US
    strings:
      STR_HANGAR_TEST: "HANGAR TEST"
facilities:
  - type: STR_HANGAR_TEST
    spriteShape: 9
    spriteFacility: 9
    size: 2
    buildCost: 200000
    buildTime: 2
    monthlyCost: 25000
    crafts: 2
    mapName: XBASE_16

(These are the results):
(1) You can have two craft (or theoretically more) stored in one hangar.

(2) The first craft placed in the hangar will have it's base sprite displayed, the other will not.

(3) Even when the first craft is airborne and the second craft is still in the hangar it will not be displayed, the hangar will appear to be empty visually.
« Last Edit: December 20, 2017, 07:57:43 am by The Martian »

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1510
    • View Profile
Re: multi-crafts?
« Reply #2 on: December 20, 2017, 08:58:41 am »
Could you make a 1x1 Hangar that displays the craft, and just have more hangars?

Hyper2Snyper

  • Guest
Re: multi-crafts?
« Reply #3 on: December 20, 2017, 07:42:18 pm »
Cool thanks

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: multi-crafts?
« Reply #4 on: December 21, 2017, 02:17:58 am »
Could you make a 1x1 Hangar that displays the craft, and just have more hangars?
Just tested it and a 1x1 hangar functions without a problem.

I used the workshop tile for this example code:

Code: [Select]
extraStrings:
  - type: en-US
    strings:
      STR_HANGAR_TEST: "HANGAR TEST"
facilities:
  - type: STR_HANGAR_TEST
    spriteShape: 1
    spriteFacility: 20
    buildCost: 800000
    buildTime: 2
    monthlyCost: 35000
    mapName: XBASE_03
    crafts: 1

The only catch appears to be a visual one. The base craft sprites or the 1x1 hangar tile will need to be designed to prevent it from overlapping where X-Com facilities traditionally have their walls drawn.

Hyper2Snyper

  • Guest
Re: multi-crafts?
« Reply #5 on: December 21, 2017, 03:57:37 am »
Cool

Offline tkzv

  • Commander
  • *****
  • Posts: 583
    • View Profile
Re: multi-crafts?
« Reply #6 on: December 22, 2017, 03:01:25 am »
What happens when the base is attacked?

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: multi-crafts?
« Reply #7 on: December 22, 2017, 06:43:28 am »
I haven't yet been able to test if the game will behave normally if the base is attacked, but in theory it should not be effected

All X-Com craft are evacuated when a base is attacked so they are not present as an object in the hangar area maps.


Code: [Select]
    mapName: XBASE_03The above code should be what is determining which base map segment is added to the battlescape for the custom hangar section.

Offline tkzv

  • Commander
  • *****
  • Posts: 583
    • View Profile
Re: multi-crafts?
« Reply #8 on: December 22, 2017, 08:07:54 pm »
The question is if they are still in place after the battle. If I'm not mistaken, the hangars can be destroyed by battle, thus the game checks what to do with craft after the battle.

I've seen a bug when items went missing after the base was attacked. There's no guarantee the engine will handle unexpected situation like multiple craft the way you want it.