-
-
Notifications
You must be signed in to change notification settings - Fork 2
Quick Start
这一页给出从 CS2 .dem 到本地服务器 sequence replay 的最短实战流程。
所有路径都用占位符;把它们替换成你机器上的真实路径即可。
转换端:
- Windows x64
cs2-demotracer.exe。
服务器端:
- 本地 Windows x64 CS2 server。
- Metamod:Source。
- CounterStrikeSharp。
- DemoTracer server bundle。
DemoTracer server bundle 包含:
-
BotControllerMetamod runtime。 -
DemoTracerCounterStrikeSharp plugin。 -
DemoTracerApi.dll。 -
skins_en.json。 -
demotracer.config.example.json。
可选集成:
- CS2-Bot-Hider:用于更强的 replay bot 名字、SteamID64、头像 identity 对齐。
- RayTrace provider:用于更严格的 360 度接触 handoff LOS 判断。
先 inspect:
cs2-demotracer.exe inspect --demo "<demo.dem>"转换推荐回合:
cs2-demotracer.exe convert --demo "<demo.dem>" --output "<output-dir>"如果要导出 demo 自带游戏内语音,必须加 --export-voice:
cs2-demotracer.exe convert --demo "<demo.dem>" --output "<output-dir>" --export-voice这会生成 voice/roundXX.dtv sidecar。不是所有 demo 都录了语音;没有 voice data
时路线 replay 仍会导出,但不会生成 voice/。
验证输出包:
cs2-demotracer.exe validate --input "<output-dir>"只转换指定 source round:
cs2-demotracer.exe convert --demo "<demo.dem>" --output "<output-dir>" --export-voice --rounds 0,1,2,5-8饰品证据默认不导出;普通路线 replay 不需要它。
导出 demo 中真实观察到的武器、刀、手套、改名证据:
cs2-demotracer.exe convert --demo "<demo.dem>" --output "<output-dir>" --export-voice --export-cosmetics --acknowledge-cosmetic-gslt-risk --accept-cosmetic-export-disclaimer如果还要导出贴纸和武器挂件/keychain:
cs2-demotracer.exe convert --demo "<demo.dem>" --output "<output-dir>" --export-voice --export-cosmetics --export-stickers --export-charms --acknowledge-cosmetic-gslt-risk --accept-cosmetic-export-disclaimer只有在本地/私有验证环境,并且你已经评估 Valve server guideline 和 GSLT 风险后,
才打开 dtr_cosmetics full。即使只改 bot inventory,只要真人能观察、接管、
inspect 或使用这些 bot,也不能把它当成政策豁免。
转换结果写入 content-hashed demo 目录:
<output-dir>/
<demo-id>/
manifest.json
conversion.log
round00/
t/
<player>.dtr
ct/
<player>.dtr
round01/
t/
<player>.dtr
ct/
<player>.dtr
voice/
round00.dtv
round01.dtv
关键文件:
-
manifest.json:服务器回放入口。 -
roundXX/t/*.dtr和roundXX/ct/*.dtr:每个玩家每个回合的路线 replay。 -
voice/roundXX.dtv:每个回合的 demo-backed 游戏内语音 sidecar。
服务器命令里的 <manifest.json> 通常指:
<output-dir>/<demo-id>/manifest.json
把输出目录放到 CS2 server 能读取的位置,然后在 server 控制台执行。
保守第一跑:
dtr_replay_identity steam; dtr_align default; dtr_cosmetics off; dtr_match off; dtr_partial 1; dtr_handoff death_contact_c4 slot; dtr_voice_auto on; dtr_go seq "<manifest.json>" 0
完整本地展示测试:
dtr_replay_identity avatar; dtr_align full; dtr_cosmetics full; dtr_match full; dtr_partial 1; dtr_handoff death_contact_c4 slot; dtr_voice_auto on; dtr_go seq "<manifest.json>" 0
含义:
-
dtr_replay_identity steam:通过 BotHider 写入 demo 名字和 SteamID64。 -
dtr_replay_identity avatar:使用 DTR 合成 SteamID64 key 应用 manifest 头像覆写。 -
dtr_align full:打开武器/loadout、投掷物、准星、左右手 desired 写入。 -
dtr_cosmetics full:消费显式导出的 demo 饰品、贴纸、挂件证据。 -
dtr_match full:本地赛事展示同步,例如 scoreboard/team name。 -
dtr_partial 1:bot 数不够时允许部分 replay。 -
dtr_handoff death_contact_c4 slot:死亡、接触或 C4 安装后释放 replay 控制。 -
dtr_voice_auto on:加载回合时自动播放voice/roundXX.dtv。 -
dtr_go seq "<manifest.json>" 0:从 source round 0 开始 sequence replay。
只播放一个 source round:
dtr_go round "<manifest.json>" 0
直接 restart alias 也可用:
dtr_seq_restart "<manifest.json>" 0
dtr_round_restart "<manifest.json>" 0
- 转换和验证:
cs2-demotracer.exe inspect --demo "<demo.dem>"
cs2-demotracer.exe convert --demo "<demo.dem>" --output "<output-dir>" --export-voice
cs2-demotracer.exe validate --input "<output-dir>"- 检查服务器插件:
css_plugins reload DemoTracer
dtr_config_status
dtr_doctor "<manifest.json>"
- 先保守回放:
dtr_replay_identity steam; dtr_align default; dtr_cosmetics off; dtr_match off; dtr_partial 1; dtr_handoff death_contact_c4 slot; dtr_voice_auto on; dtr_go seq "<manifest.json>" 0
- 查看语音和 runtime 状态:
dtr_voice_auto status
dtr_runtime
dtr_status
- 再打开完整展示:
dtr_replay_identity avatar
dtr_align full
dtr_match full
dtr_cosmetics full
- 重启 sequence:
dtr_go seq "<manifest.json>" 0
- 停止所有 DemoTracer 状态:
dtr_stop all
如果回放失败,优先检查地图不匹配、manifest 路径不可读、安全 bot slot 不够、
voice/roundXX.dtv 是否和 manifest 在同一个输出包里,以及 dtr_doctor 的 ABI/runtime 状态。
Start here
Convert
Playback
Reference