LethalStar-DieForTheMusic icon

DieForTheMusic

Host-only: when all players are dead the host plays a chosen track to everyone via mic uplink, plus optional local playback. Track drop-down, play mode, volume, chat notice, test/pause buttons, EN+CN UI with editable Lang files. No music bundled.

Last updated a day ago
Total downloads 25
Total rating 0 
Categories Mods Misc Audio Server-side AI Generated
Dependency string LethalStar-DieForTheMusic-1.0.0
Dependants 0 other packages depend on this package

This mod requires the following mods to function

AinaVT-LethalConfig-1.4.6 icon
AinaVT-LethalConfig

Provides an in-game config menu for players to edit their configs, and an API for other mods to use and customize their entries.

Preferred version: 1.4.6
BepInEx-BepInExPack-5.4.2305 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2305

README

DieForTheMusic 1.1.0

Host-only music on a team wipe: the host plays a chosen track through the in-game voice path, so clients hear it without installing anything. No audio is bundled.

  • English documentation: sections 1–6. / 中文文档:见「中文」一节。
  • Log & diagnostic reference (bilingual): appendix at the end. / 日志与诊断串对照表:见文末附录。

1. Introduction

DieForTheMusic plays a track you choose the moment every player on the crew is dead. The host machine does the work: the music is pushed through the host's own voice uplink, so every other player hears it with no mod installed, and an optional local playback lets the host hear the same track at the same time.

Core features:

  • Trigger is allPlayersDead itself, checked every 0.25 s — no need to wait for the ship to leave.
  • Two output paths: mic-uplink for the whole lobby, plus optional local speaker playback for the host.
  • Track list built from two sources, [mod music] folders and the mod's own Music folder, with a prefix in the drop-down so you can tell them apart.
  • Per-channel volume: one slider for what other players hear, one for the host's own speakers.
  • Two play modes: stop as soon as a new run starts, or always play to the end.
  • Pause / resume, test play and clear-progress buttons, all inside LethalConfig.
  • Chat announcement for every playback, so the crew knows what is happening.
  • English and Simplified Chinese UI, driven by editable plain-text language files.

2. AI Disclosure

Parts of this project were produced with the help of AI tools, and we would rather say so than hide it.

  • Code: the plugin source was written, refactored and reviewed with an AI assistant acting as a coding aid. Every patch target, config key and game API used here was verified against the actual assemblies and then compiled and run, but the drafting and a large share of the refactoring were AI-assisted.
  • Documentation: this README, CHANGELOG.md and the placement note inside Music were drafted with AI assistance and then checked line by line against the source code.
  • Music: no AI-generated audio is included. The package ships no music at all.

The AI was a tool, not an author of record. Design decisions, testing in game and the final published build are the maintainer's responsibility. If you find a statement here that does not match the code, the code is right and the document is a bug — please report it.

3. Installation & Usage

Requirements

Item Version / note
Lethal Company Steam PC build
BepInEx 5.4.2305 (BepInExPack)
LethalConfig 1.4.6, by AinaVT (listed in manifest.json so mod managers install it; the plugin only takes a soft dependency — without it everything still works, only the in-game menu is missing)

Install

  1. Install BepInEx 5.4.2305 and LethalConfig into the game folder.
  2. Extract this package so that BepInEx\plugins\BiliBiliMOXL-DieForTheMusic\ appears next to your other plugins.
  3. Start the game. The host's log should contain DieForTheMusic <version> loaded.

Only the host needs the mod. Friends who join do not install anything; they hear the music through normal voice chat.

Where the music goes

Drop-down prefix Folder that is scanned
[mod music] Any folder under BepInEx whose name contains DieForTheMusic (including one sitting directly in BepInEx or in BepInEx\plugins), root level plus one sub-folder level
[this mod] <plugin folder>\Music\, root level plus one sub-folder level
  • Scanned formats: mp3, wav, ogg, flac, m4a, aac, aiff, aif. Decoding is reliable for mp3 / wav / ogg; everything else is handed to Unity as MPEG audio, so a flac or aiff file may fail to load — use the test-play button to check before a real wipe.
  • Only the folder root and one level of sub-folders are scanned. Deeper nesting is ignored.
  • A file reachable from both sources is listed once, and the [mod music] entry wins.
  • The package ships no music files. Create or fill Music\ yourself; the folder only contains Music-Placement-音乐放置说明.txt, a bilingual placement note.
  • After adding or renaming files, restart the game: the track list is scanned once at startup, so new files only show up in the drop-down on the next launch.

Configuration (LethalConfig, section "Team-wipe music")

Option Type Default Meaning
UI language drop-down auto auto follows Steam / system language; or pin a language file name from Lang (e.g. zh-CN, en). Requires restart.
Enable team-wipe music toggle on Off means nothing is ever triggered.
Team-wipe track drop-down first available track Which track to play. If the stored entry disappears, it falls back to the first available track.
Mute host microphone while playing toggle off Off: music and the host's voice are mixed. On: only the music is sent.
Also play locally on the host toggle on Off means only the other players hear it.
Host local volume slider 0.7 0–1, host speakers only.
Volume for other players slider 0.7 0–1, uplink path only.
Play mode drop-down mode 1 Mode 1: pause as soon as a new run starts. Mode 2: always play the whole track even after a new run starts.
Pause / resume this team-wipe music button — First press pauses, second press resumes. Current playback only.
Test-play team-wipe music button — Plays the selected track immediately, without waiting for a wipe.
Clear playback progress button — Pauses and resets the position. Nothing auto-plays again until the next wipe.

Values are applied through the config-changed callback, so volume, mute-mic and local-play switches take effect immediately while a track is playing. The language option is the only one that needs a restart.

Chat announcement

Every playback starts with a broadcast to the whole lobby. The string itself is Chinese, because the mod's chat text is not translated (the language files only drive the config UI):

【团灭音乐】检测到团灭!开始播放【Rainlove (VER4Feng)】

Meaning: [team-wipe music] team wipe detected, now playing [track]. The text is sent from the host with HUDManager.AddTextToChatOnServer, so clients see it without the mod. A manual test play announces too, which makes it easy to confirm that other players can actually hear you.

Language files

BepInEx\plugins\BiliBiliMOXL-DieForTheMusic\
├─ DieForTheMusic.dll
├─ Lang\
│  ├─ zh-CN.txt
│  └─ en.txt
└─ Music\
   └─ Music-Placement-音乐放置说明.txt
  • Resolution order when the language option is auto: Steam game language, then Unity Application.systemLanguage, then zh-CN as fallback. Codes are normalised (schinese/zh/zh-hans → zh-CN, tchinese/zh-tw → zh-TW, english/en-us → en).
  • Loading order: built-in Chinese, then Lang\zh-CN.txt, then Lang\<current>.txt. Later files override key by key, and any key missing from a file falls back to the built-in Chinese, so a half-finished translation never shows raw key names.
  • Format is one key=value per line; # or ; starts a comment; \n and {0} placeholders are supported. Only change the right side of = — keys, the [mod music] / [this mod] prefixes, config keys and drop-down data values are data, not text, and changing them breaks existing configs.

Troubleshooting

Every log line is English and carries a scope prefix — [CorpseMusic], [ConfigMenu] or [Lang]. The four lines below are the ones you will look for most often; the appendix at the end of this page lists every line the mod can write, with meaning and action.

Keyword in BepInEx\LogOutput.log Meaning
[CorpseMusic] Voice uplink injection patch attached: The Harmony prefix on the Dissonance encoder is in place.
[CorpseMusic] Playback started ( Trigger worked; the reason, track name and duration follow.
[CorpseMusic] Host voice mute temporarily lifted The host had voice chat muted; it was unmuted for the playback and restored afterwards.
[CorpseMusic] Local playback started: The host's own speakers are playing (volume and state included).

Known limits:

  • The music travels through the game's Opus voice codec, so it sounds like in-game voice chat, not like a music player.
  • In-game voice chat must be functional (Dissonance service online). A microphone that is disabled at the OS level cannot be used for the uplink; the log warns about it.
  • The track must be decoded by the time the wipe happens. The mod pre-warms the selected track roughly once per second, but switching a track and wiping in the same instant can still be too fast for a very short file — test-play once to warm it up.

4. How It Works

Lethal Company has no music channel of its own, so the mod borrows the host's voice path. The host is the only peer that talks to everyone by design, which is why this is a host-only mod.

CorpseMusicController  ── 0.25 s poll of StartOfRound.allPlayersDead
  └─▶ CorpseMusicLoader     decode → mono PCM, cached per track path
        ├─▶ LocalMusicPlayer       AudioSource (2D, bypass) → host speakers
        └─▶ UplinkMusicPlayer.Inject   resample → mix → clamp
              └─▶ Harmony prefix on Dissonance EncoderPipeline.ReceiveMicrophoneData
                    └─▶ normal Dissonance uplink (Opus) → all players (mod not required)
  1. Trigger. CorpseMusicController ticks every 0.25 s and reads StartOfRound.allPlayersDead; the death flag itself — not the ship-leave event — starts a session, so playback begins while the wipe is still happening. The idle tick pre-warms the selected track about once per second, so a wipe costs no disk read.
  2. Injection point. A Harmony prefix sits on Dissonance.Audio.Capture.EncoderPipeline.ReceiveMicrophoneData(ArraySegment<float>, WaveFormat). The type is internal, so it is resolved by reflection and its MethodInfo is cached once; if missing, the mod warns and runs without the uplink path. That buffer is exactly where Unity hands microphone samples to the encoder.
  3. Channel and mute state. Dissonance keeps the capture pipeline connected only while the local user is unmuted and a channel is open, so during playback the mod sets DissonanceComms.IsMuted to false, forces VoiceBroadcastTrigger.Mode to Open, calls OpenChannel() and re-checks about every 0.5 s; afterwards the original mode and mute state are restored, and a missing capture object triggers one ResetMicrophoneCapture().
  4. Mixing and resampling. UplinkMusicPlayer holds the mono PCM plus a floating position; the audio thread advances it and writes a linearly interpolated sample into the buffer about to be encoded, scaled by the uplink volume and clamped to ±1. Resampling is incremental (no per-frame allocation, buffer bound hoisted, mono fast path), shared state is lock-guarded, and the class touches no Unity API, so it is audio-thread safe.
  5. Local playback. The uplink only feeds the encoder and the host cannot hear their own transmission, so a second AudioSource plays the same PCM with spatialBlend = 0 and effects, listener effects and reverb zones bypassed. The AudioClip is built once per track during idle time, and pause, resume and clear-progress act on both paths.
  6. Decoding and configuration. Files are decoded on the main thread with UnityWebRequestMultimedia and cached per track path; the file:/// address is percent-escaped byte by byte, and a path that still fails is copied to an ASCII-only mirror and decoded once more. Config values are mirrored into static fields by the SettingChanged callback, and LethalConfigBridge resolves LethalConfig types and members once before registering the localized names.
  7. Optional wipe-flight logging. WipeFlightPatch adds a Postfix to StartOfRound.ShipLeaveAutomatically(bool) that only logs an all-dead automatic departure. It is diagnostic only: playback is decided by the poll above, and a patch that fails to attach changes nothing.

5. License

MIT. See the LICENSE file for the full text; copyright holder is MaverickMOXL.

In short:

  • You may use, copy, modify, merge, publish, distribute, sublicense and sell copies of this software, and you may build your own version on top of it.
  • You must keep the copyright notice and the permission notice in all copies or substantial portions of the software.
  • The software is provided "as is", without warranty of any kind. If you sell it, redistribute it or make derivative works, you do so entirely at your own risk: any consequence — including account or storefront penalties, legal claims from third parties, or damage caused by modified builds — is your responsibility alone. The author accepts no liability whatsoever.
  • Nothing third-party is redistributed: the package holds only this plugin's own DLL, its Lang files, the placement note and the icon, with no game files, game assets, libraries or audio. This is an unofficial mod, not affiliated with or endorsed by Zeekerss, Thunderstore, Dissonance or the Lethal Company modding community.
  • Music is not covered by this license and is not distributed with the package. Use only audio you have the right to use.

6. Credits & Contributions

  • Thanks to everyone who tested early builds, sat through repeated wipes to check whether the music was audible on the client side, and reported what broke. Several of the current defaults (local playback on, 0.7 volume, the pause/clear buttons) came straight out of that feedback.
  • Thanks to the Lethal Company modding community for BepInEx, HarmonyX, Dissonance and LethalConfig, and to AinaVT for LethalConfig specifically — the whole configuration UI is built on it.
  • Bug reports, translation files and pull requests are welcome. When reporting a problem, please attach BepInEx\LogOutput.log and state whether you were the host, which track format you used, and whether in-game voice chat worked at that moment.

中文

一、模组介绍

全员死亡的那一刻,房主会播放你事先选好的曲目:音乐经房主自己的语音上行链路发出去,其他玩家不装模组也能听到;同时房主本机可以另开一路本地播放,自己也能听到同一首。

核心特性:

  • 触发条件是 allPlayersDead 本身,每 0.25 秒检查一次,不必等飞船起飞;
  • 双通道出声:语音上行给全房间,本地扬声器给房主;
  • 曲目来自 [模组音乐] 与 [本模组] 两路扫描,下拉框带前缀区分;
  • 两路独立音量:其他玩家听到的音量、房主本地音量各一个滑块;
  • 两种播放模式:新开一局就停,或无论是否新开一局都播完;
  • 暂停 / 继续、试播、清空进度三个按钮,全部在 LethalConfig 里;
  • 每次播放都会在聊天栏广播一条提示,队友知道发生了什么;
  • 中英双语界面,文案由可编辑的纯文本语言文件驱动。

二、AI 披露

本项目部分内容在 AI 工具辅助下完成,这里如实说明:

  • 代码:插件源码在 AI 助手辅助下起草、重构与复查。文中涉及的每个补丁目标、配置键与游戏 API 都对实际程序集做过核对,并经过编译与进游戏验证,但初稿撰写和相当一部分重构工作由 AI 参与完成。
  • 文档:本 README、CHANGELOG.md 以及 Music 目录里的放置说明均由 AI 辅助起草,再逐条与源码核对。
  • 音乐:不含任何 AI 生成音频,发布包内不含任何音乐文件。

AI 是工具而不是署名作者:设计取舍、游戏内测试与最终发布构建由维护者负责。如果发现文档与代码不一致,以代码为准,并把文档当作 bug 反馈。

三、安装与使用

依赖

项目 版本 / 说明
Lethal Company Steam PC 版
BepInEx 5.4.2305(BepInExPack)
LethalConfig 1.4.6,作者 AinaVT(manifest.json 里列为依赖,方便模组管理器自动安装;插件本身只做软依赖——没有它功能照常,只是没有游戏内菜单)

安装

  1. 在游戏目录装好 BepInEx 5.4.2305 与 LethalConfig;
  2. 解压本包,使 BepInEx\plugins\BiliBiliMOXL-DieForTheMusic\ 出现在插件目录下;
  3. 启动游戏,房主日志中应出现 DieForTheMusic <version> loaded: wipe music (host only; clients do not need this mod). UI language: … (后接实际语言代码与语言目录)。

只有房主需要安装。加入房间的朋友什么都不用装,通过正常语音聊天就能听到音乐。

音乐放在哪里

下拉前缀 扫描目录
[模组音乐] BepInEx 下所有名字含 DieForTheMusic 的文件夹(含直接放在 BepInEx 根目录或 plugins 下的),取根目录 + 一层子文件夹
[本模组] <插件目录>\Music\,取根目录 + 一层子文件夹
  • 收录格式:mp3、wav、ogg、flac、m4a、aac、aiff、aif。解码可靠的是 mp3 / wav / ogg;其余格式统一按 MPEG 交给 Unity 解码,flac、aiff 可能加载失败,建议先用「试播」按钮确认,别等到团灭才发现;
  • 只扫根目录和一层子文件夹,更深的嵌套不识别;
  • 同一个文件被两路同时扫到时只列一次,且优先保留 [模组音乐];
  • 包内不含任何音乐文件,Music 目录里只有一份中英双语放置说明 Music-Placement-音乐放置说明.txt,曲子请自己放;
  • 新增或改名后需要重启游戏:曲目列表只在启动时扫描一次,下次启动才会出现在下拉框里。

配置项(LethalConfig,分组「团灭音乐」)

配置项 类型 默认 说明
界面语言 下拉 auto auto 按 Steam / 系统语言自动匹配;也可锁定 Lang 里的语言文件名(如 zh-CN、en)。改后需重启
启用团灭音乐 开关 开 关掉就完全不触发
团灭音乐曲目 下拉 首个可用曲目 选择播放哪一首;条目失效时自动回退到首个可用曲目
播放时屏蔽房主麦克风 开关 关 关:音乐与房主说话声一起传出;开:只传出音乐
房主本地也播放(自己也能听到) 开关 开 关掉则只有其他玩家能听到
房主本地播放音量 滑块 0.7 0~1,只影响房主本机
其他玩家听到的音量 滑块 0.7 0~1,只影响上行那一路
播放模式 下拉 档位一 档位一:新开一局就暂停;档位二:不论是否新开一局都播完才结束
暂停或继续本次团灭音乐 按钮 — 点一次暂停,再点一次继续,仅影响本次播放
试播团灭音乐 按钮 — 不等团灭,立即试播当前曲目
清空播放进度 按钮 — 暂停并把进度清零,本局不再自动播放,下次团灭从头播放

配置值经变更回调即时生效:音量、屏蔽麦克风、本地播放开关在播放中改动都会马上起作用,只有语言项需要重启游戏。

聊天栏广播

每次开始播放,房主会向全房间广播一条消息:

【团灭音乐】检测到团灭!开始播放【Rainlove (VER4Feng)】

由房主端 HUDManager.AddTextToChatOnServer 发出,其他玩家不装模组也能看到。手动「试播」同样会广播,方便确认别人是否真的听到了。

语言文件

BepInEx\plugins\BiliBiliMOXL-DieForTheMusic\
├─ DieForTheMusic.dll
├─ Lang\
│  ├─ zh-CN.txt
│  └─ en.txt
└─ Music\
   └─ Music-Placement-音乐放置说明.txt
  • auto 时的判定顺序:Steam 游戏语言 → Unity Application.systemLanguage → 兜底 zh-CN;结果会归一成短代码(schinese/zh/zh-hans → zh-CN,tchinese/zh-tw → zh-TW,english/en-us → en);
  • 加载顺序:内置中文 → Lang\zh-CN.txt → Lang\<当前语言>.txt,后者逐键覆盖前者,文件里缺失的键自动沿用内置中文,翻一半也不会露出键名;
  • 格式为一行一条 键=文本,# 或 ; 开头是注释,支持 \n 与 {0} 占位符。只改等号右边:键名、[模组音乐] / [本模组] 前缀、配置项 Key 与下拉数据值属于数据而非文案,改了会拆散已有配置。

排查

BepInEx\LogOutput.log 中按关键字搜索,所有日志均为英文,前缀只有 [CorpseMusic]、[ConfigMenu]、[Lang] 三种;下面只列最常见的四条,完整清单(含义 + 处理建议)见文末附录。

关键字 含义
[CorpseMusic] Voice uplink injection patch attached: 语音编码注入链路就绪
[CorpseMusic] Playback started ( 触发成功,后面跟着触发原因、曲目名与时长
[CorpseMusic] Host voice mute temporarily lifted 房主原本静音,播放时临时打开并在结束后还原
[CorpseMusic] Local playback started: 房主本机扬声器已出声(含音量与状态)

已知限制:

  • 音乐走游戏的 Opus 语音编码,音质等同游戏内语音,不是播放器音质;
  • 游戏内语音聊天必须可用(Dissonance 服务在线);系统层面禁用麦克风设备则无法上行,日志会给出警告;
  • flac/aiff 等非 mp3/wav/ogg 格式由 Unity 按 MPEG 解码,能否成功取决于游戏音频后端,失败时日志会写 [CorpseMusic] Decode failed ( 与 [CorpseMusic] Mirror decode also failed:,先用试播验证;
  • 团灭瞬间曲目必须已解码完成。模组空闲期约每秒预热一次选定曲目,但「刚换曲目就团灭」遇到极短文件仍可能来不及,先试播一次即可预热。

四、实现方法

游戏本身没有音乐通道,模组借用房主的语音链路;房主是唯一默认对全体说话的节点,这也是本模组只装在房主端的原因。(流程图见上方英文节)

  1. 触发。 CorpseMusicController 每 0.25 秒 tick 一次,读取 StartOfRound.allPlayersDead;触发源是死亡标记本身而不是飞船起飞事件,所以团灭过程里就开始出声。空闲期同一 tick 约每秒预热一次选定曲目,团灭瞬间不再读盘。
  2. 注入点。 Harmony 前缀挂在 Dissonance.Audio.Capture.EncoderPipeline.ReceiveMicrophoneData(ArraySegment<float>, WaveFormat) 上。该类型是 internal,用反射定位并把 MethodInfo 只解析一次后缓存;找不到目标只打警告,其余功能照常,仅缺上行一路。
  3. 通道与静音状态。 Dissonance 只在「本机未静音 + 至少一个通道打开」时保持采集管线连接,所以播放期间把 DissonanceComms.IsMuted 置为 false、把 VoiceBroadcastTrigger.Mode 切到 Open、调用 OpenChannel(),并约每 0.5 秒复查;结束后还原房主原本的说话模式与静音状态,采集对象缺失时调用一次 ResetMicrophoneCapture()。
  4. 混音与重采样。 UplinkMusicPlayer 持有单声道 PCM 与浮点读取位置,音频线程每次调用推进该位置,把线性插值样本按上行音量叠加进即将编码的缓冲并硬限幅到 ±1。重采样增量式:每帧不分配、缓冲上界提到循环外、单声道走快路径;共享状态用锁保护,且不触碰 Unity API,因此可在音频线程安全调用。
  5. 本地播放。 上行只喂编码器,房主听不到自己上行的声音,所以另起一路 AudioSource 播放同一份 PCM:spatialBlend = 0,旁路特效、监听特效与混响区域。AudioClip 按曲目只在空闲期构建一次并缓存;暂停、继续与清空进度同时作用于两路。
  6. 解码与配置。 音频在主线程用 UnityWebRequestMultimedia 解码并按路径缓存;file:/// 地址逐字节做百分号转义,仍失败的文件镜像到纯 ASCII 目录再解码一次。配置值由变更回调同步到静态字段,LethalConfigBridge 只解析一次 LethalConfig 类型与成员句柄,再用语言表里的本地化名称注册条目。
  7. 可选的起飞日志补丁。 WipeFlightPatch 给 StartOfRound.ShipLeaveAutomatically(bool) 加 Postfix,只在「全员死亡导致自动起飞」时写一条日志,纯诊断用途,挂不上不影响任何功能。

五、协议(MIT)

本项目采用 MIT 协议,全文见 LICENSE,版权方为 MaverickMOXL。

简言之:

  • 你可以自由使用、复制、修改、合并、发布、分发、再授权乃至销售本软件,也可以在它之上做二次创作;
  • 你需要在所有副本或实质性部分中保留版权声明与许可声明;
  • 软件按「原样」提供,不附带任何担保。若你将其售卖、再分发或制作衍生作品,一切风险由你自负:由此产生的任何后果(包括平台或商店处罚、第三方索赔、改动版本造成的损失)均由你承担,作者不承担任何责任;
  • 包内不分发任何第三方内容:只有本插件自己的 DLL、Lang 语言文件、放置说明与图标,不含游戏文件、游戏素材、第三方库或音频。本模组为非官方作品,与 Zeekerss、Thunderstore、Dissonance 及 Lethal Company 模组社区无隶属或背书关系。
  • 音乐不在本协议覆盖范围内,也不随包分发;请只使用你拥有使用权的音频。

六、贡献与致谢

  • 感谢所有参与早期测试的朋友:反复送团灭、在客户端确认到底有没有声音、把坏掉的地方一条条报回来。现在的几个默认值(本地播放默认开、音量 0.7、暂停与清空按钮)基本都是从这些反馈里定下来的。
  • 感谢 Lethal Company 模组社区提供的 BepInEx、HarmonyX、Dissonance,以及 AinaVT 的 LethalConfig——整套配置界面都建立在它之上。
  • 欢迎提交问题、翻译文件与改进:反馈问题时请附上 BepInEx\LogOutput.log,并说明自己是否为房主、曲目是什么格式、当时游戏内语音聊天是否正常。

Appendix: Log & diagnostic reference / 日志与诊断对照表

Lines go to BepInEx\LogOutput.log with a scope prefix: [CorpseMusic], [ConfigMenu] or [Lang]. Log line is byte-identical to the source literal (<...> = runtime value, {0}/{1} = string.Format placeholders); all are Info unless marked Warn or Error.

Startup, version and language / 启动、版本与语言

Log line Meaning 中文含义 处理 / Action
DieForTheMusic <version> loaded: wipe music (host only; clients do not need this mod). UI language: <code>, language directory: <dir> Mod loaded; shows effective UI language and where language files are read from 模组已加载,并给出实际生效的界面语言与语言目录 没有这行说明 DLL 不在扫描目录,或日志更早处已有 BepInEx 报错
[Lang] UI language changed to: <code> (restart the game to apply). Language files take effect on the next start 语言文件在下次启动才生效 重启游戏
[Lang] Loaded text: <file> (<n> entries). Entry count as loaded, after merging over the built-in table 覆盖内置文案后实际载入的条目数 条数与预期不符,检查重复或格式错误的 键=文本 行
[Lang] Failed to enumerate language files: <error> (Warn) No custom language files were loaded; built-in text is used 未加载任何自定义语言文件,回落到内置文案 检查目录权限与 Lang 目录是否存在
[Lang] Failed to locate language file (<code>): <path> (Warn) Falls back to built-in text 回落到内置文案 语言代码填语言文件名(不含 .txt),如 zh-CN、en
[Lang] Failed to read language file: <file> → <error> (Warn) That file is skipped 该文件被跳过 用 UTF-8 重新保存文件
[ConfigMenu] Registered <n> UI items with LethalConfig. Number of entries, sliders and buttons exposed in game 在游戏内呈现的配置项、滑块与按钮总数 无需处理
[ConfigMenu] LethalConfig not detected; skipping menu registration (config file still works). No in-game menu; the .cfg file still works 没有游戏内菜单,.cfg 配置照常生效 想要菜单就装 LethalConfig
[ConfigMenu] LethalConfigManager.AddConfigItem(BaseConfigItem, Assembly) not found. (Warn) Registration aborted 注册中止 反馈 LethalConfig 版本
[ConfigMenu] Missing <field>; skipping this item. (Warn) That single item is skipped, the rest still register 只跳过这一项,其余照常注册 反馈 LethalConfig 版本
[ConfigMenu] Failed to register item (<key>): <error> (Warn) That item does not appear in the menu 该项不会出现在菜单里 看日志里的具体异常
[ConfigMenu] Button callback not found: <name> (Warn) The button does nothing 按钮点了没反应 反馈 LethalConfig 版本
[ConfigMenu] LethalConfig registration failed (functionality unaffected): <error> (Warn) Menu missing, mod behaviour unchanged 没有菜单,但模组功能不受影响 带上日志反馈
[ConfigMenu] Pause button error: <error> (Warn) That click did nothing 这次点击无效 重试;反复出现则带上日志反馈
[ConfigMenu] Test-play button error: <error> (Warn) No test playback happened 没有发生试播 重试;反复出现则带上日志反馈
[ConfigMenu] Reset progress button error: <error> (Warn) Progress was not cleared 进度未清空 重试;反复出现则带上日志反馈
[CorpseMusic] Uplink volume for other players set to: <0.00> The value actually used by the injection path 上行注入实际使用的音量值 无需处理

Track scanning, decoding and switching / 曲目扫描、解码与切换

Log line Meaning 中文含义 处理 / Action
[CorpseMusic] Failed to scan the plugins subdirectory: <error> (Warn) The [mod music] channel may be incomplete 「模组音乐」通道可能不完整 确认 plugins 目录存在且可读
[CorpseMusic] Failed to scan the mod music directory: <path> → <error> (Warn) That folder contributes no tracks 该目录不贡献任何曲目 检查权限与目录名
[CorpseMusic] Failed to scan the track subdirectory: <path> → <error> (Warn) Tracks inside it are missed 其中的曲目被漏掉 扁平化目录或修权限
[CorpseMusic] Failed to scan the track directory: <path> → <error> (Warn) The [this mod] channel is empty 「本模组」通道为空 检查 DLL 同级的 Music 目录
[CorpseMusic] Configured track is no longer valid: <track>, falling back to: <track> The first usable track is selected instead 自动改为第一个可用曲目 加完文件后在菜单里重新选一次
[CorpseMusic] Track switched to: <track> New selection accepted and caches invalidated 接受新选择并让旧缓存失效 无需处理
[CorpseMusic] Failed to handle track switch: <error> (Warn) Old track state may persist until restart 旧曲目状态可能残留到重启 重启游戏
[CorpseMusic] Decoding track: <path> Shows exactly which file is being decoded 明确指出正在解码哪个文件 无需处理
[CorpseMusic] Cannot build local file URL: <path> (Warn) That file is unusable 该文件不可用 把文件放到纯 ASCII 路径
[CorpseMusic] Decode failed (<error>), retrying with an ASCII mirror: <path> (Warn) A copy is being made under an ASCII-only path and retried once 正在把文件复制到纯 ASCII 路径再试一次 多为中文/特殊字符路径,改用纯英文目录
[CorpseMusic] Failed to create ASCII mirror: <error> (Warn) No retry is possible for this file 该文件无法重试 换 mp3/wav/ogg 并放到 ASCII 路径
[CorpseMusic] Mirror decode also failed: <error> (Warn) The file is treated as unusable 该文件被视为不可用 转成 mp3/wav/ogg 后试播
[CorpseMusic] Failed to read PCM data: <error> (Warn) Playback is skipped for this track 该曲目跳过播放 转换格式后试播
[CorpseMusic] Decoded: {0} ({1} Hz, {2:0.0}s) Track name, sample rate and duration 曲目名、采样率、时长 无需处理

Trigger decisions: no track, duplicates, local-player state / 触发判定:无曲目、重复触发、本机状态

Log line Meaning 中文含义 处理 / Action
[CorpseMusic] No usable track found. Put audio files into <dir> or any folder under BepInEx whose name contains DieForTheMusic, then restart the game. Nothing can be played 没有任何可播放的曲目 按提示目录放入 mp3/wav/ogg 后重启
[CorpseMusic] Already playing; ignoring duplicate trigger: <reason> The duplicate is ignored, the running session continues 重复触发被忽略,当前播放继续 无需处理
[CorpseMusic] Track still decoding; skipping this playback: <reason> No playback this wipe 本次不播放 提前用一次试播预热
[CorpseMusic] Local player not ready; the host will not hear the music locally. (Warn) Uplink continues, host speakers stay silent 上行照常,房主本机没有声音 等本局加载完成
[CorpseMusic] Host local playback disabled by config; only other players will hear it. Expected behaviour with the option disabled 关闭该选项后的正常表现 想让房主也听到就打开「房主本地也播放」
[CorpseMusic] Scheduler exception: <error> (Warn) That tick was skipped 该次 tick 被跳过 带上日志反馈

Playback start, local playback, pause, resume and stop / 播放开始、本地播放、暂停与结束

Log line Meaning 中文含义 处理 / Action
[CorpseMusic] Playback started ({0}): {1}, duration {2:0.0}s {0} is the trigger reason, {1} the track, {2} the duration {0} 为触发原因,{1} 为曲目,{2} 为时长 无需处理
[CorpseMusic] Local playback skipped: track data unavailable. Only the uplink plays 只有上行在播 该曲目解码失败,检查解码相关日志
[CorpseMusic] Local playback skipped: AudioSource not ready. Only the uplink plays 只有上行在播 等下一局再试
[CorpseMusic] Local playback started: {0}, volume {1:0.00}, state={2} Track, volume and state as playing 曲目、音量,state 为 playing 无需处理
[CorpseMusic] Failed to create local AudioClip. (Warn) Host hears nothing, uplink unaffected 房主听不到,上行不受影响 带上该行日志反馈
[CorpseMusic] Failed to fill local AudioClip samples. (Warn) Host hears silence on this track 房主这一路静音 转换格式后重试
[CorpseMusic] AudioClip prepared for local playback: {0} Hz, {1:0.0}s Clip cached, no allocation at wipe time 片段已缓存,团灭瞬间不再分配内存 无需处理
[CorpseMusic] Local AudioClip preparation failed: <error> (Warn) The next wipe prepares on the spot 下次团灭时改为现场准备 看具体异常
[CorpseMusic] Wipe music paused from the config UI. Both paths paused 两路同时暂停 再点一次继续
[CorpseMusic] Wipe music resumed from the config UI. Both paths continue from the same position 两路从同一位置继续播放 无需处理
[CorpseMusic] Playback progress cleared; waiting for the next wipe. Paused and reset; no auto-resume this round 已暂停并清零,本局不再自动播放 下一次团灭从头播放
[CorpseMusic] Playback stopped: <reason> Reason is one of the tags in the diagnostic table below 原因见下方诊断标签表 无需处理

Voice uplink (host microphone path) / 语音上行(房主麦克风链路)

Log line Meaning 中文含义 处理 / Action
[CorpseMusic] EncoderPipeline.ReceiveMicrophoneData(ArraySegment<float>, WaveFormat) not found (Warn) No injection point exists 没有注入点 反馈游戏/Dissonance 版本
[CorpseMusic] Voice uplink injection patch attached: <method>. Uplink path is live 上行链路就绪 无需处理
[CorpseMusic] Failed to attach voice uplink patch: <error> (Warn) Retried every 2 s, up to 30 times 每 2 秒重试一次,最多 30 次 一直不成功就带上日志反馈
[CorpseMusic] Failed to open the voice channel: <error> (Warn) Other players may hear nothing 其他玩家可能听不到 先确认游戏内语音聊天正常
[CorpseMusic] Failed to restore voice mode: <error> (Warn) Host may stay in open-mic mode 房主可能停留在常开麦 进一次语音设置手动改回
[CorpseMusic] Failed to restore microphone mute state: <error> (Warn) Host may stay unmuted 房主可能仍处于未静音 在游戏内手动切换静音
[CorpseMusic] Host voice mute temporarily lifted (the in-game microphone was off); it will be restored after playback. Mute cleared for the playback only 仅为本次播放解除静音,结束后还原 无需处理
[CorpseMusic] Microphone capture object missing; requested a single capture restart. (Warn) One ResetMicrophoneCapture() was requested 已请求重启一次采集 检查麦克风设备
[CorpseMusic] Failed to force-enable microphone capture: <error> (Warn) Uplink may carry nothing 上行可能没有数据 检查麦克风设备与 Dissonance 状态
[CorpseMusic] Local voice channel not detected; other players cannot hear the music. State: <state> (Warn) Uplink impossible; <state> explains why 上行不可能成立,<state> 给出原因 对照下方上行状态串
[CorpseMusic] Uplink patch attached but no samples reached the encoder; players may not hear the music. State: <state> (Warn) Samples are not reaching the encoder 样本没有进入编码器 对照下方上行状态串
[CorpseMusic] Dissonance uplink injection patch not attached within 60s; wipe music cannot be broadcast through the microphone. (Error) Uplink permanently unavailable this session 本次会话彻底没有上行 确认装有 Dissonance 后重启,并带上日志反馈

Wipe-departure diagnostics / 起飞诊断

Log line Meaning 中文含义 处理 / Action
[CorpseMusic] StartOfRound.ShipLeaveAutomatically(bool) not found; falling back to polling for wipes. (Warn) Playback still works via polling 播放仍由轮询驱动,功能不受影响 无需处理
[CorpseMusic] Wipe departure patch attached: <method>(bool) Departure logging is active 起飞日志可用 无需处理
[CorpseMusic] Failed to attach wipe departure patch; falling back to polling: <error> (Warn) Playback still works via polling 播放仍由轮询驱动 无需处理
[CorpseMusic] Automatic ship departure triggered by an all-dead wipe detected. Confirms the wipe was recognised by the departure path 说明起飞这条路径识别到了团灭 无需处理
[CorpseMusic] Wipe departure detection failed: <error> (Warn) Diagnostic only 纯诊断信息 无需处理

Diagnostic tags: playback reason / 诊断标签:播放原因

Literal Meaning 中文含义
all-dead wipe detected The polling tick saw StartOfRound.allPlayersDead turn true 轮询看到 StartOfRound.allPlayersDead 变为 true
test play from the config UI A manual test playback was started 手动触发的试播
track finished The decoded PCM reached its end 解码后的 PCM 播到结尾
player revived or a new round started (play mode 1) Playback cancelled because the round restarted 玩家复活或进入新一局,播放被中止
voice uplink patch not ready The injection path was unavailable, so playback was stopped 上行链路不可用,因此停止播放
track switched in the config UI The selected track changed while a session was running 播放期间在配置页切换了曲目
mod unloaded or scene changed The session was torn down with the plugin 随插件一起结束本次播放

Diagnostic tags: uplink state (VoiceUplinkPump.DescribeUplink()) / 诊断标签:上行状态(VoiceUplinkPump.DescribeUplink())

Literal Meaning 中文含义
Dissonance not ready No DissonanceComms component could be found in the scene 场景里没找到 DissonanceComms 组件
muted={0}, micCapture={1}, channelSend={2}, injectedFrames={3} string.Format template: {0} mute flag (yes/no), {1} capture object (ok/missing), {2} broadcast trigger transmitting (yes/no), {3} frames injected by the mod string.Format 模板:{0} 是否静音(yes/no)、{1} 采集对象(ok/missing)、{2} 广播触发器是否在发送(yes/no)、{3} 模组已注入帧数
diagnostics unavailable The state query itself threw; treat the uplink as broken 诊断查询本身抛异常,按上行不可用处理