Author Topic: [Suggestion] Craft size and Hangar capacity  (Read 4136 times)

Offline Pendra37

  • Sergeant
  • **
  • Posts: 18
    • View Profile
Re: [Suggestion] Craft size and Hangar capacity
« Reply #15 on: June 02, 2024, 02:51:41 pm »
Yes, both can be implemented.

I just said I will do type first and then reevaluate.

That is good enough for me, thanks! If you want a hand, I can chime in. The code doesn't look too complicated compared to FPS or Unreal games.

Offline Delian

  • Commander
  • *****
  • Posts: 527
    • View Profile
Re: [Suggestion] Craft size and Hangar capacity
« Reply #16 on: June 02, 2024, 05:15:25 pm »
My opinion is that, the original proposed idea is not good in that it's both too complicated and not customizable enough. And it wouldn't work well with drawing crafts in basescape so it wouldn't look good.

Hmm. Let's look at how similar problem was solved with other base facilities.
Alien Containments have type.
Laboratories have type through services.
Workshops have type through services.

The main problem with Hangars is that they're non-fungible, so a solution with services wouldn't work. But other than that, Alien Containments already use type and it works well.
Other facility types can be larger than 1x1, so technically they're already a size+type solution. But I'm not sure if Hangars can be 1x1 or 3x3. If they can be, then only type has to be added (plus allowedHangarTypes on crafts), and that should be enough to cover most uses.

Offline Pendra37

  • Sergeant
  • **
  • Posts: 18
    • View Profile
Re: [Suggestion] Craft size and Hangar capacity
« Reply #17 on: June 02, 2024, 06:11:52 pm »
The base issue is: I have 2x2 Hangar with Craft = 1.
I have a tiny car. Since the hangar is craft = 1, I can fit either a car, or an Osprey chopper or a massive space dreadnought because all of them are exactly 1 craft.
How can I make the game realize that a car is smaller than 747 jumbo jet, therefore I should be able to put more than 1 car sized craft into a 747 sized hangar.
You say car is type 1, 747 is type 2. Make the 747 hangar accept only type 2. Ok, but that raises the question, why on earth cars are not allowed into a 747 hangar? What is the logic behind that real life or game? You say, ok type 1 cars are allowed into the 747 hangar. Nice, problem solved. Except, I can still park a single car into that massive hangar.

Type works one way, big thigs dont fit into small facilities but it say nothing about small things taking the exact same size as big things if allowed into big facilities.

General stores vs Containment are the example how Type AND Size work together. Everything in game have Type AND Size. Even manufacture. Except crafts. They have neithet Type nor Size. They are single crafts. Adding type is one part of the concept adding size is the other.
« Last Edit: June 02, 2024, 06:19:11 pm by Pendra37 »

Offline Juku121

  • Commander
  • *****
  • Posts: 1799
  • We're all mad here.
    • View Profile
Re: [Suggestion] Craft size and Hangar capacity
« Reply #18 on: June 02, 2024, 07:09:09 pm »
Except, I can still park a single car into that massive hangar.
A hangar is not just a space to fit vehicles, it's the in-game representation of the logistics network required to maintain that craft and its interception/transport missions. It very much makes sense that you cannot park your global car rental agreement in the sub pen.

General stores vs Containment are the example how Type AND Size work together.
Except they don't. No matter if the alien is a tiny brainsucker or a giant sloth creature, they all take the exact same amount of containment 'space'. This is an example of type and size working in parallel, not together.

Everything in game have Type AND Size. Even manufacture. Except crafts. They have neithet Type nor Size. They are single crafts. Adding type is one part of the concept adding size is the other.
But nothing actually uses type and size together. Scientists are a number, there are no special scientist types. Or engineer types. Or item storage types. Or alien containments with sizes that can house multiple types of captives.  Etc.
« Last Edit: June 02, 2024, 07:11:25 pm by Juku121 »

Offline Ethereal

  • Commander
  • *****
  • Posts: 684
    • View Profile
Re: [Suggestion] Craft size and Hangar capacity
« Reply #19 on: June 02, 2024, 08:21:59 pm »
There is no need to equate the game with reality. The game must have gaming conventions, for which we love them. Excessive realism only harms the gameplay. In such matters, you need to approach the matter from the point of view of playful expediency.

And the expediency is such that we have ships that should emphasize their importance with increased sizes.

