Husbandry
Big herds without the frame cost. Idle tames think less often, the breeding system stops asking the same question sixty times, and animals in zones nobody has loaded heal and slowly get on with it.
模組介紹 作者原文
Husbandry
Keeping a lot of animals should not cost what it costs.
This does three things, and the first two are free — they change what the game spends, not
what it does.
Idle tames think less often
Valheim runs every AI in the world every physics frame. Fifty tames is fifty full AI ticks
fifty times a second, whether any of them is doing anything or not.
So a tame that is standing around — tamed, not alerted, nothing targeted, following
nobody, and a fair distance from you — thinks one tick in four, or one in ten further out.
Three things this deliberately does not do:
- It never touches anything hostile. The test is the game's own tamed flag.
- It never touches anything busy. Alerted, in a fight, or at your heel means full rate.
- It does not slow animals down. UpdateAI decides; Character moves. A throttled wolf
walks, falls and stands on the ground at the full physics rate — it just changes its mind
less often, and the time it skipped is handed to the next tick, so every timer inside it
still lands where it would have.
Breeding stops asking the same question sixty times
The single most expensive thing a large herd does is count itself. Vanilla's breeding check
walks every AI in the world, comparing object names as strings and doing a GetComponent
per match — up to four times per animal, per round. That is the only cost in a tame that grows
with the square of the herd. Thirty wolves is about three and a half thousand string
compares a round; sixty is fourteen thousand.
Husbandry takes one shared population count for everybody, buckets it by species, and puts a
cap check in front of the expensive part. At the default settings the cap is the game's
own cap, so nothing about breeding changes — a full pen just stops paying to rediscover that
it is full.
Nothing is ever culled. The cap stops births; it never causes a death.
Animals you left somewhere get looked after
Tames in zones nobody has loaded slowly heal, and pairs slowly get on with it.
The breeding here does not spawn anything. It sets the same pregnancy stamp the game
sets, and the game itself gives birth — right level, right tamed flag, its own cap check — on
the first frame somebody loads the zone. So the herd grows while you are away; it just comes
through the front door. A pen left a long time delivers when you arrive.
Worth knowing: unloaded tames already get hungry in vanilla, because the feeding timer is
a world-time stamp rather than a loaded timer. That is not something this mod adds. It only
honours it when deciding whether an unattended pair may breed.
This half runs only where the whole world lives — a dedicated server, a host, or
single-player. A plain client is only sent the animals near it, so it could not do this if it
wanted to. On a server, nobody else needs the mod.
Console
husbandry
What it thinks it is doing: ticks thought and skipped, the census, rounds skipped at the cap,
and what the offline sweep is up to.
Settings
Everything is in BepInEx/config/dafini.husbandry.cfg. The ones worth knowing:
| Setting | Default | What it does |
|---|---|---|
| ThrottleIdle | on | Let idle tames think less often |
| NearRange | 24m | Inside this, nothing is throttled at all |
| FarSkip | 10 | One tick in this many, for idle tames far off |
| CheapCensus | on | One shared population count instead of one per animal |
| SoftCap | 0 | 0 uses the game's own cap. Can only ever tighten it |
| OfflineHealing | on | Unattended tames slowly heal |
| OfflineBreeding | on | Unattended pairs slowly get on with it |
| CourtingInterval | 180s | How slowly. This is the away-from-home breeding rate |
If something behaves oddly, ThrottleIdle = false turns off the only part that changes
timing, and CheapCensus = false returns breeding to vanilla's own counting.
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。 多人連線時,主機與所有用戶端需要安裝一致的模組。
下面這些內容需要先安裝,否則該模組不會生效: