EVA Helmet

Hey Folks! Helmet is now working, and was a pretty good test case for more "active" equipment to come.

I decided to make a simple equip/unequip process for now, and expand it later as-needed. So when the player wants to equip something, they right-click it and choose "equip." This does the usual pathfinding thing if needed to the item selected, then instead of adding it to the crew's "container," it gets slotted into the first appropriate slot with room. In this case, the empty "helmet" slot.

Then, once it's there, it can be unequipped by dropping it, just like any other item that was carried by the crew. The main difference here is that items equipped on the crew have their slot name in parentheses next to the item name in the UI. (See today's image, in the lower right.)

Not perfect, but it'll do the job for now.

The second piece of the puzzle was to add life support to the helmet, so it actually provided a benefit when equipped. I decided to make the helmet bestow an "airtight" container status to the player when worn, as well as just enough breathable O2 to avoid hypoxia. (About 20kPa pressure.) By doing this, the player becomes insulated from the environment, but continues to do it's existing breathing code. So minimal changes are necessary to that system, which is good!

However, the byproduct of this setup is that, as one might expect, the helmet gradually fills up with CO2 as the crew respirates the O2. That's where the rebreather comes in. Basically, I added a respiration process to the helmet that exactly reverses human respiration. It takes the CO2 out of the helmet's atmo at the same rate it's wearer creates it.

The result? I could open the airlocks, vent the ship's atmo, and the crew could still walk around and breathe! And if I took the helmet off, they'd start to suffocate. So not bad! Seems to do what it's supposed to.

One minor glitch remains, however. The debug status text on the player doesn't clear when the helmet is removed, so it looks like the player has helmet pressure even when it's off, even though they don't (and will suffocate eventually). I'm pretty sure this is just a matter of adding code to the gas container to clear it's contribution to the status text before it is destroyed on helmet removal.

Overall, I'm pretty pleased with it. It wasn't too hard to do, and things just sort of worked as they should. And we can now explore airless ships without dying!

I think I might try tackling clothes next, since it should pretty much reuse everything I did today, and hopefully won't be too hard to setup. The one difference here is that the clothes will (initially, anyway) be focused on temperature regulation rather than air, and I don't have that setup yet. In theory, I should be able to borrow a bunch of logic from NEO Scavenger, and hopefully it won't be too tricky.

Oh, one other thing. Right now, helmets work infinitely. At some point, I should add an "off" version of them, and probably some sort of running time limit, so they have a limited time use. I think that should be fairly easy to setup, though. And it should make exploring derelicts a bit more tense :)

Anyway, hope everyone has a good weekend! See you Monday.

Tags: Ostranauts

Comments

ra1's picture
ra1

Early game helmets could also bestow a minor negative sanity/claustrophobic effect to (most) NPCs. A long enough time in this state could cause the NPC to underperform, or even take off their helmet without asking... Conversely, if O2/pressure drops and they are not wearing a helmet, the would search for the nearest helmet and automatically put it on.

florinteal's picture
florinteal

This is the stuff I love reading about. Does the EVA just give crew members a little "oxygen" meter which allows them to breathe absent of any atmosphere? No, it creates a tiny pressurised zone around crew members with its own internal atmosphere.

Asthepanda2iscool2's picture
Asthepanda2iscool2

I'd guess that the final version of the re-breather would only convert some of the CO2 back to O2. There could also be a system for maybe replenishing oxygen within the EVA helmet, maybe by connecting it to a large on-map oxygen tank. Or maybe the re-breather could have a condition that represents how efficient it is at converting it back to O2. Also, what about life support backpacks like astronauts have today for EVA. They could add bonuses to insulation and oxygen supply, or maybe even slow degradation of items, though they would be additional items to use, as the current EVA system is already self contained. So:
EVA items could have a condition dictating how efficient they are, and they stop working at 0% (but can be refilled or repaired when the crew comes back, effectively adding a time limit.)
Some EVA items could slow degradation and/or add to the insulation and oxygen supply, though they aren't required items, and might even be mid or late game items.

I suppose these would require a different kind of condition modifier other than the item durability, since the item doesn't get destroyed when it hits 0%, but is actually just empty. Meanwhile, getting hit by something could quite easily break an EVA item.

Rar! Rar rar rar! Thanks for reading :)

dcfedor's picture
dcfedor

@ra1, I was thinking of a scene I saw once (was it Red Planet?) where the suit's O2 was nearly depleted, causing them to panic and remove their helmet. I bet we have some ripe opportunities for tension with space suits.

And yeah, I was wondering how AI might handle running low on O2, since rooms are a bit different than usable objects. Would they run from room to room looking for one that was pressurized? Helmets (and likely O2 masks later on) are some more direct-use tools AI can seek out when needed.

@florinteal, when you put it like that, I sound like a mad scientist. Why didn't I just do the normal, sensible thing like every other game? :)

@Asthepanda2iscool2, currently, the helmet is replacing CO2 with O2, but does so infinitely, and with no wear and tear.

Probably in the final game, there will be some sort of "charges remaining" stat on atmo systems like this. They'll be good for a certain amount of CO2 scrubbing before they require filter replacement and O2 recharge. And skimping on that recharge/filter change means little or no CO2 scrubbing.

Ships are going to have a more macroscopic version of this, once I get around to it. So I'll have to tackle this eventually.

Dan Fedor - Founder, Blue Bottle Games

florinteal's picture
florinteal

Mad science is the most interesting science, though.