Author Topic: [Suggestion] Make more than one hangar size possible  (Read 30173 times)

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
[Suggestion] Make more than one hangar size possible
« on: December 23, 2017, 07:21:53 pm »
It is currently possible to make a small hangar work, but you have to make a choice whether you'll use only large or only small. At current, there is no way for the game to distinguish between sizes and let the modder choose which craft can go in which hangar. There are also some graphical problems with small hangars since the craft sprite is able to be too large, but that can be remedied by not using a sprite so large.

My request is for a ruleset item which tells the game to only allow a craft to fit in a large (2x2) hangar, so all craft that are not marked (i.e.: craftIsLarge: true) would fit in either size. The value should possibly default a craft to large unless otherwise stated.
« Last Edit: December 21, 2019, 02:49:16 am by The Reaver of Darkness »

Online Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: [REQUEST] Make more than one hangar size possible
« Reply #1 on: December 24, 2017, 12:20:22 am »
I would see doing this in bit different way, instead of size simply have different hangar type, and each craft can need different hangar. 1x1 hangar would be special case.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11728
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [REQUEST] Make more than one hangar size possible
« Reply #2 on: December 24, 2017, 12:29:37 am »
I would see doing this in bit different way, instead of size simply have different hangar type, and each craft can need different hangar. 1x1 hangar would be special case.

Well, I'm not sure... What's stopping you from parking a car inside a hangar?

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: [REQUEST] Make more than one hangar size possible
« Reply #3 on: December 24, 2017, 03:59:21 am »
instead of size simply have different hangar type
That could be a cool way to do it. Then the modder could assign several different hangar types.


What's stopping you from parking a car inside a hangar?
It sounds like you're thinking with Yankes' idea, you couldn't put a large craft in a small hangar, but then couldn't put a small craft in a large hangar. I figure you could assign multiple hangar types to one vehicle, enabling it to go in all of the hangars it's supposed to have access to.


Is this a good time to ask for an aircraft storage facility, which can hold multiple craft that aren't ready to fly?

Offline NeoWorm

  • Colonel
  • ****
  • Posts: 104
    • View Profile
Re: [REQUEST] Make more than one hangar size possible
« Reply #4 on: December 24, 2017, 11:08:50 am »
Would it be possible to extend "provideBaseFunc:" for this? How I understand it the BaseFunction works for a base as a whole, not for building themselves. Which means having one hangar with large craft function would mean ALL the hangars in that base have this function. So a logic that would check for free hangar and it's provided function would be needed.
But than it would go like: add to aircraft requirement for Base function, add propper function to hangar and done!

Online Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: [REQUEST] Make more than one hangar size possible
« Reply #5 on: December 24, 2017, 01:36:20 pm »
That could be a cool way to do it. Then the modder could assign several different hangar types.

It sounds like you're thinking with Yankes' idea, you couldn't put a large craft in a small hangar, but then couldn't put a small craft in a large hangar. I figure you could assign multiple hangar types to one vehicle, enabling it to go in all of the hangars it's supposed to have access to.
Exactly something like that, because with this we could have "space port" hangar.

Is this a good time to ask for an aircraft storage facility, which can hold multiple craft that aren't ready to fly?
This probably will need more work that is worth it. How you choose what craft is stored and what is ready?

Would it be possible to extend "provideBaseFunc:" for this? How I understand it the BaseFunction works for a base as a whole, not for building themselves. Which means having one hangar with large craft function would mean ALL the hangars in that base have this function. So a logic that would check for free hangar and it's provided function would be needed.
But than it would go like: add to aircraft requirement for Base function, add propper function to hangar and done!
If I add new code why use old property that is used for different thing? Overall biggest problem is that I would need different that is possible using "provideBaseFunc:", because I need way to disallow craft in hangar and have default behavior. This will be probably hard to archive using this.


