Power Subsystems

Hey Folks! Working on the power subsystems today, and aiming to make it possible to manually switch reactors and batteries on/off the grid.

It had been a while since I worked on power systems. And as they are now, they basically power-on as soon as they can, and power-off if they lack the necessary inputs. There's no way to manually turn them on or off. In the case of a derelict, they'd be shut-off while sitting in a commercial junkyard. And if the sensor for a heater or air pump wasn't working right, you'd want to be switching those appliances on/off until things were back under control.

So I added a new condition for appliances called "IsSwitchedOff," which is different from "IsOff." The former overrides any events that turn an appliance on, so it stays off until the switch is changed. And in adding this, I had to change a few trigger definitions. Then, I added some debug commands to toggle that "IsSwitchedOff" on the current selected item.

Testing revealed that I also had to change the way reactors flag tiles for power conduction. They were charging batteries even when "IsSwitchedOff" was present. But after that, they seemed to work as they should! I could switch batteries and the reactor on/off at will, and the ship responded normally.

Next step was to get an in-game, non-debug way of changing that setting. And since I've got that ultra-complex reactor UI just sitting around from the teaser work I did, I started hooking that up to the reactor. Currently, it just does the animations you saw in the trailer. However, I was able to get the "Power Bus" knob to toggle "IsSwitchedOff" on the reactor. Plus get that knob to show current status when the UI is loaded.

It's a minor feature, but already adds an interesting way for the player to change their environment. This also means I can get the derelict-making code to shut down ship systems so we find it totally powered-down. Which means when we board, we can have that moment where we flick the switch to see what happens...

Tags: Ostranauts

Comments

Rovlad's picture
Rovlad

Man, you totally should have included that moment in the trailer, even if it'd be completely artificial.
I think that would work better than showing off placeholder item names in it, geez. :)
Other than that it was actually pretty cool though.

dcfedor's picture
dcfedor

That's sort of the running problem with a teaser like this: the longer you wait, the more cool stuff you can put into it from the game. But if you wait too long, you don't get the benefit of marketing x time.

Damned if you do, and damned if you don't :)

Dan Fedor - Founder, Blue Bottle Games