Skip to content

Oxygen Generator Improvements#15497

Open
Jade-Harleyy wants to merge 9 commits intoFakeFishGames:masterfrom
Jade-Harleyy:oxygen-changes
Open

Oxygen Generator Improvements#15497
Jade-Harleyy wants to merge 9 commits intoFakeFishGames:masterfrom
Jade-Harleyy:oxygen-changes

Conversation

@Jade-Harleyy
Copy link

@Jade-Harleyy Jade-Harleyy commented Jan 8, 2025

This PR makes changes to oxygen generators that I believe will enhance the interactions available with them.

The first change adds the ability for players to find and change the oxygen generation rate either manually, or through wiring.

The second change adds a UI to oxygen generators that allows players to:

  1. See if it is powered.
  2. Manually change the oxygen generation rate.
  3. See if the generation rate is being controlled through wiring.

The third change adds a new upgrade for oxygen generators that increases the oxygen generation rate.
This upgrade has a base cost of 2000 mk and 5 oxygenite shards, with tier restrictions of:

  • Tier 1: Unavailable
  • Tier 2: Level 1
  • Tier 3: Level 2

Each level of this upgrade increases oxygen generation by 20%.

The intended effect of these changes is to add more depth to the mechanics of oxygen generators, with the end goal of getting players to engage with them beyond it just being a repairable device that fills oxygen tanks.

For example, traitors can set the generation amount to a lower value to silently starve the crew of oxygen.
Another example is players can create more complex "duty cycle" circuts to save fuel by dynamically changing the generation amount through wiring, therefore reducing the power consumption.

@itchyOwl itchyOwl self-requested a review January 8, 2025 08:05
Copy link
Collaborator

@JeroonBosch JeroonBosch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing text for oxygengenerator upgrade?

Copy link
Collaborator

@itchyOwl itchyOwl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks pretty good, spotted only some minor code quality issues. Also would have to change the content definitions a bit, if we'd include the changes in the vanilla game.

Only skimmed through the xml changes, didn't go the UI code very thoroughly, as it's easier to spot the issues by testing, which I didn't do.

No objections on these changes overall.

@@ -0,0 +1,5 @@
<Text language="English">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we intend to change the vanilla content, these lines should be defined in EnglishVanillaNew.xml, which is where we take the new lines to be translated. When the translations are done, we'll move the new lines in EnglishVanilla.xml and the other language files. For a mod, I think these would be fine.

@@ -0,0 +1,5 @@
<ContentPackage name="oxygen-changes" modversion="1.0.0" gameversion="1.0.8.0">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When doing changes in the vanilla content, Vanilla.xml should be used instead. This would be fine for mods.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there, I'm not sure where I should place these files after addressing this, or how I should handle differences between changes/additions and mixed types.
Please let me know!

@JeroonBosch
Copy link
Collaborator

For example, traitors can set the generation amount to a lower value to silently starve the crew of oxygen.

Without opening the UI of the oxygen generator, would this be visible in any way? At least, to me it would make sense if vents stopped turning when oxygen generation is at 0 (and slowing down at lower values, ideally), but also the generator itself no longer moving and/or showing a red light or orange light based on the percentage of oxygen generation.

 - Serialize CurrFlow.
 - Only animate while producing oxygen.
@Jade-Harleyy
Copy link
Author

Without opening the UI of the oxygen generator, would this be visible in any way? At least, to me it would make sense if vents stopped turning when oxygen generation is at 0 (and slowing down at lower values, ideally), but also the generator itself no longer moving and/or showing a red light or orange light based on the percentage of oxygen generation.

Vents already stop turning when no oxygen is being produced, and both the vents and the generator make no sound when not producing anything.
I've also went ahead and stopped the generators from animating, though.

@Jade-Harleyy Jade-Harleyy requested a review from itchyOwl January 9, 2025 19:37
 - Remove decrease in power consumption; the improved generation lets players decrease the generation for less consumption anyway.
 - Decrease additional generation by 5%, for the same reason.
Turns out this applies to the original value (x - (40% + 40%)) instead of sequentially (x - 20% - 20%), leading to the new value being wrong.
This reverts commit 1708511.
Copy link
Collaborator

@itchyOwl itchyOwl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me from the technical perspective. Would have to decide what to do with this. As commented earlier, some changes are still required in the content definitions, if we'd include this in the vanilla game. But we can take care of that. For testing purposes, it's fine to have this implemented as a mod for now. GJ!

@Regalis11
Copy link
Collaborator

Regalis11 commented Jan 10, 2025

One concern I have about this is whether it's clear enough what's happening if someone for example turns the oxygen generation rate to 10%. How would a player know it's possible to adjust it, where is it communicated? How can a player tell the oxygen generation has been adjusted down, would it seem like a bug if they start suffocating for seemingly no reason?

I think one thing that would alleviate the problem a bit is if the oxygen generation rate was visible on the generator and the vents somehow. Maybe the animation speed (and the volume of the sounds too?) could be relative to the oxygen generation rate?

@Regalis11 Regalis11 added Code Programming task Design Design-related task Waiting Cannot be worked on/reviewed/tested at the moment for some reason labels Jan 21, 2025
@mygamingaccount
Copy link

mygamingaccount commented Mar 22, 2025

How is the sub supposed to handle grid overloads upon thrust reduction if the O2 genny is not there to suck up the extra power? Or is overvoltage not a thing any more in upcoming versions? (I'm cool with that by the way)

This change is very similar to a circuit that I've designed for a campaign which involved having to manage fuel, but on that same sub I had to entirely delete any overvoltage action just to make that kind of gameplay possible.

@ubertpendragon
Copy link

ubertpendragon commented Apr 6, 2025

I think one thing that would alleviate the problem a bit is if the oxygen generation rate was visible on the generator and the vents somehow. Maybe the animation speed (and the volume of the sounds too?) could be relative to the oxygen generation rate?

I think that defeats the purpose of "silently" sabotaging the oxygen as Jade suggested

The use cases for O2 generator changes are:
-Starving fires (you previously had to disconnect the O2 power wire)
-Discreet Sabotage (instead of completely shutting off O2)
-Saving power

The third change adds a new upgrade for oxygen generators that increases the oxygen generation rate.

This just reads as "reduce O2 power cost", subs don't really need more O2 generation since they're made with giving enough O2 to all rooms to begin with (it's not FTL where you can overpower a breach leaking oxygen with upgraded O2, and even there it was a luxury upgrade).
I believe O2 upgrades were removed in the first place because they were largely useless.

You could make oxygen generation matter a little more if flooding a hull also drained its oxygen, or making plants consume oxygen.

Another problem I can think of with Saving Power is that you can survive on O2 shelves filling bottles. O2 shelves don't need the O2 generator to function since they're not LINKED but rather powered (sub builders wish they had been from the very start)

@Regalis11
Copy link
Collaborator

I think that defeats the purpose of "silently" sabotaging the oxygen as Jade suggested

Possibly to some extent, but I think it's still important for there to be some kind of a cue that someone has sabotaged the oxygen. Maybe not something immediately obvious, but I feel like if we just add this sort of a "hidden feature" without communicating it anywhere in any way, it will just seem like a bug when the sub stops running out of oxygen for seemingly no reason or any clear way to fix it.

@JoneKone
Copy link

One concern I have about this is whether it's clear enough what's happening if someone for example turns the oxygen generation rate to 10%. How would a player know it's possible to adjust it, where is it communicated? How can a player tell the oxygen generation has been adjusted down, would it seem like a bug if they start suffocating for seemingly no reason?

I think one thing that would alleviate the problem a bit is if the oxygen generation rate was visible on the generator and the vents somehow. Maybe the animation speed (and the volume of the sounds too?) could be relative to the oxygen generation rate?

Or just vents are rotating slower than normal. Or both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Code Programming task Design Design-related task Waiting Cannot be worked on/reviewed/tested at the moment for some reason

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants