StructureDamageTweaks
Allows modifying damage done to structures in a very customizable way. Includes an option for regular auto-repairs.
About this mod Author’s original text
In vanilla Valheim, structures can be pretty sturdy. Mods can easily turn your fortresses or ships into houses of cards though. This mod aims to remedy this.
Structures in the game will be put into a configurable number of categories. By default, the mod just differs between ships and player build structures. Non-player structures are ignored.
Whether a structure is in a category can be determined by:
- Name of the structure.
- Material of the structure.
- Exclude non-player structures.
For each category one can modify the damage done to the structures in two ways:
- Using global keys, which are used by vanilla Valheim to determine which boss has been defeated.
- Using any item that needs to be in the player inventory with an effect range that can also be configured.
If one of the conditions is satisfied, the damage done to structures will be reduced accordingly.
Example from the default config:
- After defeating Yagluth, all player structures will only take 50% of the usual damage.
Furthermore, auto-repair of structures can be configured in a very similar way. Using boss keys is not possible here. This is mostly meant for automatically repairing hard to reach stuff that might have been hit by an AOE attack.
- If carrying an item that has to be defined in the config, every 2 minutes all player structures within 100m of the player will be repaired by 5%.
Installation:
Simply unpack and put into BepInEx/plugins folder. Obviously required BepInEx
Changelog
- 1.0.1 Fixed beehives being indestructable.
- 1.0.2 Fixes config reading for systems with comma as decimal separator. Updated default EVA keys. Minor improvement in console usage.
- 1.1.0 Added two settings with regard to tamed pets: Prevent tamed pets from doing any damage to player build structure with an option to extend this to any structure.
- 1.1.1 Updated to new version
- 1.1.2 Updated to Hildirs Request Version
- 1.2.0 Adding a setting to remove rain damage (rain damage unchanged by default)
- 1.2.1 Recompile for 0.217.22
- 1.2.2 Recompile for 0.217.46
- 1.2.3 Recompile for Ashlands
- 1.3.0 Added a default damage modifier without boss dependency. Updated default values. No longer having any EpicValheim global keys.
- 1.3.1 Recompile for 1.0
Example config (slight extended to what the game will auto-generate on launch with this mod.
Settings file was created by plugin Structure Damage Tweaks v1.3.0
Plugin GUID: StructureDamageTweaks
[AutoRepair]
Timer in seconds on how often auto repair is applied if the player has an according item (see in categories). Disabled if value is zero. Low values not adviced.
Setting type: UInt32
Default value: 120
Timer = 120
[Category]
Number of additional categories for which damage reductions may be defined. Remark: You can use a category to exclude structures from another category. Each structure can always be in only one category and they are tested zero first,..., default last
Setting type: UInt32
Default value: 1
NumberOfCategories = 1
[Category0]
What is used to determine if a structure in inside this category. Options: 'structureName', 'material', 'none'. In '[CategoryDefault]' this is always 'none'.
Setting type: String
Default value: structureName
type = structureName
Names of the structure(s) in this category.
Setting type: String
Default value: cart,raft,karve,vikingship,vikingship_ashlands,littleboat,cargoship,bigcargoship
StructureName = cart,raft,karve,vikingship,vikingship_ashlands,littleboat,cargoship,bigcargoship
Only used in game with logging enabled. Though I advice naming your categories for clarity
Setting type: String
Default value: Ships
name = Ships
Determines whether this group only applies to structures build by any player. Be aware, that if this is false, this may include beehives or other structures that you actually want to destroy.
Setting type: Boolean
Default value: true
OnlyPlayerStructures = true
Global keys that apply modifiers. First applicable key will be used. Example values: defeated_eik
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file. In multiplayer, the host and every client need the same mods installed.
Install these first, or the mod will not work: