OpenXcom Forum

Modding => OXCE Suggestions NEW => OpenXcom Extended => OXCE Suggestions OK => Topic started by: The Reaver of Darkness on December 23, 2017, 07:21:53 pm

Title: [Suggestion] Make more than one hangar size possible
Post by: The Reaver of Darkness 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.
Title: Re: [REQUEST] Make more than one hangar size possible
Post by: Yankes 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.
Title: Re: [REQUEST] Make more than one hangar size possible
Post by: Solarius Scorch 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?
Title: Re: [REQUEST] Make more than one hangar size possible
Post by: The Reaver of Darkness 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?
Title: Re: [REQUEST] Make more than one hangar size possible
Post by: NeoWorm 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!
Title: Re: [REQUEST] Make more than one hangar size possible
Post by: Yankes 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?
Title: Re: [REQUEST] Make more than one hangar size possible
Post by: Solarius Scorch 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.
Title: Re: [REQUEST] Make more than one hangar size possible
Post by: NeoWorm 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.
Title: Re: [REQUEST] Make more than one hangar size possible
Post by: Solarius Scorch 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.
Title: Re: [REQUEST] Make more than one hangar size possible
Post by: NeoWorm 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.
Title: Re: [REQUEST] Make more than one hangar size possible
Post by: Yankes 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
Title: Re: [REQUEST] Make more than one hangar size possible
Post by: NeoWorm 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.
Title: Re: [REQUEST] Make more than one hangar size possible
Post by: Yankes 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 :)
Title: Re: [REQUEST] Make more than one hangar size possible
Post by: The Reaver of Darkness 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.
Title: Re: [REQUEST] Make more than one hangar size possible
Post by: Biggieboy 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?
Title: Re: [REQUEST] Make more than one hangar size possible
Post by: The Reaver of Darkness on March 26, 2018, 05:35:09 am
I create mod for upgrade facilities, so what happen if 2 hangars upgraded to 1 big (2x4 size) And can hold 3 crafts?
You'd need code for having multiple craft in one hangar, and it would be very complicated to add this.
Title: Re: [REQUEST] Make more than one hangar size possible
Post by: Biggieboy on March 26, 2018, 09:32:11 am
You'd need code for having multiple craft in one hangar, and it would be very complicated to add this.
Thank you!

I found here 3x3 hangar, but its not good. Maybe he can create 2x4 hangar with bigger capacities, its good for me :)
Title: Re: [REQUEST] Make more than one hangar size possible
Post by: Meridian on May 10, 2018, 01:03:45 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

Hi Yankes... is this, or anything similar still on your todo list?
Just asking so that I don't do something that you're planning to do...
Title: Re: [REQUEST] Make more than one hangar size possible
Post by: Yankes on May 12, 2018, 08:54:20 pm
Im now working on this, this will be bigger change because I need add logic to auto allocate best fit for crafts (what is not trivial thing).
Probably hardest part is done (finding algorithm) now only implementing it is left.
Title: Re: [REQUEST] Make more than one hangar size possible
Post by: Biggieboy on May 13, 2018, 01:13:54 am
Im now working on this, this will be bigger change because I need add logic to auto allocate best fit for crafts (what is not trivial thing).
Probably hardest part is done (finding algorithm) now only implementing it is left.

I create design for 30x30 Large Hangar, maybe its help for positioning :)

And MAP file created too!

Im not proffesional, i try 2 and 3 crafts version too.
Title: Re: [REQUEST] Make more than one hangar size possible
Post by: Ethereal on May 13, 2018, 08:16:19 am
Excellent!

If possible, make a 2x2 hangar option for 2 ships displayed.
Title: Re: [REQUEST] Make more than one hangar size possible
Post by: Biggieboy on May 13, 2018, 03:58:56 pm
Excellent!

If possible, make a 2x2 hangar option for 2 ships displayed.

What you think about this? Need a litlebit more refinement.

With this MAP (i created this before):
https://openxcom.org/forum/index.php/topic,6272.msg96210.html#msg96210

