aliens

Author Topic: [Suggestion] Rotating Craft Maintenance  (Read 1158 times)

Offline Delian

  • Colonel
  • ****
  • Posts: 249
    • View Profile
[Suggestion] Rotating Craft Maintenance
« on: February 24, 2023, 01:22:26 am »
If you have the "Force craft launch" game option enabled, you're able to use the craft even if it's not yet ready. That is nice and all, but there's a few issues.

1. If the craft is damaged and out of fuel, then the craft is unusable until the repairs finish, which can take a long time.
2. If the craft is damaged and out of ammo, then the craft is useless (as an interceptor) until the repairs finish, which can take a long time.

The first problem could be solved if the order of maintenance was changed so that refuelling is done before the repairs finish.
The second problem could be solved if the order of maintenance was changed so that at least some ammo is loaded before the repairs finish.

So what I'd like to suggest is to change how the crafts are maintained when the "Force craft launch" option is enabled:
Instead of doing all the repairs first, all three parts of the maintenance should be done at the same time in a rotating fashion:
- Spend 1 hour repairing
- Spend 1 hour refuelling
- Spend 1 hour rearming
- Spend 1 hour repairing
- Spend 1 hour refuelling
- Spend 1 hour rearming
- etc...

This can easily be achieved, for instance, by preferring one action over another based on the result of "current hour of the day" modulus 3

Offline psavola

  • Commander
  • *****
  • Posts: 630
    • View Profile
Re: [Suggestion] Rotating Craft Maintenance
« Reply #1 on: February 24, 2023, 05:49:57 am »
FWIW, at least earlier Meridian seemed to dislike any changes that would affect the order or repair/rearm/refuel of crafts:

https://openxcom.org/forum/index.php/topic,10911.msg151014.html#msg151014
Quote
BTW. is there a way in OXCE to change the order by which the craft a) repairs, b) rearms and c) refuels. If you have force craft launch possibility (most players do), I would usually like to refuel first (and in some cases rearm first), repair last.

No, and I'm not planning on adding it.

There is a PR for it for OXC: https://github.com/OpenXcom/OpenXcom/pull/1396
So you can build your own version with this option if you wish.

I don't know if SupSuper is planning on merging this PR, but even if it is accepted into OXC, it won't be accepted into OXCE.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8626
    • View Profile
Re: [Suggestion] Rotating Craft Maintenance
« Reply #2 on: February 24, 2023, 08:40:30 am »
That is nice and all, but there's a few issues.

1. If the craft is damaged and out of fuel, then the craft is unusable until the repairs finish, which can take a long time.
2. If the craft is damaged and out of ammo, then the craft is useless (as an interceptor) until the repairs finish, which can take a long time.

In my opinion, these are not issues, but desired and well designed fundamental geoscape features.

If the player/modder would be practically able to work around all of the limitations, then I could also just remove all of this. Features that can be ignored and have little to no impact on gameplay, are just fluff. And I'm not interested in fluff.

If you want additional "lore/fluff/canon" justification, think of it as craft damage being split into two components: damage that prevents a craft takeoff and damage that doesn't prevent craft takeoff. Xcom only shows you the first component, the critical damage. All non-critical damage is not shown to you, and the good engineers at the base continue repairing the craft whenever they can, without bothering the commander.

What I am willing to make configurable, if the modders (not players) are interested, is how long it takes to fully repair a craft. Currently the formula is simple, and depends only on one parameter, the repair rate per hour. I can imagine adding more parameters, like for example number of engineers at the base, or a presence of advanced hangar, or something like that. Of course, there would still be some hardcoded minimum possible duration, so that it is not possible to turn this feature off completely. (And yes, it is possible to turn it off completely today, by setting some crazy repair rate, but as far as I know, no modder has ever done that, so I don't have any reason to interfere. Also it enforces my belief that non-negligible and non-avoidable craft repair times are a desired feature.)

All that said, I'll repeat that this is just my opinion, feel free to disagree with me.

Offline Finnik

  • Colonel
  • ****
  • Posts: 492
  • Finnik#0257
    • View Profile
Re: [Suggestion] Rotating Craft Maintenance
« Reply #3 on: February 24, 2023, 11:08:28 am »
Or like consuming items to repair every % of the craft? Like, say, repairing Firestorm costs you alloys =)

Offline Delian

  • Colonel
  • ****
  • Posts: 249
    • View Profile
Re: [Suggestion] Rotating Craft Maintenance
« Reply #4 on: February 24, 2023, 04:06:29 pm »
damage that prevents a craft takeoff and damage that doesn't prevent craft takeoff.

Remember, you can launch a craft that has only 1% health left, if it has >0% fuel in it. Therefore "damage that prevents a craft takeoff" cannot logically exist.
Maybe if you'd argue that there exists "damage that prevents a craft from being refuelled", but that also doesn't make sense because, logically, a craft's fuel system works just fine since the craft can take off, fly, and land without issues. Any holes in the fuel tank would only make refuelling easier hehe.

In my opinion, these are not issues, but desired and well designed fundamental geoscape features.

I'd argue that because in xcomapoc these fundamental geoscape features have been changed (so that refuelling rearming and repairing all happen at the same time), it indicates that the original behavior of these features in ufo/tftd was undesirable.
Also, no one is arguing that repairing should be removed altogether. What we can say is that, considering mods do often use the repairRate craft rule, it, again, indicates that unmodded maintenance behavior is undesirable.

Anyway, I agree that if this feature was sufficiently moddable, then a workaround could be produced. What would be a good way to mod this?
You could make a geoscape yankes-script function that gets executed every 30min on every craft, which would contain the repairing/rearming/refuelling logic. Modders could then change this logic and include their own code to modify the craft's repair/refuel/rearm state. I do like Finnik's idea of consuming custom items for repairs, perhaps even custom repair speed depending on the item used, tho that might be a bit hard to realize in a yankes-script function.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8626
    • View Profile
Re: [Suggestion] Rotating Craft Maintenance
« Reply #5 on: February 24, 2023, 04:48:44 pm »
Remember, you can launch a craft that has only 1% health left, if it has >0% fuel in it. Therefore "damage that prevents a craft takeoff" cannot logically exist.
Maybe if you'd argue that there exists "damage that prevents a craft from being refuelled", but that also doesn't make sense because, logically, a craft's fuel system works just fine since the craft can take off, fly, and land without issues. Any holes in the fuel tank would only make refuelling easier hehe.

Correct.
Thanks for letting me know that the feature is even worse than I remembered.

I correct my statement then:

I tolerate this feature, because it's in OXC and because it's not being abused too much (usually you can do zero, one, maybe two more flights before you are forced to wait because of no/low fuel or no/low ammo).
But push it more, and I will happily remove it from OXCE, return to vanilla and close all these logical holes for good.

I'd argue that because in xcomapoc these fundamental geoscape features have been changed (so that refuelling rearming and repairing all happen at the same time), it indicates that the original behavior of these features in ufo/tftd was undesirable.

XcomApoc changed a million other things as well.
Does that mean Xcom1 is complete crap?

In my opinion, it's the opposite... XcomApoc is far inferior to Xcom1.