AutoCloseDoors
Doors you open close themselves a few seconds later: every door, gate and drawbridge, each kind with its own switch and delay. Client-side, everyone sees the door close.
模組介紹 作者原文
AutoCloseDoors
Doors you open close themselves a few seconds later. Every kind of door: wooden doors, gates, drawbridges, dvergr doors, the hexagonal and flametal gates, doors from other mods. Each kind can be switched off or given a delay of its own, in the config file or in game through the ModSettings mod.
How it works
Open a door and walk through. Three seconds later (the default) it closes behind you. Close it yourself before that and nothing more happens: the mod never opens a door, it only closes one that is still open when its time is up. Closing a door that was already open does not start a timer either.
Doors the game itself never closes again are left alone: the sunken crypt gate and any other door that takes a key, and the one-way dungeon doors. The game refuses to close those, so the mod does not try.
Which doors. The mod works on the game's Door component, which every door, gate, hatch and drawbridge in the game is built on, so it does not need a list of doors. When a world loads, every door prefab the game knows gets a section of its own in the config, named after the prefab (wood_door, piece_drawbridge,...). A door from another mod that was missed gets its section the first time you open it.
Settings in game. With the ModSettings mod installed (a separate mod by the same author), the gear button beside Skills in the inventory screen lists this mod. Open it for a General section and one section per door, named by the prefab, with the door's name in each entry's description. Click On/Off to switch a door's auto-close, use the minus and plus buttons or type a number for a delay. Every change is written to the config file at once and applies to the next door you open.
Installation
With a mod manager ( Mod Manager, r2modman, Gale): install it from the mod list, or click Install with App on this page. BepInExPack is installed alongside it. Install ModSettings too if you want to change the settings in game; it is optional.
By hand: install BepInExPack_Valheim first. Then unzip this package and put AutoCloseDoors.dll in Valheim\BepInEx\plugins\AutoCloseDoors\.
Configuration
BepInEx\config\rhenn.autoclosedoors.cfg, created on the first start. The door sections appear after the first world is loaded.
| Key | Default | Meaning |
|---|---|---|
| General.Enabled | true | Master switch. false and no door closes itself. |
| General.CloseDelay | 3 | Seconds after you open a door before it closes itself (0.5 to 60). |
|.Enabled | true | Close this kind of door automatically. |
|.CloseDelay | 0 | Seconds before this kind of door closes (0 to 60). 0 means use General.CloseDelay. |
The buildable vanilla doors and their sections:
| Section | Door |
|---|---|
| wood_door | Wood door |
| wood_gate | Wood gate |
| wood_fence_gate | Wood fence gate |
| darkwood_gate | Darkwood gate |
| iron_grate | Iron gate |
| stave_gate | Stave gate |
| piece_dvergr_wood_door | Dvergr wood door |
| piece_drawbridge | Drawbridge |
| piece_drawbridge_log | Log drawbridge |
| piece_hexagonal_door | Hexagonal gate |
| flametal_gate | Flametal gate |
| ashwood_door | Ashwood door |
| piece_cloth_hanging_door, _blue, _blue2 | Cloth hanging doors |
Doors found in the world (dungeon doors, dvergr town doors) get sections named by their prefab too.
[General]
Enabled = true
CloseDelay = 3
[wood_door]
Enabled = true
CloseDelay = 0
[wood_gate]
Enabled = true
CloseDelay = 8
Multiplayer
Client-side only. Only the player who wants doors to close behind them needs the mod. The server needs nothing, and other players need nothing: the close is the same "use door" message the game sends when you press the Use key, handled by whoever runs that door (normally you, as the nearest player), and everyone sees the door close as usual. Doors other players open are not touched, and neither are doors that were already open when you arrived.
When another player stands closer to the door than you and so runs it, the close takes one network round t
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。 多人連線時,主機與所有用戶端需要安裝一致的模組。
下面這些內容需要先安裝,否則該模組不會生效: