Empty Needs

When a need reaches 0, something bad happens.

By default, every need has a "Colonist Damager". In the case of the "social need", the damager does 0 damage (so a colonist can't die simply from being left alone).

The colonist is damaged every X seconds until the need is restored.

If a colonist is too hot, for example, they suffer 1 damage* every 20 minutes.

*Colonists have a max of 10 hp

In the specific case of being too hot, colonists should ideally take excess damage if the room is really hot, but they currently don't. The reason for this is because the need was designed around a station getting progressively hotter (instead of you trapping your colonist in a room that is 1000 degrees). Eventually, we'll make the damager more complex.

It's worth pointing out that it wouldn't be fun if your colonists died so fast that you never even knew there was an issue.

Need Callbacks

This is a bit boring, but maybe technically interesting.

As needs decrease (or increase) we have special events that can be called.

We use these to queue states, memories, thoughts, whatever.

Let me show you an example with the hunger need:

At need level 90: Queue find food - Normal Priority

At need level 50: Add memory of being hungry

At need level 25: Show thought bubble AND queue find food - Urgent Priority

Specific Needs

All needs share a similar framework (decrease over time, do something when empty), but each need is restored in a very unique method.

Oxygen

The oxygen need is a colonist's need for breathable air. Every tick, colonists breathe in air from the atmosphere.

They need 21% oxygen in order for their oxygen need to be restored.

If the atmosphere isn't at least 21% oxygen, a partial breath will be saved. Once the stored partial breath reaches 21% oxygen, the need is maxed, and the partial breath is reset.

Here's something boring to consider:

The colonists breathe in, let's say, 100 units of "air". Let's also assume that colonists need 21 units of oxygen each tick. If the atmosphere is 1% oxygen, the colonist will only have breathed in 1 unit of oxygen. If the atmosphere is 99% oxygen, then the colonist will have breathed in 99 units of oxygen.

Currently, there is no con for breathing excess oxygen, but there is also no way to have over 25% oxygen in the atmosphere, so it doesn't matter.