XiaohaiMod-CustomLastSong icon

CustomLastSong

A mod that customizes the evacuation-phase background music

Last updated 3 days ago
Total downloads 444
Total rating 1 
Categories Audio Client-side
Dependency string XiaohaiMod-CustomLastSong-1.0.0
Dependants 0 other packages depend on this package

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2100 icon
BepInEx-BepInExPack

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

Preferred version: 5.4.2100

README

REPO_CustomLastSong

一、简介 / Introduction

简体中文

REPO_CustomLastSong 是一个简单的撤离阶段背景音乐模组。
当本局所有提取点完成、进入“赶回卡车撤离”的阶段时,本模组会:

  • 停止游戏原有的关卡背景音乐、常驻背景音乐、敌人靠近音乐
  • 只播放你自己放在 BGM 文件夹中的音乐
  • 保留所有游戏音效(攻击、交互、环境声音等)

如果当前关卡没有任何符合条件的自定义 BGM,本模组会自动使用该关卡原本的 BGM 作为撤离阶段的音乐。

English

REPO_CustomLastSong is a small mod that customizes the evacuation-phase background music.
When all extraction points are completed and the players are returning to the truck, the mod will:

  • Stop the original level background music, constant music and “enemy near” music
  • Play only your own tracks from the BGM folder
  • Keep all gameplay sound effects (attacks, interactions, ambience, etc.)

If there is no valid custom BGM for the current level, the mod will fall back to the level’s original BGM for the evacuation phase.


二、安装方式 / Installation

简体中文
  1. 确保游戏已安装 BepInEx。
  2. 将 REPO_CustomLastSong 的 dll 放入以下路径(建议单独文件夹):
    • BepInEx\plugins\REPO_CustomLastSong\REPO_CustomLastSong.dll
  3. 启动游戏一次,自动生成:
    • 配置文件:BepInEx\config\xiaohai.REPO_CustomLastSong.cfg
    • BGM 子目录:与 dll 同目录下的 BGM 文件夹(不存在时会自动创建)
English
  1. Make sure BepInEx is installed for the game.
  2. Place the REPO_CustomLastSong dll in (a separate folder is recommended):
    • BepInEx\plugins\REPO_CustomLastSong\REPO_CustomLastSong.dll
  3. Launch the game once. The mod will automatically create:
    • Config file: BepInEx\config\xiaohai.REPO_CustomLastSong.cfg
    • BGM subfolder: a BGM folder next to the dll (created if missing)

三、准备 BGM 文件 / Preparing BGM Files

简体中文
  1. 找到 dll 所在目录,例如:
    • BepInEx\plugins\REPO_CustomLastSong\REPO_CustomLastSong.dll
  2. 确认同级目录存在 BGM 文件夹(没有会自动创建):
    • BepInEx\plugins\REPO_CustomLastSong\BGM
  3. 将你想在撤离阶段播放的音乐文件放入该目录。支持的常见格式:
    • .wav, .ogg, .mp3, .aiff, .aif, .flac
    • .xm, .mod, .it, .s3m
  4. 每个文件的“主文件名”(不含扩展名)会作为配置文件中的段名。例如:
    • BGM\LastRun_1.ogg → 段名 [LastRun_1]
English
  1. Locate the dll, for example:
    • BepInEx\plugins\REPO_CustomLastSong\REPO_CustomLastSong.dll
  2. Ensure there is a BGM folder next to the dll (it is created automatically if missing):
    • BepInEx\plugins\REPO_CustomLastSong\BGM
  3. Put the tracks you want to use during evacuation into this folder. Supported formats include:
    • .wav, .ogg, .mp3, .aiff, .aif, .flac
    • .xm, .mod, .it, .s3m
  4. The file’s base name (without extension) becomes the config section name. Example:
    • BGM\LastRun_1.ogg → section [LastRun_1]

四、配置说明 / Configuration

简体中文

配置文件路径示例:

  • BepInEx\config\xiaohai.REPO_CustomLastSong.cfg

首次运行游戏时,模组会根据 BGM 目录中的音频文件自动生成配置项。
如果某个音频文件被删除,对应的配置项会在下次运行时自动移除。

  1. 通用设置
[通用]
## 撤离BGM音量 / Evac BGM volume (0-1)
Volume = 1
  • Volume:撤离 BGM 的统一音量,范围 0.0 ~ 1.0
  1. 单个音频文件设置

每一个放入 BGM 目录的音频文件都会生成一段配置,例如:

[LastRun_1]
## 最小使用关卡数 / Min level index (integer > 0)
MinLevel = 1

## 最大使用关卡数 / Max level index (integer > 0)
MaxLevel = 99
  • 段名:音频文件名(不含扩展名),例如 LastRun_1.ogg[LastRun_1]
  • MinLevel:最小使用关卡数,必须是大于 0 的整数。
  • MaxLevel:最大使用关卡数,必须是大于 0 的整数,自动保证 MaxLevel >= MinLevel
  • 当前关卡序号在 [MinLevel, MaxLevel] 范围内时,此曲目才会进入随机池。

当前关卡序号的简化理解:

  • 第 1 关:关卡序号为 1
  • 第 2 关:关卡序号为 2
  • 以此类推(等价于 levelsCompleted + 1,但不小于 1)
English

Example config file path:

  • BepInEx\config\xiaohai.REPO_CustomLastSong.cfg

On first run, the mod scans the BGM folder and automatically creates config entries for each audio file.
If an audio file is removed later, its corresponding config entries will be removed on the next run.

  1. General settings
[通用]
## 撤离BGM音量 / Evac BGM volume (0-1)
Volume = 1
  • Volume: global volume for evacuation BGM, range 0.0 ~ 1.0.
  1. Per-track settings

Each audio file in the BGM folder gets one section in the config, for example:

[LastRun_1]
## 最小使用关卡数 / Min level index (integer > 0)
MinLevel = 1

## 最大使用关卡数 / Max level index (integer > 0)
MaxLevel = 99
  • Section name: file name without extension, e.g. LastRun_1.ogg[LastRun_1]
  • MinLevel: minimum level index where this track may be used, integer > 0.
  • MaxLevel: maximum level index where this track may be used, integer > 0, automatically clamped so MaxLevel >= MinLevel.
  • A track is considered for the pool only if the current level index is within [MinLevel, MaxLevel].

Level index (simplified):

  • Level 1 → index 1
  • Level 2 → index 2
  • And so on (equivalent to levelsCompleted + 1, but never less than 1).

五、撤离阶段的行为 / Behaviour During Evacuation

简体中文
  1. 当所有提取点完成时:

    • 游戏内部会触发“所有提取点完成”的逻辑。
    • 本模组会根据当前关卡序号,从符合范围的曲目中随机选一首作为撤离 BGM。
    • 若没有可用曲目,则使用该关卡原本的 BGM。
  2. 撤离阶段进行中:

    • 关卡 BGM、常驻 BGM、敌人靠近音乐全部停止并保持静默。
    • 只有撤离 BGM 和游戏音效会被听到。
  3. 关卡结束(例如卡车离开):

    • 撤离 BGM 自动停止。
    • 下一个关卡将恢复原有音乐系统的正常行为。
English
  1. When all extraction points are completed:
  • The game triggers the “all extractions finished” logic.
  • The mod selects one track at random from all valid candidates for the current level index.
  • If there is no valid track, the original level BGM is used instead.
  1. While the evacuation phase is active:
  • Level BGM, constant music and “enemy near” music are all stopped and kept silent.
  • Only the evacuation BGM and normal sound effects are audible.
  1. When the level ends (for example, the truck leaves):
  • The evacuation BGM stops automatically.
  • For the next level, the original music system resumes normal behaviour.

六、注意事项与建议 / Notes and Tips

简体中文
  • 大量或体积较大的音频文件可能会在首次加载时略微增加读取时间。
  • 建议将所有 BGM 文件统一放在本模组的 BGM 目录下,以免与其它模组混淆。
  • 修改配置或替换 BGM 文件后,只需重启游戏即可生效。
English
  • A large number of big audio files may slightly increase loading time when they are first read.
  • It is recommended to keep all evacuation BGM files inside this mod’s BGM folder, to avoid confusion with other mods.
  • After changing the config or replacing BGM files, simply restart the game to apply the changes.

七、作者信息 / Author

简体中文
English