Project Zomboid

Project Zomboid

Excavation - Basement Expansion
 This topic has been pinned, so it's probably important
albion  [developer] 6 Aug @ 12:08pm
(FAQ) Why excavated areas cannot be considered indoors
Since I've had to answer many similar questions about this, I am creating an FAQ about why excavated areas are considered outdoors, and why seemingly obvious solutions don't work.

Why not just put an invisible roof above the player when they dig?
There is already a roof above the player: the ground. The engine makes no distinction between floors and roofs. You get rained on anyway because the engine never checks if a basement is covered by a roof in the first place - it always assumes that it isn't.

Why not copy how Vanilla basements work?
The modding API cannot do this. Vanilla basements use predefined room zones, which are always considered indoors, and always protected from rain, even if they don't have a roof. Mods are not able to create room zones.

Player built structures are protected from rain, why not do that?
It doesn't work underground. Player structures are turned into room zones by the region manager. Unfortunately, the region manager is hard coded to only care about structures above ground. Mods are not able to change how the region manager works.

Tents from the mod 'Camp in the Rain' protect you from rain, even in basements.
You still aren't indoors, so this doesn't fix most of the issues. The way this mod protects you from rain is passively decreasing your wetness at a similar rate that the rain increases it. It does not make the game consider you indoors, or even actually prevent rain from reaching those areas. This is a good implementation for what that mod is aiming to do, but copying it would not really help much with the other issues basements have.