Skip to content

Hide server HUD text and engine centre text (part of #677) - #717

Merged
ccoventry merged 21 commits into
devfrom
feat/hide-more-text-677
Oct 25, 2026
Merged

ccoventry merged 21 commits into
devfrom
feat/hide-more-text-677

Conversation

@ccoventry

@ccoventry ccoventry commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Release note: New: hide plugin HUD text such as "KTP PRACTICE MODE", and the engine's own centre messages such as "Game was paused".

Rows 7 and 8 of #677. #714, which this was stacked on, is merged, so this PR targets dev and CI runs on it.

Row What disappears Setting How
7 Server HUD text from plugins (set_hudmessage, e.g. KTP's "KTP PRACTICE MODE", "Match Pending") ds_hud_hide_server_text 1 (new) The engine sends TE_TEXTMESSAGE to HudText through its by-name dispatcher, which calls every handler, so a user-message hook can't stop it. While the setting is on, the temp-entity handler's call to CL_HudMessage goes through a filter instead (hw.dll, per-build table). A map's own game_text lines are kept.
8 Engine centre text from svc_centerprint (e.g. "Game was paused") folded into #714's ds_hud_hide_center_text The handler's call SCR_CenterPrint becomes nops while it's on (hw.dll, per-build table). The other callers of SCR_CenterPrint are left alone.
  • New files:
    • server_hud_text.rs and engine_center_print.rs;
    • a shared hw_call_site.rs, which finds one call per build, keeps the original bytes and refuses to write over anyone else's patch;
    • tools/verify_engine_text_offsets.py, which passes on PRE and POST hw.dll, and on stock, which is identical to POST.
  • Doc fixes:
    • map_text.rs said TE_TEXTMESSAGE was empty; 68 demos carry it.
    • msglog.rs called the server-message dispatcher "by-name".
    • ds_hud_hide_map_text can't hide a map's game_text; the docs now say so.

Decisions

  • The menu setting is gone. An earlier version of this PR added ds_hud_hide_menus (row 5: drop the VGUIMenu and MOTD messages during demo playback). It was dropped because demos never show those menus: with the setting off, no team menu, class menu or MOTD window appears. vgui_menus.rs, its cvar, its Commands.txt, docs and console_prefix.rs entries, its client.dll check in verify_engine_text_offsets.py, and the two engine.rs helpers only it used (playing_demo, hud_frame_driving) are removed.

Tests

  • After dropping the menu setting (merged with dev): goldsrc-hooks (i686) 869 passed; cargo test --workspace --locked passes; npm run test:unit 904 passed, the console-name tests (command_suggest.test.js, console_prefix.rs) included; fmt and clippy 1.98.1 (-D warnings, workspace and i686 hooks) are clean; the hook DLL builds.
  • Verify scripts: verify_engine_text_offsets.py is ALL OK on both builds (re-run after the menu check came out). verify_msglog_table.py, verify_hide_text_offsets.py and verify_hudelements.py still pass.
  • In game, PRE (Brain account):
    • Row 7, checked: dod_tools_decal_test_3_flushed at 17:33. "KTP PRACTICE MODE" shows with the setting off and is gone within a second of turning it on. The log reads server_hud_text: hid "KTP PRACTICE MODE".
    • Row 8, not checked: the setting installs, and ds_debug_status reports "the engine's svc_centerprint is hidden too". My frames missed the "Game was paused" moment in wsod25_grp1_h1_hltv at 10:30-10:36 even with the setting off, so I still need the right time.

Limits

Other open PRs on the same files

#758, #882, #885, #906, #1000, #1040 and #1044 also touch docs/dodstudio_commands.md and goldsrc-hooks/ui/Commands.txt (most also commands.rs, lib.rs or console_prefix.rs); whichever merges second regenerates studio/src/console_commands_data.js.

To check

Use PRE's dod demos. Rows 7 and 8 patch hw.dll, so check them on POST too.

  1. Row 7, the map's own text stays: ktps8w10qf-m00cat_soul_m1_saints_h1 at 30:30. "Operation Saints was a compleet failure!" should still show with the setting on.
  2. Row 8: wsod25_grp1_h1_hltv, at the "Game paused by ..." moment. With the setting on, there should be no centre line.

Part of #677

🤖 Generated with Claude Code

…e text (#677)

Rows 5, 7 and 8 of #677, found offline and not yet checked in the game:

- dodstudio_hide_menus: drops VGUIMenu and MOTD while a demo plays (never
  live), so a POV demo recorded from joining shows no team menu, class menu
  or MOTD window. User-message hooks like map_text's, installed from the
  first real HUD_Frame so they catch a demo's loading segment.
- dodstudio_hide_server_hud_text: plugin set_hudmessage text arrives as
  TE_TEXTMESSAGE, whose HudText the engine dispatches by name to every
  record, so no hook can drop it. The TE_TEXTMESSAGE handler's call to
  CL_HudMessage in hw.dll is pointed at a filter instead (per-build table);
  a map's own game_text still shows. Reads the text through
  pfnTextMessageGet (engfuncs slot 25, now in ClEngineFuncsPartial).
- dodstudio_hide_center_text now also hides the engine's own
  svc_centerprint: the handler's call to SCR_CenterPrint becomes nops
  (per-build table).

hw_call_site.rs holds the shared per-build call-site patching.
tools/verify_engine_text_offsets.py checks both hw.dll builds and the
client.dll facts. Docs: dodstudio_commands.md, Commands.txt, the regenerated
console_commands_data.js, and goldsrc_hw_dll_survey.md.

Part of #677

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ccoventry

Copy link
Copy Markdown
Owner Author

In-game checks on PRE (Brain account, test DLL local\test-677b\):

  • Row 7 (dodstudio_hide_server_hud_text), works:
    • dod_tools_decal_test_3_flushed at 17:33: "KTP PRACTICE MODE" shows with the setting off.
    • It's gone within a second of setting it to 1, and the log reads server_hud_text: hid "KTP PRACTICE MODE" once a second.
  • Row 5 (dodstudio_hide_menus), the hook catches the messages:
    • k4-ktps9w1-gskill-axis from 7:40 with the setting on: the log shows vgui_menus: hid the team menu (VGUIMenu 2) twice, then hid VGUIMenu 13 (the class menu).
    • My screen grabs missed the menus in the run with it off too, so I couldn't show the before and after. It still needs a look by eye.
  • Row 8: the setting installs (see the PR body); the frame where the text shows wasn't caught yet.
  • No crash in any run.

ccoventry and others added 3 commits October 11, 2026 23:12
…to feat/hide-more-text-677

# Conflicts:
#	goldsrc-hooks/src/commands.rs
#	goldsrc-hooks/src/engine.rs
#	studio/src/console_commands_data.js
…-text-677

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ccoventry

Copy link
Copy Markdown
Owner Author

Test pass 2026-10-13: stacked on #714, so no CI. Merged the updated feat/hide-spectator-text-677 in (lib.rs mod list and console_commands_data.js; regenerated).
Local: fmt, host + i686 clippy clean; hooks i686 528 passed; npm unit 372 passed.
Live test still needed: PRE and POST (Brain account).

@ccoventry

Copy link
Copy Markdown
Owner Author

In-game check on PRE (Brain account, DLL from this branch, 5d30cdd; grabs in local/game-probe/717-menus-pre):

  • Row 5: k4-ktps9w1-gskill-axis, seek to 7:40 with dodstudio_hide_menus 1: log shows hid the team menu (VGUIMenu 2) twice and hid VGUIMenu 13, and no window in three grabs over the next 10 s. The baseline run (setting off, same seek) showed no window either, so the stepped seek may swallow the menu on its own; the log is the proof here.
  • Row 7, map text kept: ktps8w10qf-m00cat_soul_m1_saints_h1 at 30:26 and the next 80 s is still "Warmup Mode" (a small white line, mid-left, stays on screen with the setting on; status says 0 messages hidden), and no round end came, so "Operation Saints..." wasn't seen. Worth knowing where that "Warmup Mode" line comes from: it is not hidden by dodstudio_hide_server_hud_text.
  • Row 8: the engine patch installs on PRE (svc_centerprint hidden), but I could not find the "Game was paused" moment in wsod25_grp1_h1_hltv: 75 s clips from 10:28 and from 9:15 (the string sits at 21% of the file) showed no centre text with the setting off. Needs the right viewdemo time.
    POST not run yet.

# Conflicts:
#	goldsrc-hooks/src/engine.rs
#	studio/src/console_commands_data.js
@ccoventry

Copy link
Copy Markdown
Owner Author

Merged the updated #714 branch in (375406b); conflicts in goldsrc-hooks/src/engine.rs and studio/src/console_commands_data.js, resolved by keeping both new engfuncs slots (TextMessageGet at 25 from here, DrawConsoleString/SetTextColor/StringLen at 27-29 from dev, DrawCharacter as padding; the 89-slot size assert holds) and regenerating the data file; local tests/clippy/fmt/npm unit pass (stacked on #714, so no CI runs here); test DLL rebuilt at local\test-717\

…t-677

Both sides kept in commands.rs (voice_menus from dev beside this branch's
server_hud_text and vgui_menus). Commands.txt keeps this branch's lines
with dev's hide_asset arguments. console_commands_data.js regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ccoventry

Copy link
Copy Markdown
Owner Author

Smoke test after the dev merge (d07655e, DLL local\test-717\, Brain account, game_probe, wsod25_grp1_h1_hltv), on POST and PRE:

  • All six settings take and show in dodstudio_debug_status: dodstudio_hide_spectator_text 1, dodstudio_hide_center_text 1, dodstudio_hide_server_hud_text 1, dodstudio_hide_menus 1, dodstudio_hud_map_hide_speaker 1, dodstudio_hud_map_team_marker 2.
  • The TE_TEXTMESSAGE filter installs on each build ("25th Anniversary hw.dll" / "pre-Anniversary hw.dll").
  • Nothing in the hook log says a hook failed or a pattern wasn't found.

Grabs are in local\game-probe\20261019-112435\ (POST) and local\game-probe\20261019-112547\ (PRE). This also covers #714's settings, since this branch carries them.

@ccoventry

Copy link
Copy Markdown
Owner Author

Review and in-game check (unattended pass): ready to merge after #714. Head f2abffc4.

Branch

Checked

  • Unit tests: goldsrc-hooks i686 pass (698).
  • Lint and format: clippy 1.98.1 clean for i686 and host. fmt clean.
  • JS: npm run test:unit passes (585).
  • Verify scripts:
  • Code review:
    • hw_call_site has one signature per build, with rel32 pinned. It reads the stock bytes at the scan, puts them back at 0, and refuses foreign bytes.
    • Patches are written only from commands::poll.
    • ClEngineFuncsPartial slot 25 (pfnTextMessageGet) is checked against 5 call sites by the verify script.
    • The names follow the rules.

In game (Brain account), PRE and POST, local\test-717

  • Row 7 (dod_tools_decal_test_3_flushed): "KTP PRACTICE MODE" shows with 0, is gone with 1, and is back with 0. Same on both builds.
  • Row 8 (wsod25_grp1_h1_hltv at the pause): "Game was unpaused" shows with 0 and doesn't with 1. Same on both builds.
  • Row 5:
    • With 1, the log shows vgui_menus: hid the team menu (VGUIMenu 2) twice, then VGUIMenu 13 (k4-ktps9w1-gskill-axis, 7:43).
    • With 0, in a fresh launch, I saw no team menu on screen either, so I couldn't show a before and after in a grab.
    • The loading-segment case (ktps8w1-dyelife_soul_lenn_h2 as the session's first demo) showed no menu with 0 or 1, and logged no hid line. That case is not proven.
  • Row 7, the map's own game_text: no server_hud_text: hid line for "Operation Saints…", so the filter passed it on. I didn't catch it on screen after seeking to 1829 on either build: the frames showed the clan countdown, so the seek clock and the time I used probably disagree.
  • No crash in any run.

Screenshots: local\game-probe\717\.

Base automatically changed from feat/hide-spectator-text-677 to dev October 22, 2026 02:56
ccoventry and others added 2 commits October 22, 2026 03:58
…ings

The three settings take #555's signed-off names: ds_hud_hide_center_text
(already on dev), ds_hud_hide_server_text, ds_hud_hide_menus. The last two
never shipped, so they get no old_names row; they join NEW_SINCE_555.
console_commands_data.js regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ccoventry

Copy link
Copy Markdown
Owner Author

Brought up to date with dev, with the ds_ names (unattended pass). Head 982fca91.

Renamed to #555's signed-off table

  • dodstudio_hide_center_text → ds_hud_hide_center_text (already on dev from Hide the spectator mode label, Press DUCK, centre text and two overview icons (part of #677) #714)
  • dodstudio_hide_server_hud_text → ds_hud_hide_server_text
  • dodstudio_hide_menus → ds_hud_hide_menus
  • Neither new name ever shipped, so neither gets an old_names.rs row. Both are in NEW_SINCE_555.
  • Every dodstudio_ name in this PR's comments, docs, Commands.txt and verify_engine_text_offsets.py now uses its ds_ name.

Conflicts with dev (center_text.rs, lib.rs, msglog.rs, Commands.txt, dodstudio_commands.md, console_commands_data.js):

  • Kept this branch's text and code, renamed.
  • dodstudio_commands.md: dev's table, with this PR's hide_center_text row in place of dev's and its two new rows after it.
  • console_commands_data.js: regenerated with console_names.py on PRE and POST.
  • A second gh pr update-branch (dev moved again) merged cleanly.

Checked (on e7f9834, before that second merge)

  • clippy 1.98.1: hooks i686 and host, and the workspace: clean.
  • goldsrc-hooks i686: 711 pass.
  • workspace (no hooks/web-analyzer): 1180 pass.
  • JS unit: 604 pass.
  • verify_engine_text_offsets.py: ALL OK on PRE and POST hw.dll and on client.dll.
  • CI green on 982fca91.

In game. DLL local\test-717\, built from 982fca91. game_probe, Brain account, ktps8w1-m00cat_soul_lenn_h2. Sent ds_hud_hide_center_text 1; ds_hud_hide_server_text 1; ds_hud_hide_menus 1.

  • PRE, PASS (local\game-probe\uh-717-pre\):
    • "svc_centerprint hidden (pre-Anniversary hw.dll)"
    • "TE_TEXTMESSAGE now goes through the filter (pre-Anniversary hw.dll)"
    • "vgui_menus: ds_hud_hide_menus = 1"
    • ds_debug_status: temp-entity fix 6 of 6, hull-trace guard on.
  • POST, PASS (uh-717-post\): the same lines, with "(25th Anniversary hw.dll)".
  • Neither hook log shows a hook failing. The only "not installed" lines are the modules that are build-specific by design: frame_esc on PRE, lightmap_gamma on POST.

🤖 Generated with Claude Code

ccoventry and others added 7 commits October 23, 2026 03:24
# Conflicts:
#	studio/src/console_commands_data.js
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	studio/src/console_commands_data.js
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ccoventry

Copy link
Copy Markdown
Owner Author

Smoke test of the rebuilt DLL: rebuild works on PRE and POST.

DLL local\test-717\dodstudio_goldsrc_hooks.dll (rebuilt this morning on dev 3118435). game_probe, Brain account, -addons, viewdemo, all three rows in one session per install. No crash on either; the hook logs have no failed hook or unmatched pattern. ds_debug_status at start and end: temp-entity fix 6 of 6, hull-trace guard on (pre-Anniversary on PRE, 25th Anniversary on POST).

Row 7, server HUD text (dod_tools_decal_test_3_flushed, seek 1060), PRE and POST: pass.

  • ds_hud_hide_server_text 0: "KTP PRACTICE MODE" at the top.
  • 1: gone; log server_hud_text: hid "KTP PRACTICE MODE" once a second, "TE_TEXTMESSAGE now goes through the filter (pre-Anniversary / 25th Anniversary hw.dll)".
  • Back to 0: the text is back.

Row 8, engine centre text (wsod25_grp1_h1_hltv, seek 632.5), PRE and POST: pass.

  • ds_hud_hide_center_text 0: "Game was unpaused" shows about 1 s after the seek.
  • 1, same seek: no centre line in 6 grabs; log "the engine's svc_centerprint hidden".

Row 5, demo menus (k4-ktps9w1-gskill-axis, seek 458): pass on the log, before/after still not shown on screen.

  • ds_hud_hide_menus 1: vgui_menus: hid the team menu (VGUIMenu 2) twice, then hid VGUIMenu 13, on both installs. Loading wsod25_grp1_h1_hltv afterwards with the setting still on also logged hid a MOTD chunk x13 and hid the team menu in its loading segment.
  • ds_hud_hide_menus 0: as in the earlier tests, no team or class menu appeared on screen in 8 grabs over ~10 s after seeking to 458. So the "shown with it off" half of row 5 is still unproven in a probe.

Screenshots in local\review-images\717\ (contact sheets <pre|post>_sheet_<menus-off|menus-on|server-text|center-off|center-on>.png, plus single frames such as post_server_text_off_shows_KTP_PRACTICE_MODE.png, post_server_text_on_hidden.png, post_center_off_game_was_unpaused.png, post_center_on_no_line.png, and the same for pre_). Reports: local\game-probe\probes-717-pre\, probes-717-post\.

ccoventry and others added 2 commits October 25, 2026 15:54
# Conflicts:
#	studio/src/console_commands_data.js
With the setting off, no team menu, class menu or MOTD window appears in
a demo, so the VGUIMenu/MOTD filter has nothing to do. Removes
vgui_menus.rs, its cvar and wiring, the engine.rs helpers only it used,
its Commands.txt, docs and console_prefix.rs entries, and its client.dll
check in verify_engine_text_offsets.py; regenerates
console_commands_data.js.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ccoventry ccoventry changed the title Hide demo menus, server HUD text and engine centre text (part of #677) Hide server HUD text and engine centre text (part of #677) Oct 25, 2026
@ccoventry
ccoventry merged commit 5bc7b6a into dev Oct 25, 2026
5 checks passed
@ccoventry
ccoventry deleted the feat/hide-more-text-677 branch October 25, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant