sighsorry-ZoneSavior icon

ZoneSavior

Automatically archiving Inactive-player structure and tamed animals per zone, zone bundle save/load/restore, player activity tracking, archive protection rules, per-zone WearNTear limits, and client zone UI.

Last updated 5 days ago
Total downloads 51
Total rating 1 
Categories Mods Tools Server-side Client-side AI Generated
Dependency string sighsorry-ZoneSavior-1.0.1
Dependants 1 other package depends on this package

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2333 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.2333

README

ZoneSavior



ZoneSavior is the server zone-maintenance half of the Homestead/ZoneSavior split. It automatically archives inactive player structures(+ tamed animals within the zone), restores saved zone bundles, enforces optional per-zone WearNTear limits, tracks player activity, and provides a small optional client zone UI.

ZoneSavior can run on the server only. Clients may also install it if they want the zone number/boundary UI or if an admin wants to run ZoneSavior commands from an admin client instead of the server console or RCON.

What ZoneSavior Is For

  • Dedicated-server cleanup for long-inactive player bases.
  • Manual zone save/load testing before enabling automatic resets.
  • Restoring an archived base to either its original zones or a new area.
  • Keeping per-zone WearNTear counts under configurable limits.
  • Letting players or admins identify a target zone number in-game.

ZoneSavior does not require Upgrade World, World Edit Commands, Infinity Hammer, Server Devcommands, Jotunn, or Homestead.

Install Notes

  • Install on the dedicated server to run auto archive, save/load, reset, and zone limit enforcement.
  • Client install is optional.
  • If installed on clients, the client can show zone UI with the configured hotkey and can route admin-client commands to the server.
  • Normal players do not run archive/reset logic. Archive and restore are server/admin workflows.

Data And File Layout

ZoneSavior uses one normal BepInEx config file plus a data folder under BepInEx/config/ZoneSavior/.

BepInEx/config/
  sighsorry.ZoneSavior.cfg
  ZoneSavior/
    activity.yml
    zones.yml
    Diagnostics/
    ZoneBundles/
      example_tag/
        manifest.yml
        bundle001.zonebundle.yml
        bundle002.zonebundle.yml

sighsorry.ZoneSavior.cfg

Main BepInEx config.

Important sections:

  • 01 - General
    • Lock Configuration: lets the server control synced settings.
    • Zone WearNTear Limit: enables or disables per-zone WearNTear placement limits from zones.yml.
  • 02 - Client
    • Build Counter Visible Seconds: how long the build counter stays visible after placement.
    • Zone UI Toggle Hotkey: toggles current-zone HUD and floor boundary line on clients.
  • 03 - Admin Zone Bundle
    • WearNTear Save Mode: controls whether manual zone saves include creatorless WearNTear.
    • Zone Bundle Support Fill Feather Width: terrain blend width around restored support cells.
    • Support Fill Contact Tolerance: how close terrain must be to a WearNTear bottom to be captured as a support contact.
  • 04 - Admin Auto Archive
    • Controls inactive days, dry run, reset after save, scan interval, scan batching, small-cluster behavior, and safety limits.

ZoneSavior/activity.yml

Server-owned activity and scanner state.

It records:

  • known platform IDs, Valheim player IDs, and observed player names
  • first/last seen times
  • manual ignore/protection records created by commands
  • auto archive run history
  • last auto scan schedule anchor
  • cluster records produced by scans

Most admins should not edit this by hand. Prefer zs_archive_status, zs_archive_mark_seen, zs_archive_ignore_player, and zs_archive_schedule.

ZoneSavior/zones.yml

Server-owned zone rule file.

It has two jobs:

  1. Per-zone WearNTear limits.
  2. Auto archive protection by Steam ID, Valheim player ID, or player name.

Default shape:

version: 1
archive_protection:
  steam_ids:
    - "76561198000000000"
    - "76561198000000001"
  player_ids:
    - 123456789
  player_names:
    - "GreatViking"
    - "Xcxcx"
defaults:
  count_creatorless: false
rules:
  - name: center_keep
    x: [-1, 1]
    z: [-1, 1]
    limit: 40
    count_creatorless: true
  - name: outer_ring
    x: [-3, 3]
    z: [-3, 3]
    limit: 80

Rules are evaluated top to bottom. The first matching rule wins. Zones that match no rule are unlimited.

archive_protection prevents matching creators from being archived/reset by the auto archive scanner. Use Steam IDs when possible; player names are convenient but can change.

ZoneSavior/ZoneBundles/<tag>/manifest.yml

Archive manifest for one saved tag.

It records:

  • archive tag
  • source zone range
  • one manifest entry per saved source zone
  • original source creators
  • source-zone to bundle-file mapping
  • connection records used when reconstructing multi-zone archives

Use the manifest when you want to restore a complete saved shape, especially non-rectangular auto archives.

ZoneSavior/ZoneBundles/<tag>/bundleNNN.zonebundle.yml

One saved source zone.

Each bundle stores:

  • player-build WearNTear entries with prefab, local position, rotation, scale, creator metadata, and sanitized ZDO data
  • tamed MonsterAI entries when present
  • SupportFill terrain contact data when terrain was loaded and contact points were captured
  • fallback support data based on saved WearNTear footprints for unloaded or contactless terrain cases

ZoneSavior intentionally skips many volatile or unsafe objects such as players, tombstones, item drops, projectiles, ragdolls, fish, terrain modifiers, terrain comps, and locations. WearNTear prefabs without a normal build recipe/resource cost are skipped.

ZoneSavior/Diagnostics/

Created by zs_archive_debug_zone.

Diagnostic files explain why one zone would or would not be selected by auto archive. This is the first place to look when a zone is not being archived as expected.

What Gets Archived

Manual zone save and auto archive both focus on player structures, not arbitrary world objects.

ZoneSavior saves:

  • WearNTear objects that are registered player build pieces with resource costs.
  • Tamed monsters with MonsterAI/Tameable state.
  • Creator metadata when present.
  • Terrain support samples for saved structures.

Auto archive scans only creator-linked WearNTear with creator != 0. Creatorless structures can be included by manual save when WearNTear Save Mode = IncludeCreatorless, but they are not enough by themselves to make a zone inactive-owner eligible.

Terrain Restore Behavior

ZoneSavior uses SupportFill.

When saving a loaded zone, it checks the lower WearNTear footprint cells and records terrain contacts where the terrain was close enough to the structure bottom. When loading, those saved contacts can raise or cut terrain so structures regain support.

If saved contacts are missing, ZoneSavior can fall back to the saved collider/footprint information and place terrain near the lowest reasonable WearNTear support plane. This fallback is clamped to avoid extreme terrain spikes.

Zone Bundle Support Fill Feather Width blends changed terrain back toward native terrain around support cells.

Commands

Commands can be run from:

  • dedicated server console
  • RCON
  • admin client with ZoneSavior installed

If a command is run from a dedicated server console, provide explicit target zones for load commands because there is no local player position.

zs_savezone

Save one source zone or a rectangular source range.

Use this when:

  • testing ZoneSavior before enabling auto archive
  • manually saving a known base
  • creating a bundle that can be restored elsewhere

Syntax:

zs_savezone (x,z) tag
zs_savezone (x~x,z~z) tag

Examples:

zs_savezone (-21,-4) test_base
zs_savezone (-21~-20,-4) old_base

The tag becomes the folder name under ZoneSavior/ZoneBundles/.

zs_loadzone

Load one saved source zone, or a rectangular saved source range, into another location.

Use this when:

  • testing one saved zone
  • moving a simple rectangular saved range
  • checking terrain restore behavior on a small sample

Syntax:

zs_loadzone (x,z) tag [to (x,z)] [offset=Y]
zs_loadzone (x~x,z~z) tag [to (x,z)] [offset=Y]

Examples:

zs_loadzone (-21,-4) test_base to (10,3)
zs_loadzone (-21~-20,-4) old_base to (10,3)
zs_loadzone (-21,-4) test_base to (10,3) offset=2

Notes:

  • to (x,z) is the target start zone.
  • If to (x,z) is omitted, ZoneSavior uses the local player's current zone.
  • Dedicated server console and RCON should usually provide to (x,z).
  • offset=Y adds a vertical offset after the normal support anchor is calculated.
  • Use zs_loadarchive for non-rectangular archive shapes.

zs_loadarchive

Load every bundle listed in a manifest, preserving the saved shape.

Use this when:

  • restoring an auto archive cluster to a new area
  • moving a non-rectangular saved base
  • loading multiple connected zones as one archive

Syntax:

zs_loadarchive tag [to (x,z)] [offset=Y]

Examples:

zs_loadarchive auto_halla_c178 to (-4,0)
zs_loadarchive auto_Snack_plus1_b7a5018f_c103 to (20,-3) offset=1.5

The target zone is treated as the new anchor for the saved manifest's minimum source X/Z zone. Every other saved zone keeps its relative offset from that anchor.

zs_archive_scan

Run the inactive-player scanner manually.

Use this when:

  • testing config changes
  • running a one-time cleanup
  • checking what would be archived before enabling scheduled scans

Syntax:

zs_archive_scan [dry|save|reset]

Examples:

zs_archive_scan dry
zs_archive_scan save
zs_archive_scan reset

Modes:

  • dry: report candidates only.
  • save: write archives but do not reset source zones.
  • reset: write archives and reset eligible source zones.

If the mode is omitted, ZoneSavior uses the current config values.

zs_archive_status

Print activity and auto archive status.

Use this when:

  • checking whether scheduled scans are enabled
  • checking last and next scan times
  • confirming activity file paths and player record counts

Syntax:

zs_archive_status

zs_archive_player

Run a manual archive scan filtered to one owner.

Use this when:

  • a specific inactive player should be archived
  • testing one player before a full server scan
  • cleaning up a known Steam ID

Syntax:

zs_archive_player steamID [dry|save|reset]

Examples:

zs_archive_player 76561198000000000 dry
zs_archive_player steam:76561198000000000 reset

Steam ID is preferred. A short Valheim player ID fallback is supported only when ZoneSavior has not linked a Steam platform ID yet.

zs_archive_list

List recent archive scanner runs and cluster records.

Use this when:

  • finding the tag of a recently archived base
  • checking how many zones a scan processed
  • reviewing cluster status after a dry run or reset run

Syntax:

zs_archive_list

zs_archive_mark_seen

Mark a Valheim player ID as seen now.

Use this when:

  • imported world data has an owner who should not be considered inactive yet
  • correcting activity records after a manual migration

Syntax:

zs_archive_mark_seen playerID

Example:

zs_archive_mark_seen 123456789

zs_archive_ignore_player

Protect or unprotect a Valheim player ID from auto archive.

Use this for a quick activity-file ignore flag. For long-term server policy, prefer archive_protection in zones.yml.

Syntax:

zs_archive_ignore_player playerID [on|off]

Examples:

zs_archive_ignore_player 123456789
zs_archive_ignore_player 123456789 on
zs_archive_ignore_player 123456789 off

Omitting on|off means on.

zs_archive_restore

Restore an archived tag back to its original source zones.

Use this when:

  • an inactive player returns and wants the original place restored
  • an admin wants to undo a previous auto archive reset

Syntax:

zs_archive_restore tag

Example:

zs_archive_restore auto_halla_c178

This differs from zs_loadarchive tag to (x,z): restore uses the original zones recorded in the manifest.

zs_archive_schedule

Show or adjust the automatic archive scan schedule anchor.

Use this when:

  • the server restarts on a schedule and you want scans to occur at predictable times
  • you want to force the next scheduled scan time without editing activity.yml

Syntax:

zs_archive_schedule [status|now|clear|last yyyy-MM-dd HH:mm|next yyyy-MM-dd HH:mm]

Examples:

zs_archive_schedule
zs_archive_schedule status
zs_archive_schedule now
zs_archive_schedule clear
zs_archive_schedule last 2026-05-02 15:00
zs_archive_schedule next 2026-05-03 03:00
zs_archive_schedule next 2026-05-02T18:00:00Z

Notes:

  • Scheduled scans are disabled when Scan Interval Minutes = 0.
  • now sets the last auto scan time to the current server time.
  • clear clears the last auto scan time.
  • last ... sets the last scan anchor directly.
  • next ... sets the anchor so the next scan is due at the supplied time.
  • Dates without Z or an offset are parsed as the server computer's local time.

zs_archive_debug_zone

Write a YAML diagnostic report explaining one zone's archive eligibility.

Use this when:

  • a zone you expected to archive is not selected
  • a zone you expected to be protected is still selected
  • you need to inspect creator, recipe, protection, and exclusion reasons

Syntax:

zs_archive_debug_zone (x,z)

Example:

zs_archive_debug_zone (-7,12)

Reports are written under BepInEx/config/ZoneSavior/Diagnostics/.

Typical Workflows

Test manual save/load with one zone

zs_savezone (-21,-4) test_base
zs_loadzone (-21,-4) test_base to (10,3)

Use this before trusting a large auto archive workflow.

Dry run inactive archive

zs_archive_scan dry
zs_archive_list

Review candidate clusters without changing the world.

Save inactive clusters without reset

zs_archive_scan save
zs_archive_list

Use this when you want archive files first and will reset manually later.

Save and reset inactive clusters

zs_archive_scan reset

Use only after testing dry and confirming the output. This writes archive bundles and then resets eligible source zones.

Restore a returning player's archive elsewhere

zs_archive_list
zs_loadarchive auto_halla_c178 to (20,-3)

Ask the player for the target zone if they have the client zone UI enabled.

Restore a returning player's archive to the original place

zs_archive_restore auto_halla_c178

Use when the original place should be restored exactly.

Safety Notes

  • Start with Dry Run = On and Reset After Save = Off.
  • Test zs_savezone and zs_loadzone on a disposable area before enabling reset runs.
  • Keep backups of the Valheim world files before large cleanup operations.
  • Auto archive only resets zones after saving eligible clusters when configured or commanded to reset.
  • Minimum Pieces Per Cluster and Small Cluster Action decide how small clutter-like clusters are handled.
  • Max Zones Per Run limits the blast radius of one automatic scan.
  • Require Loaded Terrain For Reset can be enabled for stricter terrain-contact safety, but it may skip resets for unloaded zones.

Client Zone UI

If ZoneSavior is installed on a client, the configured Zone UI Toggle Hotkey shows:

  • current zone number
  • a floor boundary line around the current zone

This is useful when a returning player wants to tell an admin where to restore an archive.

Compatibility

ZoneSavior stores new zone bundles using its own zs-zdo-v1 ZDO data payload. Older pre-split or external World Edit Command data formats are not supported.

Homestead is optional. If both Homestead and ZoneSavior are installed, Homestead-built blueprint structures can still be counted by ZoneSavior's WearNTear zone limit safety path.