Aquark-IndoorWeather icon

IndoorWeather

Stops the Mountain blizzard fog and snow particles while you are under a roof, so the inside of your base stays clear. Client-side, configurable biomes and fog strength.

By Aquark
Last updated 17 hours ago
Total downloads 89
Total rating 1 
Categories Building
Dependency string Aquark-IndoorWeather-1.0.0
Dependants 0 other packages depend on this package

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2351 icon
denikson-BepInExPack_Valheim

BepInEx pack for Valheim. Preconfigured with the correct entry point for mods and preferred defaults for the community.

Preferred version: 5.4.2351

README

IndoorWeather

Mountain blizzards look great outside and terrible inside: the game applies the blizzard as camera fog plus a set of weather particle systems, and neither of them checks whether you are under a roof. So a snowstorm smears haze over the screen while you sit in your hall.

IndoorWeather scales the weather fog down and stops the weather particles only while the local player is sheltered, and restores the game's values the moment you step outside.

Features

  • Fog: multiplies RenderSettings.fogDensity while indoors (default 0.05, so nearly clear). The game's own value is saved and put back when you leave the shelter, including when the weather changes while you are inside.
  • Particles: stops the environment particle systems (drifting snow) while indoors, and lets the game manage them again outside.
  • Shelter detection: Player.m_underRoof or a cover percentage above a threshold (default 50%), so a big hall with a roof counts even when you are not exactly under a beam.
  • Biome filter: only applies in the listed biomes (default Mountain,DeepNorth). Meadows rain and the Mistlands mist are untouched unless you add them.
  • Client-side: purely visual, no ZDO changes, works on any server. Nothing is written to the save.

Install

  • Install BepInExPack Valheim (r2modman handles it).
  • Drop IndoorWeather.dll into BepInEx/plugins/.
  • Client-side only — the server does not need it.

Config

BepInEx/config/snowfarm.valheim.indoorweather.cfg

Section Key Default Meaning
1 - General Enabled true Master switch
1 - General Biomes Mountain,DeepNorth Biomes where the effect is applied
2 - Fog FogMultiplier 0.05 Fog density multiplier indoors (0 = no fog)
3 - Particles HideParticles true Also stop the weather particles indoors
4 - Shelter CoverThreshold 0.5 Cover percentage that counts as indoors

How it works

A postfix on EnvMan.Update runs once per frame on the client:

  1. Reads the current biome and the local player's roof/cover state.
  2. If the biome is in the list and the player is sheltered, saves the current RenderSettings.fogDensity, replaces it with density * FogMultiplier, and disables the environment particle systems via the game's own EnvMan.SetParticleArrayEnabled.
  3. Otherwise restores the saved fog density and reactivates the particles.

If the weather changes while you are indoors, the new density is picked up as the new baseline, so the effect never "sticks".

Notes

  • If the haze is still there indoors after installing, the effect probably comes from an environment object or a post-processing overlay rather than fog/particles — tell me and I will extend the mod.
  • Fog is global (RenderSettings), so it also changes what the camera sees through windows. That is intentional: the fog value is what makes the screen look smeared.
  • Does not touch rain, thunder, wind or the wet/cold status effects; only visuals.

中文说明

雪山暴风雪的“雪雾”由两部分组成:相机雾效(RenderSettings.fogDensity)和天气粒子系统, 两者都不判断玩家头顶有没有屋顶,所以屋里照样一片糊。

这个 mod 只在玩家处于遮蔽状态(m_underRoof,或遮蔽度超过阈值)且在雪地群系(默认 Mountain / DeepNorth)时:

  • 把雾密度乘一个系数(默认 0.05,几乎无雾),走出室外立刻还原游戏原本的数值;
  • 关掉天气粒子(飘雪),走出室外交还给游戏管理;
  • 天气在你室内期间发生变化时,会以新数值重新作为基准,不会“卡住”。

纯客户端、纯视觉,不写存档,服务器不需要装。

Build

dotnet build -c Release -p:ValheimDir="C:\Program Files (x86)\Steam\steamapps\common\Valheim"

or run pack.ps1 to build and produce IndoorWeather.zip for Thunderstore.