One question for modders, what you would prefer, defining hangar type and list allowed types in aircraft or opposite, defining aircraft type and list of allowed types in hangar?

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11728
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [REQUEST] Make more than one hangar size possible
« Reply #6 on: December 24, 2017, 02:23:13 pm »
One question for modders, what you would prefer, defining hangar type and list allowed types in aircraft or opposite, defining aircraft type and list of allowed types in hangar?

I'd much rather have it on the craft. It looks like a craft attribute: Small (1x1), Standard (2x2), Large (3x3) etc.

Offline NeoWorm

  • Colonel
  • ****
  • Posts: 104
    • View Profile
Re: [REQUEST] Make more than one hangar size possible
« Reply #7 on: December 24, 2017, 02:23:41 pm »
One craft needs hangar with ONLYSMALL function, other needs hangar with ONLYBIG function. I don't see a probles. On the contrary. You don' t need to check if you manufacture craft if it fits the hangar, only if the function is present in base.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11728
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [REQUEST] Make more than one hangar size possible
« Reply #8 on: December 24, 2017, 02:27:22 pm »
I don't like using ProbideBaseFunc for this. It's confusing as hell, because like Yankes said, it's used for different things. Why be needlessly mean to modders?
And if we go with the craft, nothing is actually needed on the facility, except the hangar property and size.

Offline NeoWorm

  • Colonel
  • ****
  • Posts: 104
    • View Profile
Re: [REQUEST] Make more than one hangar size possible
« Reply #9 on: December 24, 2017, 02:34:20 pm »
For me it's much more confusing to find the propper property across 3 readme files and ruleset references. I like universal stuff more. Also I don't see how is the functionality that diferent. It provides info for crafting and research, at least with the crafting it ovelaps. Also you woudnt need to specify allowed and disallowed buildings by name on each craft and propagate it through the whole mod. Just make a tag ang use that.

Online Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: [REQUEST] Make more than one hangar size possible
« Reply #10 on: December 24, 2017, 03:43:57 pm »
One craft needs hangar with ONLYSMALL function, other needs hangar with ONLYBIG function. I don't see a probles. On the contrary. You don' t need to check if you manufacture craft if it fits the hangar, only if the function is present in base.
And what if I want have universal hangar? or add third category? how will work default config? what if I have correct hangar but is already used? how add space port config?

For me it's much more confusing to find the propper property across 3 readme files and ruleset references. I like universal stuff more. Also I don't see how is the functionality that diferent. It provides info for crafting and research, at least with the crafting it ovelaps. Also you woudnt need to specify allowed and disallowed buildings by name on each craft and propagate it through the whole mod. Just make a tag ang use that.
But you will still need split it because what is small craft and what is big craft? You need define it somewhere.

I'd much rather have it on the craft. It looks like a craft attribute: Small (1x1), Standard (2x2), Large (3x3) etc.
If someone do not go with different solution then I will do this way:

Code: [Select]
crafts:
  - type: STR_CRAFT_TYPE
    craftType: 0 #default `0`, can be any value you want, `1` could mean small and `2` large.


facilities:
  - type: STR_SOME_FACILITY
    allowedCraftTypes: [0] #default config, can be expadend to `[0, 1]` == small and normal allowed, `[2]` == only large

Offline NeoWorm

  • Colonel
  • ****
  • Posts: 104
    • View Profile
Re: [REQUEST] Make more than one hangar size possible
« Reply #11 on: December 24, 2017, 04:07:37 pm »
Universal is any hangar with all functions, common hangar have no special function. Craft have specified function he requires from hangar if none specified, it can fit anywhere. You can define your own functions so, that means space port is just a function, submarine pen is just another function. Small craft or big craft is just another function, unless you want to make 2x2 crafts for 3x3 hangars. That function is also requirement for crafting said craft. Moving crafts between hangars in the base will have to be done anyway. If a craft that can be in hangar A or B is in hangar A and you want to build craft that requires hangar A, the game either have to be smart enough to move said craft, or player needs a way to move the aircrafts manually. Still think the "ProvideBaseFunctionality" is logical way.

Online Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: [REQUEST] Make more than one hangar size possible
« Reply #12 on: December 24, 2017, 06:33:58 pm »
But in that model every hangar need accept normal crafts, I would like have option to prevent this. Of corse you can tweak code in that model to support this but this will be less universal because of special cases. And for "andr player needs a way to move the aircrafts manually" this would need changes in UI that I try not to do in OXCE.


btw happy Christmas Eve everyone :)

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: [REQUEST] Make more than one hangar size possible
« Reply #13 on: December 24, 2017, 10:17:49 pm »
If someone do not go with different solution then I will do this way:

Code: [Select]
crafts:
  - type: STR_CRAFT_TYPE
    craftType: 0 #default `0`, can be any value you want, `1` could mean small and `2` large.


facilities:
  - type: STR_SOME_FACILITY
    allowedCraftTypes: [0] #default config, can be expadend to `[0, 1]` == small and normal allowed, `[2]` == only large
Works for me. =)
I'm really happy to see that this will become a thing!



This probably will need more work that is worth it. How you choose what craft is stored and what is ready?
You know what, maybe it would be easier to have a re-packaging system, you just click a re-package button and the craft becomes an item which goes straight into your general stores. It simply needs to have an item entry with the same name, then you can already set a space value and sell value. There would also need to be a way to turn the item back into an aircraft. In the sell/sack menu, you could have the system check each item type for a corresponding craft with the same name, and vice versa, and add a button to swap one into the other. It would fit immediately to the left of the sell/sack buttons and would decrease the space for quantity slightly. I don't know if it would affect the whole column or not, but aircraft items would never need so much space for quantity.

I was picturing a UI page that looks kind of like the general stores, on one side you have aircraft storage space and on the other is number of hangars. You just hit the left/right arrow on any craft in the list to tell whether it's in storage or hangar. In storage it has all its armaments, units, items, and fuel moved to stores. If it also lost its designation and became an item of that craft's type, then you could stack them and assign a sell value, which solves another problem some have been asking for: make it so you can include a craft in manufacturing recipe or sell the craft.

You could have hangars on the left, aircraft storage in the middle, and sell on the right. You can shift it from hangar to storage and then to sell. Each craft entry would require an item entry to be able to do this.

Offline Biggieboy

  • Colonel
  • ****
  • Posts: 220
    • View Profile
Re: [REQUEST] Make more than one hangar size possible
« Reply #14 on: March 26, 2018, 01:57:27 am »
Works for me. =)
I'm really happy to see that this will become a thing!


You know what, maybe it would be easier to have a re-packaging system, you just click a re-package button and the craft becomes an item which goes straight into your general stores. It simply needs to have an item entry with the same name, then you can already set a space value and sell value. There would also need to be a way to turn the item back into an aircraft. In the sell/sack menu, you could have the system check each item type for a corresponding craft with the same name, and vice versa, and add a button to swap one into the other. It would fit immediately to the left of the sell/sack buttons and would decrease the space for quantity slightly. I don't know if it would affect the whole column or not, but aircraft items would never need so much space for quantity.

I was picturing a UI page that looks kind of like the general stores, on one side you have aircraft storage space and on the other is number of hangars. You just hit the left/right arrow on any craft in the list to tell whether it's in storage or hangar. In storage it has all its armaments, units, items, and fuel moved to stores. If it also lost its designation and became an item of that craft's type, then you could stack them and assign a sell value, which solves another problem some have been asking for: make it so you can include a craft in manufacturing recipe or sell the craft.

You could have hangars on the left, aircraft storage in the middle, and sell on the right. You can shift it from hangar to storage and then to sell. Each craft entry would require an item entry to be able to do this.


Hi!

Is it possible other way?

I create mod for upgrade facilities, so what happen if 2 hangars upgraded to 1 big (2x4 size) And can hold 3 crafts?