
Weatherproof
Rain no longer wears down your buildings. Water damage can be turned off too. The server sets the rules, and nothing is repaired for you.Weatherproof
Part of FlyingHose's Modpack. Needs only BepInEx.
In Valheim, a building with no roof wears down in the rain. A piece standing in water wears down too. I built this so I could turn that off. By default, rain no longer hurts your buildings.
What it does
The game keeps a timer on every piece. While the piece is wet, the timer runs, and every 60 seconds the piece loses 5 percent of its full health, until it is down to half. Weatherproof holds that timer still when the matching setting is off, so the 60 seconds never run out.
Weather.RainDamageis off by default. Rain does not hurt any piece.Weather.WaterDamageis on by default. Turn it off and standing in water does not hurt any piece either.
Turn a setting on and the game does what it does without the mod. With both on, Weatherproof does nothing at all.
A piece wears when something that is wetting it is allowed to. Rain wets a piece that has no roof, and standing in water wets it too. So a piece in the rain wears if Weather.RainDamage is on, a piece under water wears if Weather.WaterDamage is on, and a piece that is both wears if either one is on.
The wet look on pieces in the rain stays. It is only how the piece looks.
It does not heal worn pieces
Turning rain damage off stops new wear. It does not repair anything. A piece that rain already wore down stays at the health it has until someone repairs it. Repair once and it stays repaired. Area Repair, from the same suite, does a whole base in one go.
What it does not touch
Damage from creatures, players, fire, lost support, and Ashlands ash and lava is the same as without the mod. Weatherproof only holds the wet timer.
Settings
The server decides. On a server, the server's values are used and your own config file is ignored while you are connected.
| Setting | Default | Who decides |
|---|---|---|
Weather.RainDamage |
false | server |
Weather.WaterDamage |
true | server |
General.Enabled |
true | you |
General.DebugLogging |
false | you |
General.Enabled off applies no patches and needs a restart.
Everyone needs the mod
The server and every player must have the same version of Weatherproof. A server with the mod refuses players who do not have it, and a player with a different version sees which version the server runs.
The reason is that only the game that owns a piece works out its wear, and the owner is whoever is nearest. If the rule were different on each machine, a base would rot or not depending on who stood closest.
How it works
Weatherproof patches one method, the game's wear update for a single piece. Before the game reads the wet timer, it sets the timer to the current time if the setting that applies to this piece is off and the piece belongs to this game. It does not change the piece's health, its roof check, or any other timer. If the patch cannot bind after a game update, the mod logs an error and the game's rules stay as they were. If the hold itself starts failing, it logs once and turns itself off for the session, and the game's rules stay as they were.