Timberborn

Timberborn

Not enough ratings
Building HP & Renovation [U7 ✅]
   
Award
Favorite
Favorited
Unfavorite
Mod
File Size
Posted
Updated
351.892 KB
30 Aug @ 8:21pm
7 Sep @ 7:10pm
4 Change Notes ( view )

Subscribe to download
Building HP & Renovation [U7 ✅]

In 2 collections by Luke ✞ Jesus Saves ✞
Luke's U7 Compatible Mods
87 items
Building Renovations
2 items
Description
IMPORTANT: Renovation does NOT use Builders or Hauler! Please see the section below about how material are collected for them.

This mod adds HP and Renovations to buildings, with an optional Maintenance system that uses the new HP mechanic.

HP
Every building now has a base Durability (10), modified by its construction materials.
Buildings with no Material Cost (such as District Centers or Lumberjack Flags) are invulnerable, since making them destructible would only be an annoyance when you can simply delete and rebuild them.

Buildings can regain Durability or even become Invulnerable through Renovations.

Maintenance
The HP system is designed to support other mods, but also includes an optional Maintenance feature. It's disabled by default. To enable it, go to Main Menu → Mods → settings button next to the mod name.
- Enable: Buildings lose HP over time and must be repaired.
- Maintenance days per HP: default 1 day per HP (for example, a Lodge with 50 HP lasts about 2–3 seasons).

Auto-repair
In the mod settings and in buildings, you can enable Auto-repair. Repair is a renovation (see below) that restores HP. You can set the threshold at which it triggers as well as its priority.

In the setting box, you can also set low HP warnings.

Renovations
IMPORTANT: Renovation does NOT use Builders or Hauler! Please see the section below about how material are collected.

Buildings can undergo Renovations:
- They continue functioning normally while being renovated.
- Only one Renovation can be active on a building at a time.
- Some Renovations are repeatable; others are permanent, and some cannot be canceled once started.
- Renovation materials are non-refundable once collected.

Examples included in this mod:
- Repair: Restores a % of HP. Cost scales with the building's construction cost.
- Basic Reinforcement: Permanently increases Durability. Has 3 levels; only the highest applies. Higher levels can be built directly without lower ones.
- Invulnerable Reinforcement: Temporarily grants Invulnerability. Cannot be canceled.
- Metal Gear Solid: For buildings that use Gears (in construction cost or recipes). Permanently grants Durability and increased Productivity if applicable. Cardboard box included.
- Manufactory Overdrive: Greatly boosts Productivity for a short period, followed by a cooldown with reduced Productivity. While boosted, the building's HP decays rapidly.
- Decorative Carvings: For housing only. Apply a new Need buff (+4 Wellbeing) to all residents when inside.

Renovation Material and Stockpile
To avoid micromanagement, renovation materials are drawn directly from opt-in Stockpiles/Storage buildings (Piles, Warehouses, Tanks). The material just "magically" disappear, you do not need Hauler or Builder to carry them.
- Stockpiles gain a new toggle: Supply materials for Renovation: Materials in this stockpile can be used to provide for Renovations.
- Priority affects supply: higher-priority Stockpiles are used first.
- Renovations only begin once all required materials can be gathered at once. Materials cannot be delivered gradually; instead, they are gathered automatically from all available Stockpiles. Note: this is NOT limited by District.
- Renovations themselves also have a Material Priority setting: higher-priority Renovations receive materials first when supply is limited.

Tips

- Use TImprove 4 UI to add scrollbar when the panel gets too long.

Troubleshooting, Suggestion and Feedback
If you need any support or feedback, feel free to contact me on Timberborn's official Discord ( https://discord.gg/timberborn, on #mod-users[discord.com] or this mod's[discord.com] channel), or @theapologist316

Mod source code and donation: https://github.com/datvm/TimberbornMods

Detailed Formulas
Material Durability
Each building's Durability is calculated from its construction cost, based on both the strength of each material and their proportion in the total cost.

- Calculation logic: see BuildingMaterialDurabilityService.cs.
- Material strength values are defined in BuildingMaterialDurabilitySpec and are moddable.
- Default values:



Examples:
- A building made from 10 Metal Blocks → 500 Material Durability (plus 10 from Base Durability = 510 total).
- A building made from 10 Logs + 1 Metal Block → 82 Material Durability.

Repair Cost
Repairing a building uses one material type, chosen as:
1. The most plentiful material in the construction cost.
2. If tied, the material with higher strength is used.

- Full repair (100% HP) costs 50% of the original cost of that material.
- Repairs are broken down into 10% increments of HP.
- If the increment is not a whole number, the recovered HP% is scaled up proportionally, but never exceeds 50%.

Calculation details: see BuildingRepairService.cs.

===
v7.0.2: Fixed loading a save with a previous version where renovation could be built on unfinished buildings.
v7.0.1: Added certain support for more mods.