SANDBOX — this is a test environment. No servers are actually deployed and no real payments are charged.
Source-checkedQuality of life & UI

ValheimChestNaming

by SuperVikingDepartment · for Valheim

给箱子起名字:打开箱子按 N(可在游戏设置里改键),用游戏原生输入框改名,名字显示在悬停提示与箱子界面标题上。Lets you name containers with the games native text dialog; hotkey configurable in-game.

210Downloads
2 mo agoLast updated
BepInExLoaders
ThunderstoreSource

About ValheimChestNaming

From Thunderstore

给箱子起名字:打开箱子按 N(可在游戏设置里改键),用游戏原生输入框改名,名字显示在悬停提示与箱子界面标题上。Lets you name containers with the games native text dialog; hotkey configurable in-game.

ValheimChestNaming

给箱子起名字。

打开箱子后按一个快捷键,就会弹出游戏原生的文字输入框(和给告示牌、传送门起名用的是同一个), 输入什么,箱子就叫什么。名字会显示在准星悬停提示和箱子界面标题上, 准星对着箱子时还能看到一行操作提示,告诉你按哪个键改名。

名字存在箱子自己身上,随存档保存、多人游戏自动同步——不需要配置文件, 也不依赖主机或某个玩家在线。

本 mod 只增加「起名」这一件事:不改任何配方、产量、容器容量或游戏规则。

功能

  • 快捷键改名:准星对着箱子按 N(可在游戏「设置 → 键盘与鼠标」里改键)即可改名——

开没开箱子都行;弹出游戏原生输入框,输入即生效;留空则恢复默认名字。

  • 悬停提示:看着箱子时显示自定义名字,并在原版「按 E 打开」下方追加一行快捷键提示。
  • 界面标题:箱子界面顶部的标题显示自定义名字。
  • 多人同步:名字写进箱子的 ZDO,随存档与联机同步,所有玩家都能看到。
  • 私有区域内才可改名:默认与原版告示牌一致,防止别人给你的箱子乱起名字。

操作

| 按键 | 作用 | | --- | --- | | E | 打开箱子(原版) | | N | 打开改名输入框(开着箱子或准星对着箱子都行;可在游戏设置里改键) | | 回车 | 确认改名 | | Esc | 取消改名 |

准星对着箱子时会看到:

矿石箱
[E] 打开  (长按全部堆叠)
[N] 重命名

安装

方式一:r2modman / Thunderstore Mod Manager(推荐)

  1. 在 mod 管理器里搜索 ValheimChestNaming 安装(会自动带上 BepInEx 依赖)。
  2. 本地导入:把 dist/SuperVikingDepartment-ValheimChestNaming-<版本>.zip 拖进

Settings → Import local mod。

方式二:手动安装(直接启动游戏)

  1. 先装好 BepInExPack for Valheim(denikson-BepInExPack_Valheim)。
  2. 把 ValheimChestNaming.dll 放进 BepInEx/plugins/。
  3. 启动游戏。

> 用 r2modman 启动时,游戏根目录的 BepInEx 会被配置文件的目录覆盖, > 手动放进根目录的插件在 r2modman 下不会生效——请装进对应配置里。

配置

配置文件:BepInEx/config/SuperVikingDepartment.ValheimChestNaming.cfg

| 配置项 | 默认值 | 说明 | | --- | --- | --- | | Enabled | true | 总开关。关闭后不显示提示、不能改名,完全恢复原版。 | | CharacterLimit | 30 | 名字最大长度,同时作为输入框的输入上限。 | | ShowHoverHint | true | 是否在悬停提示里显示快捷键那一行。 | | ShowInContainerTitle | true | 是否把箱子界面顶部标题换成自定义名字。 | | RequireAccess | true | 是否只在私人区域内才能改名。 | | DebugLogging | false | 输出排查日志,正常游玩建议关闭。 |

改名快捷键不在配置文件里:它注册进了游戏原版键位系统,默认 N, 在游戏内「设置 → 键盘与鼠标」列表最下方的「重命名箱子」一行修改, 绑定随游戏自动持久化,「重置按键」会恢复默认 N。

会不会影响成就

不会。本 mod 不设置 Game.isModded、不触碰 m_usedCheats,也不改动任何游戏规则, 只读写箱子自身的名字数据。

兼容范围

  • 所有容器:普通箱子、私人箱子、铁箱、木桶、手推车(只要它本质上是 Container)。
  • 多人游戏:名字由 ZDO 同步,所有客户端可见。
  • 与原版告示牌/传送门的输入框共存:复用同一套 UI,行为一致。

工作原理(简述)

  • 存名字:把名字写进箱子自己的 ZDO(游戏用来存世界对象数据的机制),

做法与原版告示牌 Sign.SetText 完全一致。多人游戏里先取得该箱子的所有权再写, 之后由游戏自身的 ZDO 同步机制广播给其他玩家。

  • 改名字:调用原版 TextInput.instance.RequestText(...),传入本 mod 实现的一个

TextReceiver。玩家按回车后,游戏回调这个对象,本 mod 再写进 ZDO。 完全复用原版输入框,不自己造轮子。

  • 显示名字:
  • 悬停提示:补丁追加在原版 Container.GetHoverText() 的结果后面。
  • 界面标题:补丁挂在 InventoryGui.UpdateContainer() 上——原版正是在这里每帧