The middle need some recreation.
Title: Re: [REQUEST] Make more than one hangar size possible
Post by: Ethereal on May 13, 2018, 05:27:46 pm
Perfectly! Just wonderful!

At the start of the game, a hangar for 3-4 places - a lot, and in the middle - is already normal. But to have super hangars at the start -is a will be too fatly. This is perfect for my modification (need to improve hangars, or even almost rebuild base for new hangars) and thank you so much for the work.
Title: Re: [REQUEST] Make more than one hangar size possible
Post by: Biggieboy on May 13, 2018, 06:41:45 pm
Perfectly! Just wonderful!

At the start of the game, a hangar for 3-4 places - a lot, and in the middle - is already normal. But to have super hangars at the start -is a will be too fatly. This is perfect for my modification (need to improve hangars, or even almost rebuild base for new hangars) and thank you so much for the work.

No no, not for the start game :)

Both version research, high price and many resources needed, as my Building Mod Pack.
Title: Re: [REQUEST] Make more than one hangar size possible
Post by: Biggieboy on June 06, 2018, 07:45:15 am
Im now working on this, this will be bigger change because I need add logic to auto allocate best fit for crafts (what is not trivial thing).
Probably hardest part is done (finding algorithm) now only implementing it is left.

Hi! I made other version of the Large Hangar! Can you use this? All pad its same size, and better quality!

Thank you!
Title: Re: [REQUEST] Make more than one hangar size possible
Post by: The Reaver of Darkness on June 07, 2018, 02:31:48 am
If I understand it correctly, what we need is more hangar sizes in which each hangar holds only one craft. So probably two sizes would be ideal:
1.) a 2x2 which includes some things other than just the craft space
2.) a 1x1 hangar
Title: Re: [REQUEST] Make more than one hangar size possible
Post by: Biggieboy on June 07, 2018, 07:20:14 am
If I understand it correctly, what we need is more hangar sizes in which each hangar holds only one craft. So probably two sizes would be ideal:
1.) a 2x2 which includes some things other than just the craft space
2.) a 1x1 hangar

So i think, this is the best:

- 1x1 size

(https://openxcom.org/forum/index.php?action=dlattach;topic=5895.0;attach=37703;image)

1 craft capacity, 1 craft in the middle (in base mode)

- 2x2 size:

1-2 craft capacity

(https://openxcom.org/forum/index.php?action=dlattach;topic=5895.0;attach=37704;image)

- 3x3 size:

1-4 craft capacity

(https://openxcom.org/forum/index.php?action=dlattach;topic=5895.0;attach=37705;image)

Need more than 1 craft capacity, this is the problem, if we change it, in the base mode not show the 2nd or more crafts.

Is that solution if myself can make the craft coordinates in the ruleset?
Title: Re: [REQUEST] Make more than one hangar size possible
Post by: Biggieboy on June 07, 2018, 07:49:05 am
Splendid! Now we need is Satellites (mobile radar systems) for the 1x1 size hangar or Satellite Uplinks or Nexuses!

Way to go, Biggieboy! :)

Sorry, i can make just building how looking, but i cant make how working :)

Satellites need i think "just" a craft with autopilot and infinite fuel.
Title: Re: [REQUEST] Make more than one hangar size possible
Post by: Ethereal on June 08, 2018, 10:46:19 am
Cool! I hope the final package will include both versions of the nine-cell hangar. In view of the fact that they occupy the place of 9 unicellular hangars, it will have to connect additional functions, and there will be enough of them for several versions of the hangars.
Title: Re: [REQUEST] Make more than one hangar size possible
Post by: Biggieboy on October 16, 2018, 08:50:54 am
Im now working on this, this will be bigger change because I need add logic to auto allocate best fit for crafts (what is not trivial thing).
Probably hardest part is done (finding algorithm) now only implementing it is left.

Cool! I hope the final package will include both versions of the nine-cell hangar. In view of the fact that they occupy the place of 9 unicellular hangars, it will have to connect additional functions, and there will be enough of them for several versions of the hangars.

Have some news?
Title: Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
Post by: Yankes on October 17, 2018, 12:17:16 am
Right now is stashed but still in I have plans to do it. Right now priority get rendering improvements on big maps.
Title: Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
Post by: Biggieboy on October 17, 2018, 12:18:29 am
Thank you!
Title: Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
Post by: efrenespartano on October 17, 2018, 01:20:12 am
Right now is stashed but still in I have plans to do it. Right now priority get rendering improvements on big maps.

Great! Thanks, Yankes!

Title: Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
Post by: Alex_D on February 06, 2019, 05:02:31 am
Any luck with progress on this front?

I posted in another thread (https://openxcom.org/forum/index.php/topic,5893.msg109734.html#msg109734) asking the same question, like others before me.
Title: Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
Post by: Yankes on February 06, 2019, 10:39:19 pm
It sill wait for more free time when I can test it and fix all possible bugs and multiple corner cases.

Right now I slowly working on adding script for execution odds of enemy missions.
Title: Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
Post by: Nord on February 12, 2019, 06:42:37 pm
I think i missed something, but why not make like with prisons ("prisontype")?
Title: Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
Post by: Alex_D on February 13, 2019, 03:01:19 am
I think i missed something, but why not make like with prisons ("prisontype")?

I'm not familiar with prison type, but does that allows for a type of prisoner to be at potentially different types?
Like for crafts: One large hangar can fit several smaller crafts or one larger one.

In any case, another approach could be that the craft count is like the base storage number (with fractions). Example:
Craft size:
Tiny = 0.05 size
Small = 0.25 size
Normal = 1 size
Large = 2 size
Huge = 4 size.

Storage provided:
1x1 hangar = 0.25
2x2 hangar = 1
3x3 hangar = 4

The only drawback is an additional check would need to be performed to ensure that a base containing 4 - 1x1 hangars suddenly cannot fit a Normal craft size.
Title: Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
Post by: Solarius Scorch on February 13, 2019, 10:09:41 am
Storing multiple craft in one hangar is already possible. But only one is displayed in the base view.
Title: Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
Post by: Alex_D on February 15, 2019, 11:57:54 pm
Storing multiple craft in one hangar is already possible. But only one is displayed in the base view.
Indeed.
However, one may want to add "realism" by determining craft sizes. This is to avoid large crafts taking slots of what would me smaller crafts. Example: If the code says 4 crafts fit on a 2x2 hangar, then 4 Conquerors (from Piratez) can fit as well as 4 Aircars.
Title: Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
Post by: krautbernd on February 24, 2019, 08:10:46 pm
It'd be great if this could get bumped up the priority list  :)
Title: Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
Post by: wcho035 on October 15, 2019, 12:37:56 pm
Best way to get this out one day,

1) Use only 2 size hanger, 1x1 and 2x2.

You can use multiple 1x1 to build a 2x2 with 4 craft and more. 2x2 are reserved for craft extra large.

2) Use a graphic editor to resize your craft sprite to fit the hanger type

3) Craft can only use the services that hanger type provides.
Title: Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
Post by: krautbernd on October 15, 2019, 02:37:02 pm
2) Use a graphic editor to resize your craft sprite to fit the hanger type
The problems isn't the size of the craft image, it's actually implementing different hangar types and sorting craft into hangars.

3) Craft can only use the services that hanger type provides.
That would probably break vanilla compatibility. As I understand it Yankes doesn't want to go the one craft = one hangar type route, but allow multiple hangar types per craft.
Title: Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
Post by: wcho035 on October 15, 2019, 04:06:47 pm
"The problems isn't the size of the craft image, it's actually implementing different hangar types and sorting craft into hangars."

If this is using my ideas for hangers. 2 hanger type. 1x1 for small and 2x2 for large craft.

Small craft uses services from small and large hangers.

Large craft uses services only from large hangers. Can't use services from small hangers.

Why would this need sorting crafts into hangers?

Similar to the code "requiresBaseFunc" and "provideBaseFunc"

Say the craft is a small flying sub hybrid. Can use 1x1 hanger and subhanger, 2x2 hanger and subhanger.

1x1 hanger provide XYZ service, 2x2 hanger provide ZXS services.
1x1 subhanger provide TXA and 2x2 subhanger provide XAX

Smallsub require XYZ, ZXS, TXA and XAX

Largesub can only use XAX

"That would probably break vanilla compatibility. As I understand it Yankes doesn't want to go the one craft = one hangar type route, but allow multiple hangar types per craft."

My system above answers the problem.


Title: Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
Post by: Meridian on October 15, 2019, 04:08:35 pm
Please either don't include previous post at all, or put it into proper quote tags.

This is unreadable.
Title: Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
Post by: krautbernd on October 15, 2019, 10:01:40 pm
My system above answers the problem.
Now if only you get someone to code it we're golden. It's hardly the first time this has ever been suggested. I've also told Yankes that he should simply go the exclusive route, but that's not what he has decided on. IMO not having exclusive sizes is better in the end since it offers more options down the road, like being able to house multiple small craft in one large hangar, making craft transfers easier etc.
Title: Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
Post by: wcho035 on October 15, 2019, 11:12:28 pm
You can code it..  I have faith in you.
Title: Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
Post by: wcho035 on October 15, 2019, 11:20:45 pm
Please either don't include previous post at all, or put it into proper quote tags.

This is unreadable.


Will try Meridian, thank you.
Title: Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
Post by: krautbernd on October 15, 2019, 11:22:36 pm
You can code it..  I have faith in you.
Oh stop spoiling me  ;D
Title: Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
Post by: wcho035 on December 20, 2019, 03:41:40 am
Today I have a discussion with SupSuper on this topic for a design solution that allow of this feature to be possible. Here is a break down. I want to thank Supsuper for his time, generosity and kindness for this consultation. Please note this is an edited version.

Precentor AppollyonToday at 10:39 AM

Hi Supsuper, I would like to run through with you on a few questions only a developer like yourself can answer.
I understand you and warboy coded the hanger feature a long time ago for the vanilla UFO enemy unknown.
This has nothing to do with OXCE, I just want to understand OXC and by extension to OXCE, if you are to code a hanger having 1x1 and 2x2 with permission given to which specific craft can dock or use it. If the craft sprite can be edited to fit the hanger, would permission flag alone be enough to make it work?

SupSuperToday at 10:45 AM
i'm not sure what you're asking. hangars can't restrict crafts in OXC. or are you asking if such a feature would be possible?

Precentor AppollyonToday at 10:45 AM
Yes, would be possible
I mean currently, in the vanilla build, hanger can fit only 2x2 craft
If I am to have 1x1 hanger.
Currently, the problem is that craft can't fit properly in a 1x1 hanger. However, fitting a craft in a hanger is a sprite issue isn't it?
You can use a graphic editor to make the sprite to fit in a 1x1 hanger.

SupSuperToday at 10:47 AM
yes, it's just a visual bug. hangars and crafts can theoretically be any size

Precentor AppollyonToday at 10:47 AM
So could permission flag alone would make this possible.
Say a craft is given permission to dock at Hanger X and can't dock with Hanger Y
Such a feature can be coded without worrying about space allocation problem, yes?

SupSuperToday at 10:49 AM
yes, it should be possible

Precentor AppollyonToday at 10:50 AM
I though so. How complicated and hour intensive will be by your estimate? Your input will be very much appreciated.

SupSuperToday at 11:05 AM
hard for me to estimate since i already know the codebase,  but i'd say a few hours, depends if it's just a visual flag or if it actually affects purchase/manufacture

Precentor AppollyonToday at 11:05 AM
Probably won't affect Purchase or manufacture, there's already such a feature in place in OXCE. Again, thanks for the info, very much appreciated.

SupSuperToday at 11:06 AM
if it's just "don't draw this craft on this hangar" then it should be simple

Precentor AppollyonToday at 11:07 AM
Sorry, please elaborate more by what you mean "don't draw this craft on this hangar

SupSuperToday at 11:09 AM
i mean you restrict what craft sprites can be drawn on top of (dock) the hangar

