space-station-14
space-station-14 copied to clipboard
Substation maintenance
About the PR
Add a substation maintenance mechanic. Substations slowly burn oil while they're running. The more power the substation is delivering, the more oil it burns. If a substation is not maintained by periodic oil refilling, it will take damage until it fails and needs to be rebuilt.
This mechanic is designed to give mid-round engineers some work to do. Instead of setting up everything at round start and lounging for the rest of the shift, responsible engineers will need to visit each substation periodically and check up on their oil levels. This is also better than a random event, because this mechanic allows good engineers to preemptively maintain their equipment and prevent failures.
In support of this change:
- Add a "can of oil" prototype and give engineers some at at round start in the electrical locker.
- Disable the BreakerFlip random event.
- While here, adjust the mapping suffix of the substation prototype with correct units (MW to MJ).
A nice side effect of this change: responsible engineers cannot "just" fix power by bridging MV or LV segments, because that would overload a substation and cause it to burn oil at a faster rate. If the substation is not subsequently serviced, it will fail much faster because it is overloaded.
Screenshots
FAQ
Why not just have mice bite random wires or have random wires burn out? Substations are easier to locate and cannot be under walls.
Why oil in substations? That seems fake. It's a real thing.
How long will it take for a substation to fail? At round start, a typical heavily-loaded substation has a load of around 16 kW. The oil consumption rate is: exp(16kW/5kW)/60 = 0.4u per minute. Since substations start filled with 30u, it will finish consuming its oil, if not maintained, in 30u/0.4u = 73 minutes.
Then, substations have a 10% chance of taking 10 damage (out of 100) every 10 seconds. That means on average, it will take 10 damage every 1/0.1 * 10 seconds = 100 seconds. Since it takes 10 hits to destroy the substation, it takes 1000 seconds = 17 minutes on average.
So, the time to expected failure is 73 + 17 = 90 minutes. Of course, more heavily loaded substations will fail sooner, and lightly loaded substations will not fail in a reasonable amount of time. These numbers, of course, can be tuned.
Won't all the substations fail at the same time and everything will be terrible? No. Substations consume oil at a rate based on the amount of power they are supplying. The first substation to fail will likely be the substation that is loaded the most. There is a good distribution of substation loads across all the stations available:
Bagel:
Maraton:
Meta:
Omega:
Packed:
Pillar:
Saltern:
What happens if someone puts water in the substation? That would be traitorous activity. The examine text would show that the substation is still well-filled, but once all the oil is used up, the substation will start taking damage (despite it appearing to be well-filled). It does not (currently) accelerate damage.
Changelog :cl: notafet
- add: Substations now require maintenance to prevent eventual failure.
RSI Diff Bot; head commit 382c964a43606caf7a884d50735559ac483141ec merging into 28cd7dc764d9c5deb2d3312aece4b3ae9198e900 This PR makes changes to 1 or more RSIs. Here is a summary of all changes:
Resources/Textures/Objects/Tanks/oil.rsi
State | Old | New | Status |
---|---|---|---|
equipped-BELT | ![]() |
Added | |
icon | ![]() |
Added | |
inhand-left | ![]() |
Added | |
inhand-right | ![]() |
Added |
What happens if someone puts water in the substation? That would be traitorous activity. The examine text would show that the substation is still well-filled, but once all the oil is used up, the substation will start taking damage (despite it appearing to be well-filled). It does not (currently) accelerate damage.
Is there a way to detect this at all? If the transformer was fully filled with water is there a way to 'drain' the transformer of the water and replace it with oil again?
What happens if someone puts water in the substation? That would be traitorous activity. The examine text would show that the substation is still well-filled, but once all the oil is used up, the substation will start taking damage (despite it appearing to be well-filled). It does not (currently) accelerate damage.
Is there a way to detect this at all? If the transformer was fully filled with water is there a way to 'drain' the transformer of the water and replace it with oil again?
Currently, deconstruct and reconstruct the substation. If someone poured water into your car's gas tank, how'd you get it out? We can consider adding a siphon, but see below.
I could perhaps add examine text for when the substation is taking damage, so that you could tell it's out of oil despite the fill line indicating otherwise.
I didn't consider this issue important enough, because if someone really wanted to sabotage your substation and has already gotten into the substation vault, they could just blow it up.
If you're meleeing a substation it's going to blow up in your face vs some indeterminate time later.
At a minimum make it require access so any greytide walking past can't mess with it, but in future the examine should disclose what's in there as someone who isn't familiar with the future isn't going to know why a substation spontaneously broke.
If you're meleeing a substation it's going to blow up in your face vs some indeterminate time later.
How about blowing the substation up immediately after a sufficient quantity of non-oil reagent has been added? This makes sense because it would be "shorting out" the substation.
At a minimum make it require access so any greytide walking past can't mess with it, but in future the examine should disclose what's in there as someone who isn't familiar with the future isn't going to know why a substation spontaneously broke.
So, most transformers are behind engineering-secured doors. There are a handful of transformers out in the open on Packed, and maybe other stations. Isn't this really a mapping issue? Just like how we don't put trigger locks on guns, we just put them behind an armory?
Just have a question about this, is there any way for engineering to obtain more oil in case they run out? If there's no way to get more a traitor engineer could just steal all the oil cans and start filling substations with water, and there's nothing the engineering team could do to fix it.
Just have a question about this, is there any way for engineering to obtain more oil in case they run out? If there's no way to get more a traitor engineer could just steal all the oil cans and start filling substations with water, and there's nothing the engineering team could do to fix it.
Chemists can make oil, so if the stock is depleted, the chemists can make more.
Of course, traitor engineers could just blow up substations with a brick of C4. But it sounds like multiple people are concerned about not being able to spot damage, so I will think of a solution. Either changing the examine text, make some other sign of failure visible, or just make it instant blow up.
Just have a question about this, is there any way for engineering to obtain more oil in case they run out? If there's no way to get more a traitor engineer could just steal all the oil cans and start filling substations with water, and there's nothing the engineering team could do to fix it.
Chemists can make oil, so if the stock is depleted, the chemists can make more.
Of course, traitor engineers could just blow up substations with a brick of C4. But it sounds like multiple people are concerned about not being able to spot damage, so I will think of a solution. Either changing the examine text, make some other sign of failure visible, or just make it instant blow up.
You mean this oil?
Of course, traitor engineers could just blow up substations with a brick of C4. But it sounds like multiple people are concerned about not being able to spot damage, so I will think of a solution. Either changing the examine text, make some other sign of failure visible, or just make it instant blow up.
I do like the concept of subtle, delayed sabotage. I just also want it to be something that could be noticed and stopped without too much annoyance as well.
Maybe make it so you can drain the substation's contents, but if you drain too much oil while it is active then it would immediately catch fire / harm the person working on it. This way the antag can drain some and replace with water for the delayed sabotage, drain all and replace with water for immediate but with consequences on themselves, and the engineer can fully repair / replace the oil by powering the substation down (by cutting the HV wire first) to remove any contaminants. That also means during the complete replace you lose power to whatever it's connected to, just like with the rebuild.
Having a way to tell what's in the substation so you can tell when there is non-oil would be handy, since otherwise it would just appear like it's full but not working which could be frustrating to figure out the actual problem is there isn't actually oil in it.
Just have a question about this, is there any way for engineering to obtain more oil in case they run out? If there's no way to get more a traitor engineer could just steal all the oil cans and start filling substations with water, and there's nothing the engineering team could do to fix it.
Chemists can make oil, so if the stock is depleted, the chemists can make more. Of course, traitor engineers could just blow up substations with a brick of C4. But it sounds like multiple people are concerned about not being able to spot damage, so I will think of a solution. Either changing the examine text, make some other sign of failure visible, or just make it instant blow up.
You mean this oil?
I mean this oil. I can fix the description. Oil is not actually used in any recipe, and it doesn't make sense that chefs are cooking with something that contains welding fuel.
Of course, traitor engineers could just blow up substations with a brick of C4. But it sounds like multiple people are concerned about not being able to spot damage, so I will think of a solution. Either changing the examine text, make some other sign of failure visible, or just make it instant blow up.
I do like the concept of subtle, delayed sabotage. I just also want it to be something that could be noticed and stopped without too much annoyance as well.
Maybe make it so you can drain the substation's contents, but if you drain too much oil while it is active then it would immediately catch fire / harm the person working on it. This way the antag can drain some and replace with water for the delayed sabotage, drain all and replace with water for immediate but with consequences on themselves, and the engineer can fully repair / replace the oil by powering the substation down (by cutting the HV wire first) to remove any contaminants. That also means during the complete replace you lose power to whatever it's connected to, just like with the rebuild.
Having a way to tell what's in the substation so you can tell when there is non-oil would be handy, since otherwise it would just appear like it's full but not working which could be frustrating to figure out the actual problem is there isn't actually oil in it.
I like this suggestion.
Any suggestions for how to tip the substation and drain things from it? DrainableComponent doesn't quite to do what we want it to do, since Substation doesn't have ItemComponent.
I like this suggestion.
Any suggestions for how to tip the substation and drain things from it? DrainableComponent doesn't quite to do what we want it to do, since Substation doesn't have ItemComponent.
My guess would be to look into how other tanks work, like the welding fuel / water tanks. I believe they use ReagentTank. Only problem is I don't think those tanks let you fill them. If that's a constraint on ReagentTank then maybe there is a better way to keep track of a solution? I haven't really looked into it too much yet.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
- Updated to fix merge conflict (and force pushed)
- Added drainable component so that substation contents can be sampled and inspected or drained. Of course, don't drain the substation fully while it's on. Call your local chemist to figure out what you actually sampled.
- Require maintenance for wallmount substations as well.
very much like this as a subtle mechanic. does having it both be refillable/drainable even work? i remember there being some issues with that previously
very much like this as a subtle mechanic. does having it both be refillable/drainable even work? i remember there being some issues with that previously
Looks like it does not. I'll take a look at those systems and see what it'll take for that to work (probably adding verbs instead of using only OnInteract).
Overcome by events.