OpenXcom Forum

Modding => Work In Progress => Topic started by: The Reaver of Darkness on June 23, 2017, 07:35:49 am

Title: Aircraft Storage?
Post by: The Reaver of Darkness on June 23, 2017, 07:35:49 am
I'm trying to find a way to store my aircraft such that I can hold more at my base than I have hangars available for keeping them in a ready state. I want to be able to stow the craft without fuel or equipment so that I can put them into a hangar later when I want to switch them out.


Does anyone know any possible way to mod this feature in? I was thinking perhaps a 1x1 facility that can store an aircraft but can't launch it. Is there a way to set a facility to store an aircraft without fuel and equipment? And if so, is there a way to transfer it to an open hangar?
Title: Re: Aircraft Storage?
Post by: Meridian on June 23, 2017, 08:45:01 am
No.
Title: Re: Aircraft Storage?
Post by: Nord on June 23, 2017, 10:29:02 am
Maybe through manufacturing special item using vessel as resource and then back?
Title: Re: Aircraft Storage?
Post by: Meridian on June 23, 2017, 10:39:18 am
Maybe through manufacturing special item using vessel as resource and then back?

Poké Balls!!  8)
Title: Re: Aircraft Storage?
Post by: Nord on June 23, 2017, 01:54:39 pm
In heavy machinery it is called "conservation" . 8)
Title: Re: Aircraft Storage?
Post by: The Reaver of Darkness on June 23, 2017, 05:35:21 pm
No.

Is there no way at all, even in OXCE?
Title: Re: Aircraft Storage?
Post by: Meridian on June 23, 2017, 05:37:26 pm
Is there no way at all, even in OXCE?

As Nord said, you can transform the craft into an item, store it in the stores.... and when needed transform the item back into a craft.
Title: Re: Aircraft Storage?
Post by: chaosshade on June 23, 2017, 09:36:20 pm
What about making the hangers give you two storage space instead of one, or would that cause glitches?
Title: Re: Aircraft Storage?
Post by: Solarius Scorch on June 23, 2017, 10:21:43 pm
What about making the hangers give you two storage space instead of one, or would that cause glitches?

That would be kinda fun, as long as you can define if the craft as "small" or "standard".
Title: Re: Aircraft Storage?
Post by: ohartenstein23 on June 24, 2017, 01:09:59 am
I think it would be easier code-wise to restrict craft to certain hangars based on size - "small" craft can fit in hangars designated as "small" or "large," "large" craft need "large" hangars, then you can mod in a 1x1 hangar to designate as "small."  Or just try making a good-looking sprite+map for a 1x1 hangar without new code, and balance it somehow vs. the 2x2.
Title: Re: Aircraft Storage?
Post by: The Reaver of Darkness on June 24, 2017, 02:08:05 am
I guess I COULD make hangars 1x1 and just allow all craft to be launched from any hangar. The best way to balance that gameplay-wise is probably to make the craft cheaper, weaker, and more specialized so that you need more aircraft. It could also go well with a more realistic base radar range, such that you have to rely on aircraft to do your scouting.

As Nord said, you can transform the craft into an item, store it in the stores.... and when needed transform the item back into a craft.
How would I do that? I made a discussion on this topic before, and nobody there found a solution. I tried to do it but the game simply doesn't recognize an aircraft as an item that can be used in manufacturing recipes.
Title: Re: Aircraft Storage?
Post by: ohartenstein23 on June 24, 2017, 05:23:41 am
See the Mudranger->Airborne Mudranger conversation in XComFiles. I think this was even an addition to vanilla after your thread; craft can be used as required items for manufacturing, you just need an empty hangar before you start the project.  Make a project for Aircraft to Aircraft in Storage as an item, then from storage back to craft as a second project.
Title: Re: Aircraft Storage?
Post by: The Reaver of Darkness on June 24, 2017, 08:19:35 pm
See the Mudranger->Airborne Mudranger conversation in XComFiles. I think this was even an addition to vanilla after your thread; craft can be used as required items for manufacturing, you just need an empty hangar before you start the project.  Make a project for Aircraft to Aircraft in Storage as an item, then from storage back to craft as a second project.
I can't find that topic. In fact, when I search the forums for the word 'Mudranger', I get only 3 hits within X-Com Files, and in none of these are people even discussing the craft. One is a changelog, one is a single mention of the craft in a different discussion, and one doesn't seem to actually contain the word 'mudranger' so I'm not sure why search is pulling it up.
Title: Re: Aircraft Storage?
Post by: Meridian on June 24, 2017, 08:24:36 pm
I can't find that topic. In fact, when I search the forums for the word 'Mudranger', I get only 3 hits within X-Com Files, and in none of these are people even discussing the craft. One is a changelog, one is a single mention of the craft in a different discussion, and one doesn't seem to actually contain the word 'mudranger' so I'm not sure why search is pulling it up.

It was implemented in vanilla in january 2016: https://github.com/SupSuper/OpenXcom/commit/8849077704b38e37e17d222ecac314ee5a7e97de
Title: Re: Aircraft Storage?
Post by: ohartenstein23 on June 25, 2017, 06:03:47 pm
Sorry, I meant conversion, not conversation. XCF has a craft that you can convert into another craft, you can use that as a reference.
Title: Re: Aircraft Storage?
Post by: The Reaver of Darkness on June 26, 2017, 11:22:04 am
Can someone explain it to me a bit better? I downloaded the mod and checked it out. Much of the code is alien to me, I can't find any mention of a way to change the Mudranger to airborne, I don't see it in the code, and playing the mod for a few hours suggested it'll be a while before I find it in game.
Title: Re: Aircraft Storage?
Post by: Solarius Scorch on June 26, 2017, 06:40:07 pm
It's actually pretty simple. Here's the mudranger -> better mudranger process:

Code: [Select]
manufacture:
  - name: STR_IMPROVED_MUDRANGER
    category: STR_CRAFT
    requires:
      - STR_IMPROVED_MUDRANGER
    space: 20
    time: 2000
    cost: 100000
    requiredItems:
      STR_MUDRANGER: 1
    listOrder: 732

This is a case of a craft being used to make another craft. But I'm fairly sure you can also use it to make something else.
Title: Re: Aircraft Storage?
Post by: The Reaver of Darkness on June 26, 2017, 07:27:17 pm
Was this a change made very recently to openxcom or does it require something else I'm missing? I tried this on the 2017-02-09 snapshot and it didn't work. The game didn't recognize Interceptor-1 as a STR_INTERCEPTOR for a manufacturing project.
Title: Re: Aircraft Storage?
Post by: Meridian on June 27, 2017, 10:47:17 am
Was this a change made very recently to openxcom or does it require something else I'm missing?

As I said above, it was done in January 2016.

I tried this on the 2017-02-09 snapshot and it didn't work. The game didn't recognize Interceptor-1 as a STR_INTERCEPTOR for a manufacturing project.

Here's a vanilla example of converting Interceptor into a Motion Scanner...

Code: [Select]
manufacture:
  - name: STR_INTERCEPTOR_INTO_MOTION_SCANNER
    category: STR_EQUIPMENT
    space: 0
    time: 10
    cost: 100
    requiredItems:
      STR_INTERCEPTOR: 1
    producedItems:
      STR_MOTION_SCANNER: 1

... and back.

Code: [Select]
manufacture:
  - name: STR_MOTION_SCANNER_INTO_INTERCEPTOR
    category: STR_CRAFT # important!
    space: 0
    time: 10
    cost: 100
    requiredItems:
      STR_MOTION_SCANNER: 1
    producedItems:
      STR_INTERCEPTOR: 1
Title: Re: Aircraft Storage?
Post by: The Reaver of Darkness on June 27, 2017, 08:26:22 pm
It works now. I don't know what I was doing wrong before. Oh well, thanks.