重写标题的,补在同一个方法里才能稳定覆盖。

  • 不改 Container.m_name:那是 prefab 上的序列化字段,改了不会存进存档,

还会污染同 prefab 的其它箱子,所以只走 ZDO。

  • 快捷键接入原版键位系统:启动时通过反射把按钮注册进 ZInput(默认绑 <Keyboard>/n,

标记为可改键),并在设置界面 KeyboardMouseSettings.SetupKeys() 后克隆一行原版按键行 加进 m_keys 列表,改键、冲突提示、重置默认、保存/加载全部复用原版逻辑。

  • 两条改名触发路径,天然互斥:
  • 开着箱子:补丁挂在 InventoryGui.Update 上,检测到按键就弹输入框(界面开着时才跑);
  • 没开箱子:插件自身的 Update() 用原版聚合判定 Player.TakeInput() 过滤掉

聊天/控制台/菜单/死亡/传送等场景,再取准星所指的箱子弹输入框;

  • 背包界面开着时 TakeInput() 恒为 false,界面关着时开箱路径拿不到容器,

所以同一按键不会一帧里弹两次框。

  • 按键提示显示当前绑定名:走 Localization.GetBoundKeyString,

在设置界面改键后,悬停提示会自动显示新按键名。

从源码构建

需要 .NET SDK 与 Node(打包器用 Node 写)。

cd ValheimChestNaming
dotnet build -c Release        # 产物:bin/Release/netstandard2.1/ValheimChestNaming.dll
./build-package.sh             # 打包:dist/SuperVikingDepartment-ValheimChestNaming-<版本>.zip
node tools/make-icon.js        # 重新生成 icon.png(可选)

工程默认假定本目录位于游戏根目录下(.. 即 Valheim 安装目录)。 若在别处构建,可覆盖路径:

dotnet build -c Release -p:ValheimDir="C:\...\steamapps\common\Valheim\"

上传到 Thunderstore

zip 内结构如下(Thunderstore 要求元数据在根目录、DLL 走 plugins/ 路由):

manifest.json
README.md
CHANGELOG.md
LICENSE
icon.png
plugins/ValheimChestNaming.dll

已知问题 / 说明

  • 手柄玩家:改名快捷键默认没有对应的手柄绑定(提示行会回落显示键鼠键名)。

可以在设置界面的改键对话框里给该行绑一个手柄键;暂时不用手柄改名的话忽略即可。

  • 若 N 与你的其它 mod 冲突,在游戏「设置 → 键盘与鼠标」里改键即可,无需重启。
  • 名字过长会挤占悬停提示的宽度,建议保持在 30 字符以内。

排查

改装后没反应时,看 BepInEx/LogOutput.log:

  • 启动时会打印每个补丁挂载情况,例如

[ChestNaming][diag] Container.GetHoverText: prefix=0, postfix=1。 postfix=1 表示补丁已生效;若为 0 或出现 未找到 ... 的错误,说明游戏版本不兼容。

  • 把 DebugLogging 设为 true 可看到改名读写的细节日志。

来源与许可

MIT License,详见仓库内 LICENSE。

Highlights

From source data

Loaders

Runs on BepInEx.

Footprint

Rated a light load on a server.

Last update

Its author last shipped an update 2 mo ago.

ValheimChestNaming on Nxeon

From our catalogue
One-click install
Supported on Nxeon Valheim servers, for BepInEx servers. We download it from Thunderstore, place it, and restart the server.
Server type needed
BepInEx
Server load
light
Smallest plan we suggest
Valheim — 2 GB (2 GB RAM). This follows our own load rating above, not a benchmark.
Latest build
1.2.2, released 2026-09-22

Game versions by loader

LoaderGame versionsNewest
BepInEx

From 3 recorded builds of ValheimChestNaming.

Recent builds

BuildReleasedGame versionsLoaders
1.2.22026-09-22n/aBepInEx
1.2.12026-09-22n/aBepInEx
1.2.02026-09-22n/aBepInEx

Dependencies

Declared by the newest build that lists any. Required ones are installed with it on one-click installs.

Run ValheimChestNaming on a Valheim server

Pick a server or deploy a new one above; it is installed in one click.

What kind of mod it is

From the catalog
Listed on Thunderstore as “Content”

Quality of life & UI

Small conveniences, tweaks and interface improvements players notice straight away.

Compatibility

Game
Valheim
Loaders
BepInEx
Requires
One-click install needs a BepInEx server.

Verified at the source

  • ✓ThunderstoreOfficial listing, checked 2026-10-16Open ↗
  • ✓AuthorSuperVikingDepartment, as published on Thunderstore
  • ✓LicenseNot published by the sourceFree

ValheimChestNaming, answered

Generated from the mod’s own source data.

Which loaders does it support?

BepInEx.

Is it free?

Yes. ValheimChestNaming is free to download from Thunderstore.

How do I add it to my Nxeon server?

Use “Add to a server” on this page, or open NxLabs from your dashboard. We install it, restart your server and switch it on.

NxLabs

Run ValheimChestNaming on a Valheim server.

Deploy in about a minute from $6.50 a month, then add ValheimChestNaming in one click.