Precentor AppollyonToday at 11:09 AM
Okay, thanks!
But how would that be a problem though? A graphic editor can edit the craft sprite and make it fit. It is just craft sprite to make it fit, yes?

SupSuperToday at 11:12 AM
yes, it's not a problem
Precentor AppollyonToday at 11:13 AM
Thanks
I want to sincerely tell you how much I do appreciate, of you helping me with my question.
Title: Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
Post by: Meridian on December 20, 2019, 10:38:34 am
As usual, your questions are super-cryptic.

As far as I can say SupSuper is answering a completely different question than what you (tried to) ask.
Title: Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
Post by: Stoddard on December 21, 2019, 10:31:54 am
Like I wrote to PA earlier,

If we want multiple hangar sizes, multiple craft per hangar, multiple craft types and hangars accepting craft based on their type, then the problem of stuffing craft into hangars is NP-complete.

If we want this, code must optimally pack craft into hangars, so that we don't end up with base not having a spot for a craft depending on a phase of the moon, and do it consistently so that we have some idea on how to draw the stuff.

It is hard. Yankes' git stash from the yesteryear is definitely not there. Given the base sizes, this can be brute-forced, but I don't see how right now.

And I definitely do not think that a partial solution is worth implementing.
Title: Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
Post by: Yankes on December 21, 2019, 01:04:53 pm
yup, this have some tricky aspects that need some figuring out to make it correctly.
One way I think this could be done is limit crafts and hangars to max 64. This have two very good properties, we give limit to exponential grown and we could use one 64bit operation check 64 cases at once (this could be optimized further by SSE).
Title: Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
Post by: Dogbarian on January 25, 2021, 05:35:35 pm
Any movement ever occur on this (preferably something that works with OXC)?

I'd love to just resize the sprites and have the 2x2 hangar support 2 craft, nothing more.   Will OXC support that?
Title: Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
Post by: Meridian on January 25, 2021, 06:51:45 pm
Any movement ever occur on this (preferably something that works with OXC)?

I'd love to just resize the sprites and have the 2x2 hangar support 2 craft, nothing more.   Will OXC support that?

Yes, this already works in OXC for many years.

The hangars can already accommodate any number of craft... 1, 2 or even a 100.

It is also possible to "resize the sprites", if you mean making a smaller hangar... 1x1 hangars are indeed supported.
Title: Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
Post by: Dogbarian on January 25, 2021, 11:09:07 pm
Ah, excellent, thank you!  The way I was reading this, it wasn't clear it actually worked.

Yeah, by resizing the sprites, I meant of the aircraft to try to display 2 of them in a standard 2x2 hangar (and there was a 2 pad hangar artwork that someone already showed off).  Sorry, should have been more clear.   And that part may not actually work, but that's less important, to me at least.

Appreciate the quick response!
Title: Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
Post by: The Reaver of Darkness on January 29, 2021, 09:10:28 am
My solution proposed is for each hangar to allow any number of craft types, but each craft to only be allowed into a single hangar type. As we currently only have one hangar type anyway, there would be nothing lost in implementing it this way.

An example way to implement it would be to have each hangar and each craft be assigned a hangar type. Craft can only be added to the base if their hangar type matches an available (unused) hangar type in the base.
The base would have all of its hangar types listed internally in a lookup table, for example: 0, 0, 1, 1, 1, 2
Landed craft have a lookup table for used hangar slots, example: 0, 0, 1, 2
In this situation, only a craft of type 1 can be added (two of them can be). There will be a single craft assigned to the base of type 2, one of type 1, and two craft of type 0. If the type 2 craft is sold, then the lookup table is changed to: 0, 0, 1
Title: Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
Post by: krautbernd on March 06, 2021, 01:46:03 pm
Dredging this up again, as I would still be interested in seeing this implemented, if only supporting one hangar "size/"type" per craft.
Title: Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
Post by: Meridian on March 06, 2021, 02:12:39 pm
Yes, I can confirm still is still planned.
Title: Re: [WIP] [Suggestion] [Feedback] Make more than one hangar size possible
Post by: Finnik on March 06, 2021, 04:51:13 pm
I was hoping it would be part of 7.0, TBH =)