Shelter

A **shelter** or **house** is a completely enclosed area with a totem inside it.
Once established, a shelter can help dwarfs recover health faster, and protect them from all sorts of danger.

## Purpose

### Activating beds

A shelter is only necessary to activate the full health restoring capability of beds.

Without beds, dwarfs can sleep on the ground, but only if they're heavily injured.
Furthermore, dwarfs that have more than 1  of health will never sleep on the floor.

They need beds to sleep long enough, and recover their full health (up to the 3 ).
However, if there is no shelter (no totem have been placed) or if the shelter's borders have been violated, beds are nothing more than decorative furniture.
In other words, if a dwarf is heading for his bed with no shelter (either because he has low health, or due to a sleep order by the player), that dwarf will first complain about the house, and then will lie in his bed.
The health regeneration of the dwarf will take as long as if the he had been sleeping on the floor.

### Defense

Once established, the shelter becomes a primary target of raids.
However, if no shelters are found in the world, monsters will gather around the initial stockpile.
On campaign and on custom worlds, most monsters will camp there forever, softlocking the game.
On multiplayer mode (not on biomes) monsters are able to damage and destroy the initial stockpile, triggering the defeat screen.

So, although not mandatory, the shelter should obviously include and protect the main stockpile.

*See tips and tricks for a good base layout, and general advice for an effective defense.*

## What classifies as a shelter

A shelter has a few conditions that must be met before dwarfs will prioritize sleep there:

* You must place a totem to mark the area which is intended to become a shelter.

A totem has a range of 10 to 20 squares, depending linearly upon the shelter's comfort level. It should ideally be placed near the stockpile in order to protect it from ghosts.
The range of the totem can be restricted/reduced by enclosing it with foreground tiles (wall, floor, roof, doors or hatches)
* Every background tile within the totem's radius must be a wall or a window, or part of the underground backdrop.

### Tips

* A trail of small orange-yellow stars traces the perimeter of the shelter.
* Hatches must be placed one square *above* the hole in the floor or ceiling, not in the hole. If the hatch is placed in the hole, then the shelter will only be secure when the hatch is shut, and opening the hatch will break the shelter.
* If there is a hole in the perimeter around the totem then the nearest hole will be pointed out with a large orange star (unless the hole is caused by an open improperly placed hatch).
* To use a second totem to expand the size of the shelter, place the second totem at an edge of the first totem's maximum range.

## Comfort level

The comfort level of a shelter influences the dwarfs recovery time while they sleep. A higher degree of comfort will reduce the time dwarfs need to sleep to regain health.

### How to increase comfort

* Each bed in the house, beyond the first, drastically lowers comfort; as overall comfort is divided by how many beds are in the shelter.

If dwarves don't fight very often, keep only one bed and reassign it after use until comfort is maxed out. Then add a bed and repeat once more comfortable items become available.
Replace all beds as soon as a better version becomes available as they have an effect on overall comfort.
* The material used for the external walls makes a big difference. The following list sorts them from the best to the worst:

 Earth | 4

* Simple background material like earth and stone makes no difference, but crafted wall sets do:

 Luxurious Wall Set | 4

* Doors and hatches type have an impact on the comfort level, the stronger the door, the better is the comfort provided. The following list sorts them from the best to the worst:

 Wooden Door/Wooden Hatch | 5

* Roofs provide less comfort than walls, so is better to use roof tiles only for deco on top of a line of wall tiles.
* Shelter size per dwarf now increases comfort.
* Overall lighting affects the comfort level. The bigger the shelter, the more lighting needed until the effect is capped. The type of lighting doesn't appear to have an effect.
* The comfort provided by furniture/deco items *does* affect the overall comfort level.

### Tips

* Ladders count as floor for the purpose of placing furnishings.
* The best way to max comfort is to place black and white pennant on top of stained-glass window, since the windows function as backgrounds.

## See also

* Totem
* Stockpile
* Beds
* Tables
* Rat
* Shelter entryway
* Furniture
* Crafting stations
* Decorations
* Walls
* Defenses

## References

1. ↑ Patch 1.4.010: "dwarfs can sleep without beds, but their health is restored much more slowly".
2. ↑ Since update 1.4.010, background wall sets add some comfort to the shelter. This has been verified in the inventory screen, when opening the item's details. The values can also be checked at the file `/main/data/craft_resources.xml`.