Actually, to enter a new parameter (size) it takes about 10 seconds per couple of lines of code. Just don’t come up with stupid calculation formulas and other unnecessary complications. But introducing types for ships will not be very easy. It will be even more difficult to force different hangars to display only the types of ships allowed specifically for them.

Offline Pendra37

  • Sergeant
  • **
  • Posts: 18
    • View Profile
Re: [Suggestion] Craft size and Hangar capacity
« Reply #20 on: June 02, 2024, 08:53:50 pm »
A hangar is not just a space to fit vehicles, it's the in-game representation of the logistics network required to maintain that craft and its interception/transport missions. It very much makes sense that you cannot park your global car rental agreement in the sub pen.
Pave over? Put a metal sheet on the pen? Or how about making it fly? Or maybe put it onto the sea using cranes? So many options.


Except they don't. No matter if the alien is a tiny brainsucker or a giant sloth creature, they all take the exact same amount of containment 'space'. This is an example of type and size working in parallel, not together.

It is usually not the same because containment has either infinite space or some very high number, like 50. Hangars have neither of those stats. But I agree that if a single 2x2 hangar could hold 50 crafts, then this would be a non issue.
 
 
But nothing actually uses type and size together.
How about, I don't know, dead aliens? They have a Type ("CORPSES") AND a Size (0.4). Imagine if the stores worked like you said, no type and size. Muton corpse 1 space, pistol mag 1 space, Eleriumm crystal 1 space. Have fun fitting all the equipment and material into a single base...

Offline Ethereal

  • Commander
  • *****
  • Posts: 684
    • View Profile
Re: [Suggestion] Craft size and Hangar capacity
« Reply #21 on: June 02, 2024, 09:08:34 pm »
It is usually not the same because containment has either infinite space or some very high number, like 50. Hangars have neither of those stats. But I agree that if a single 2x2 hangar could hold 50 crafts, then this would be a non issue.

The capacity of the hangars is adjustable and, if desired, can be done like this:

Code: [Select]
facilities:
 - type: STR_HANGAR
    crafts: 999

Offline Pendra37

  • Sergeant
  • **
  • Posts: 18
    • View Profile
Re: [Suggestion] Craft size and Hangar capacity
« Reply #22 on: June 02, 2024, 09:12:18 pm »
...

XCom is a more or less realistic tactical game. Realistic planet, environment, weapons and situations. As realistic as the capabilities of the contemporary computers and style of game allow. Heck, if you replace the aliens with terrorists, you can call it Rainbow Six tactical.
The realism in the game even hurt the gameplay experience. Like soldier inventory management, buying mags and reloading the weapons manually, come on. XCOM'12 streamlined all the excess "realism" away.

Anyhow Type isn't all that hard to implement. If you want to buy a Craft Type 2, the can can interate through the facilities and check:
Can fit craft? Yes/No
Can fit Type 2? Yes/No
Does have enough free capacity? Yes/No

The game doesn't really care which craft is stored in which facility. Just like it doesn't care in which General Store you hold what item. You have free space for the craft at the time of purchase, you are good.

I know the Craft nr can be modified and I did that. I could fit 8 cars and that was cool. I could also fit 8 space dreadnoughts, which was a bit weird. That was the point I realized, a Craft size would be a good addition.
   
« Last Edit: June 02, 2024, 09:16:05 pm by Pendra37 »

Offline Juku121

  • Commander
  • *****
  • Posts: 1799
  • We're all mad here.
    • View Profile
Re: [Suggestion] Craft size and Hangar capacity
« Reply #23 on: June 02, 2024, 09:51:16 pm »
I hardly think being unable to park cars in sub pens is 'excessive realism'. If you're so unconcerned about 'realism', just make your hangars 1x1 and with 'crafts: 10 000 000', boom, your original space problem is solved.

Goes for Pendra's universal paved-over sub-pens/crane harbours, too.


As to the rest, I'm trying to be not too confrontational these days, and I don't think the arguments here are conducive to that. So I'll just skip further conversation. Meridian will likely do as he said, anyway.


For the record, OXC has fixed the containment bug, and nowadays containment space is quite limited. 10 aliens total, not even different types, is the vanilla limit. Ethereal already told you about hangar capacity.

At least two people have already implemented hangar changes, one with sizes and one with types. The latter is available in BOXCE. Neither is nowhere near as simple as you two try to portray it, and Meridian has more potential problems to solve than either of the two, due to OXCE being the modding standard these days.

Offline WarStalkeR

  • Captain
  • ***
  • Posts: 56
  • Repensum Est Canicula
    • View Profile
Re: [Suggestion] Craft size and Hangar capacity
« Reply #24 on: June 07, 2024, 09:46:25 am »
At least two people have already implemented hangar changes, one with sizes and one with types. The latter is available in BOXCE. Neither is nowhere near as simple as you two try to portray it, and Meridian has more potential problems to solve than either of the two, due to OXCE being the modding standard these days.
Yeah, I had to go along with sizes (which also can be granulated into classes/types, if you want), because otherwise there is no way to sort and allocate them algorithmically in a proper manner.

Offline zee_ra

  • Colonel
  • ****
  • Posts: 213
    • View Profile
Re: [Suggestion] Craft size and Hangar capacity
« Reply #25 on: August 18, 2024, 12:43:00 am »
Yeah, I had to go along with sizes (which also can be granulated into classes/types, if you want), because otherwise there is no way to sort and allocate them algorithmically in a proper manner.

We can go either with sizes or exclusive categories, and we could have one type of multi-vehicle hangar per base.  Check out my comments here https://openxcom.org/forum/index.php?topic=10870.msg165711#msg165711.

Offline zee_ra

  • Colonel
  • ****
  • Posts: 213
    • View Profile
Re: [Suggestion] Craft size and Hangar capacity
« Reply #26 on: August 18, 2024, 12:58:21 am »
Yes, both can be implemented.

I just said I will do type first and then reevaluate.

We actually could have both more-or-less.  We really don't need size, but rather an ordering (an ordered sequence) of size-types.  That is, sizes are just points, they are not additive.

For some units, we need to have them confined to their type (e.g. vehicles need a garage, period).  That could be done with a flag that would prevent these vehicles for being considered for higher size types.

For some units we may want to consider placement to into larger sized containers.  A specific example would be placing two fighters into a spacedock (or it could be a transport ship dock).  That could be done by setting the flag to confine to size to false.

With submarines and other entirely disjoint types, the key aspect is that these types are truly disjoint.  Thus, it would suffice to introduce an additional parameter to designate the category.  The land crafts could have 0 (which would include cars, confined to their garages, fighters that could inhabit larger hangars based on their type-size ordering, larger vessels and space-crafts residing in top-tier type-size).  The submarine crafts could have 1.  The difference here is:

  • Categories are always disjoint.
  • Type-sizes need not be disjoint.  Some vehicles (like e.g. cars) could be confined to their type-size.  (Note that this system doesn't forbid for e.g. Jeep to be confined to garage, while mudranger be eligible to both hangar and garage, if desired.)

I think this approach is very natural and covers almost all use cases that are encountered in practice.

Check out discussion at https://openxcom.org/forum/index.php?topic=10870.msg165711#msg165711 as well.

My aim with designing these rules has been to avoid the pitfalls associated with the unrestricted assignment of subsets or intervals to hangars or vehicles.  One of the relevant counterexamples is noted by the WarStalkeR at the https://openxcom.org/forum/index.php?topic=10870.msg162989#msg162989.  He spoke of pitfalls with assigning arbitrary subsets to hangars, but the same kind of problems and counter-examples arise when we assign arbitrary subsets to vehicles.  In fact, the problem remains if we assign not just arbitrary subsets, but only arbitrary intervals to vehicles.

The only place where we may assign arbitrary subset (and it is highly desirable for this to be a subset rather than a wildcard, including all possible values) in the specifications is only when we have one hangar type with such assignment present at a base (e.g. two space-ports on a base that could take fighters and larger transports is feasible, and also at the same time another base could have a repair dock that may hold more craft types, but may either cost more or require a special workshop, etc.).  What is important is that the types of multiple housing should not be mixed.

The dilemma is that there needs to be one base with hangar admitting multiple types (workshop base making fighters and heavy transports).  It is not necessary to use the system of unrestricted sizes in order to have this, since both within the system of exclusive categories, sizes, and a system of sizes with per-vehicle optional category restrictions, it is still possible to have one type of hangars with explicit multi-vehicle configuration (that could admit an arbitrary subset of vehicle types).

« Last Edit: August 18, 2024, 01:10:20 am by zee_ra »