Better Console 是一个为 Casualties Unknown Demo(未知伤亡 Demo) 制作的非官方 BepInEx Mod。它扩展了游戏内置控制台的自定义命令功能,并加入了一组用于生成物品、处理液体和查询本地化数据的实用命令。
- 让
addcustomcommand创建的命令能够接收参数。 - 生成装有指定液体的容器,并为容器名称和液体名称提供输入候选项。
- 根据当前语言中的本地化文本反查 JSON key。
- 撤销最近由控制台命令生成的物体。
- 生成均匀装有全部已注册液体的“鸡尾酒”迷你桶。
- 让
starterkit在 Casualties: Together 联机游戏中向指定玩家发放装备和经验。 - 可在游戏设置中开启“自动关闭控制台”。
- Casualties Unknown Demo
- BepInEx 5
当前版本的开发与测试环境:
- 游戏版本:7.0.1
- BepInEx:5.4.23.4
其他游戏版本或 BepInEx 版本可能也能运行,但不保证兼容。
-
为游戏安装 BepInEx 5,并至少启动一次游戏,让 BepInEx 创建所需目录。
-
从本仓库的 Releases 页面下载最新版本。
-
将
BetterConsole.dll放入:<游戏目录>\BepInEx\plugins\BetterConsole\BetterConsole.dll -
启动游戏。BepInEx 日志中出现
Better Console 1.1.0 开始加载和Better Console 已成功加载即表示 Mod 已加载。
starterkit 现在可以接受可选的玩家目标。未填写目标时,其行为与原版一致,向本地玩家发放装备和随当前层数增加的经验。
starterkit [玩家目标]
联机目标支持玩家名称(可使用名称开头进行匹配)及以下选择器:
@m:执行命令的本机玩家。@a:所有玩家。@o:除执行者之外的其他玩家。@r:随机一名玩家。@c:鼠标指向或距离鼠标最近的玩家。
示例:
starterkit Alice
starterkit @a
starterkit @c
starterkit plr:Alice
Casualties: Together 使用的玩家位置前缀是 plr:。指定玩家的命令必须由房主、专用服务器或拥有服务器控制台权限的管理员执行,并且服务器必须允许作弊命令。未安装 Casualties: Together 或联机系统尚未启动时,starterkit 会完全保持原版参数和行为。
Better Console 扩展了游戏原有的 addcustomcommand:
{1}、{2}……分别代表调用自定义命令时提供的第 1、第 2……个参数。{*}代表调用时提供的全部参数。- 游戏原有规则仍然适用:动作中的空格使用
_,多个命令使用;分隔。
语法:
addcustomcommand <名称> <描述> <动作模板>
示例:
addcustomcommand spawnmany 生成很多物品 spawn_{1}_player_1_{2}
spawnmany bandage 5
第二条命令将执行:
spawn bandage player 1 5
在指定位置生成若干装有指定液体的容器。
SpawnContainerWithLiquid <容器ID> <液体ID> <位置> <液体容积mL> <数量>
液体容积小于 0 时按 0 处理;超过容器容量时按容器最大容量处理。
示例:
SpawnContainerWithLiquid minibarrel water player 5000 2
根据当前游戏语言中的完整本地化文本,反查对应的 JSON key。搜索时不区分大小写,并可能返回多个结果。
FindLocaleKey <本地化文本>
示例:
FindLocaleKey 绷带
删除最近由控制台命令生成的物体。
UndoSpawn <数量>
示例:
UndoSpawn 5
生成历史只保存在当前游戏进程中,退出游戏后不会保留。该命令会直接销毁物体,不能恢复已经删除的物体。
在指定位置生成一个迷你桶,并将游戏中全部已注册液体均匀装入其中。
Cocktail <位置>
示例:
Cocktail cursor
Cocktail player
Cocktail random
Cocktail 10,20
位置参数支持 cursor、player、random 或 x,y 坐标。
- 将鼠标悬停在
Cocktail生成的迷你桶上时,游戏会尝试显示桶内每一种液体,导致 tooltip 非常大,并无法显示任何文字。这不会影响桶内液体本身。
在“设置 → 游戏”顶部可以找到“自动关闭控制台”。此项默认关闭;开启后,一条有效命令成功执行时会自动关闭控制台。无效命令或执行失败的命令不会关闭控制台。
如果 Mod 没有加载:
- 确认
BetterConsole.dll位于BepInEx\plugins目录内。 - 确认安装的是 BepInEx 5,而不是 BepInEx 6。
- 查看
<游戏目录>\BepInEx\LogOutput.log,搜索Better Console或红色报错。 - 暂时移走其他 Mod,检查是否存在补丁冲突。
报告问题时,请附上游戏版本、Better Console 版本、BepInEx 版本以及 LogOutput.log 中相关的错误内容。
本仓库只提供编译后的 Release,不公开 Mod 源代码。
Better Console 的开发需要分析游戏的托管程序集。为了避免在公开仓库中分发任何由游戏程序集反编译得到的代码或游戏资源,本仓库不会提交反编译工程、游戏资源或 Mod 源代码。Release 中只应包含运行 Mod 所需的编译产物及随附文档。
Better Console 不是官方 Mod,与游戏开发者或发行商没有隶属或合作关系。游戏名称及相关资源的权利归其各自权利人所有。
Better Console is an unofficial BepInEx mod for Casualties Unknown Demo. It expands the game's built-in custom-command system and adds several practical commands for spawning items, working with liquids, and looking up localization data.
- Pass arguments to commands created with
addcustomcommand. - Spawn containers filled with a chosen liquid, with input suggestions for container and liquid IDs.
- Find JSON keys from localized text in the currently selected language.
- Undo objects recently spawned by console commands.
- Spawn a “Cocktail” mini-barrel evenly filled with every registered liquid.
- Target a selected player with
starterkitin Casualties: Together multiplayer games. - Optionally close the console automatically after a successful command.
- Casualties Unknown Demo
- BepInEx 5
The current release was developed and tested with:
- Game version: 7.0.1
- BepInEx: 5.4.23.4
Other game or BepInEx versions may work, but are not guaranteed to be compatible.
-
Install BepInEx 5 for the game and launch the game at least once so BepInEx can create its directories.
-
Download the latest version from this repository's Releases page.
-
Place
BetterConsole.dllat:<Game directory>\BepInEx\plugins\BetterConsole\BetterConsole.dll -
Start the game. If
Better Console 1.1.0and a successful-load message appear in the BepInEx log, the mod is loaded.
starterkit now accepts an optional player target. When no target is supplied, it retains its original behavior and gives the local player equipment and experience scaled to the current layer.
starterkit [player target]
Targets may be player names (partial matching from the beginning is supported) or one of these selectors:
@m: the local player executing the command.@a: all players.@o: every player other than the executor.@r: one random player.@c: the player under or nearest to the cursor.
Examples:
starterkit Alice
starterkit @a
starterkit @c
starterkit plr:Alice
The player-position prefix used by Casualties: Together is plr:. Targeted commands must be run by the host, dedicated server, or an administrator with server-console access, and server cheats must be enabled. When Casualties: Together is not installed or its multiplayer system is inactive, starterkit retains its original arguments and behavior.
Better Console extends the game's existing addcustomcommand command:
{1},{2}, and so on represent the first, second, and subsequent arguments supplied when the custom command is invoked.{*}represents all supplied arguments.- The original game rules still apply: use
_in place of spaces inside actions and;to separate multiple commands.
Syntax:
addcustomcommand <name> <description> <action template>
Example:
addcustomcommand spawnmany Spawn_multiple_items spawn_{1}_player_1_{2}
spawnmany bandage 5
The second line executes:
spawn bandage player 1 5
Spawns one or more containers filled with a selected liquid at a chosen position.
SpawnContainerWithLiquid <container ID> <liquid ID> <position> <volume in mL> <amount>
Volumes below 0 become 0; volumes above the container's capacity are clamped to its maximum capacity.
Example:
SpawnContainerWithLiquid minibarrel water player 5000 2
Finds JSON keys whose value exactly matches localized text in the game's current language. Matching is case-insensitive and may return more than one result.
FindLocaleKey <localized text>
Example:
FindLocaleKey Bandage
Destroys objects most recently created by console commands.
UndoSpawn <amount>
Example:
UndoSpawn 5
Spawn history exists only for the current game process and is not retained after quitting. Destroyed objects cannot be restored.
Spawns a mini-barrel at the selected position and evenly fills it with every liquid currently registered by the game.
Cocktail <position>
Examples:
Cocktail cursor
Cocktail player
Cocktail random
Cocktail 10,20
The position can be cursor, player, random, or an x,y coordinate.
- Hovering over a mini-barrel created by
Cocktailmakes the game list every liquid in its tooltip. The tooltip can become extremely large and some text may be clipped. This does not affect the liquids inside the barrel.
“Automatically close console” appears at the top of Settings → Game. It is disabled by default. When enabled, the console closes after a valid command completes successfully. Invalid or failed commands leave it open.
If the mod does not load:
- Confirm that
BetterConsole.dllis somewhere underBepInEx\plugins. - Confirm that you installed BepInEx 5, not BepInEx 6.
- Open
<Game directory>\BepInEx\LogOutput.logand search forBetter Consoleor red error messages. - Temporarily remove other mods to check for patch conflicts.
When reporting an issue, include the game version, Better Console version, BepInEx version, and the relevant errors from LogOutput.log.
This repository distributes compiled releases only. The mod's source code is not published.
Developing Better Console requires inspecting the game's managed assemblies. To avoid publishing any code decompiled from the game or redistributing game assets, this repository does not include the decompiled project, game DLLs, game assets, or the mod's source code. Releases should contain only the compiled files required to run the mod and their accompanying documentation.
Better Console is an unofficial project and is not affiliated with or endorsed by the game's developers or publisher. The game name and related assets belong to their respective owners.