Skip to content

Fix missing script sound entries for VPK build#1950

Merged
Rainyan merged 7 commits into
NeotokyoRebuild:masterfrom
Rainyan:bug/vpk-soundscripts
Jun 3, 2026
Merged

Fix missing script sound entries for VPK build#1950
Rainyan merged 7 commits into
NeotokyoRebuild:masterfrom
Rainyan:bug/vpk-soundscripts

Conversation

@Rainyan

@Rainyan Rainyan commented Apr 17, 2026

Copy link
Copy Markdown
Member

Description

Address the script sound problem at #1053 (comment) by manually bringing in the relevant entries from OGNT scripts.

Fixes (among other things) the following sound errors:

PrecacheScriptSound 'NeoPlayer.GhostPing' failed, no such sound script entry
PrecacheScriptSound 'NeoPlayer.ThermOpticOn' failed, no such sound script entry
PrecacheScriptSound 'NeoPlayer.ThermOpticOff' failed, no such sound script entry
PrecacheScriptSound 'NeoPlayer.VisionOn' failed, no such sound script entry
PrecacheScriptSound 'Victory.Draw' failed, no such sound script entry
PrecacheScriptSound 'Victory.Jinrai' failed, no such sound script entry
PrecacheScriptSound 'Victory.NSF' failed, no such sound script entry

The added game_sounds_player.txt file is verbatim from OGNT definitions, except for:

  • 435f88e removes the unused rank up/down SFX
  • 602d969 removes the Victory.Jinrai, ... entries, because we instead define them as HUD.JinraiWin, ... (and also call them directly in code due to needing to adjust the volume based on the jingle volume cvar so we can't rely on a hardcoded script volume)

This includes some HL2/"shared" definitions as they are in OGNT; I figured we probably want to support these for map compat, even if things like the geiger counter sounds aren't directly relevant, so they are not removed from game_sounds_player.txt. And some of the shared sounds we definitely want, such as the weapon pickup SFX.

Other minor changes:

  • 91cdade Fix the missing HL2MPTypeDeath font nag - we don't use this HL2MP kill icon font for anything so I simply removed it entirely
  • f64d1b6 Refactor: Use the correct channel definitions for HUD.GhostPickUp
  • 6744e99 Update the g_pChannelNames values - these are mostly unused because the closed Valve dlls have them compiled in the binary, but might as well make our implementation match them correctly

Steps to test

  • Download a fresh development branch version of NT;RE from Steam (i.e. preferably no existing files present)
    • Steam depot buildid 22739584 (current latest dev build as of 2026/04/17)
    • neo_version:
Build version: 20260410_8714773
Build date: 2026-04-10
Git hash: 8714773c1dd5457bc047285d515bad8803a199d7
OS: Windows
  • Launch the game, and enter the following to dev console:
developer 1;
clear;
map devbox;

Upon loading into the map:

Before this patch

  • Console prints the above PrecacheScriptSound ... failed, no such sound script entry errors, and those erroring sounds don't play

With this patch

  • Build this PR, and copy the dlls + the new game/neo/scripts/game_sounds_player.txt and other modified assets to the Steam app path
  • Launch again with the above steps
  • No script sound console errors, and the relevant sounds play correctly

Toolchain

  • Windows MSVC VS2022

Linked Issues

@Rainyan Rainyan requested a review from a team April 17, 2026 20:45
Comment thread game/neo/scripts/game_sounds_player.txt
Comment thread game/neo/scripts/game_sounds_player.txt
Comment thread game/neo/scripts/game_sounds_player.txt
@sunzenshen sunzenshen requested a review from a team April 18, 2026 05:52
sunzenshen
sunzenshen previously approved these changes Apr 18, 2026

@sunzenshen sunzenshen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming parity with OGNT

@sunzenshen sunzenshen requested a review from a team April 18, 2026 19:25
AdamTadeusz
AdamTadeusz previously approved these changes Apr 25, 2026
Rainyan added 6 commits May 28, 2026 17:27
This commit is a verbatim copy of the OGNT file.

Added for supporting the move to asset VPK mounting.
Fix error: Failed to load custom font file 'resource/hl2mp.ttf'

This is unrelated to the VPK changes but might as well fix the console
warning.
Already exists in game_sounds_ui.txt as HUD.JinraiWin, etc.
Also, we typically call these directly with the sound filename
because the volume level must correspond to "snd_victory_volume" cvar.
No SFX for rank up/down
Use the correct enum def (same value)
@Rainyan Rainyan force-pushed the bug/vpk-soundscripts branch from 6744e99 to c71c8ab Compare May 28, 2026 14:27
This reverts commit 46a18bc.

Revert removal of the unused rankup/rankdown sfx as per Discord discussion.
@Rainyan Rainyan dismissed stale reviews from AdamTadeusz and sunzenshen via 532f5aa June 3, 2026 07:30
@Rainyan

Rainyan commented Jun 3, 2026

Copy link
Copy Markdown
Member Author

Rebased to master and reverted the removal of NeoPlayer.Rankup and NeoPlayer.RankDown - while these entries aren't used in OGNT, them existing is technically parity, and the entries could have some use either by custom content/plugins, or by us in the future. So probably better not to remove them.

@Rainyan Rainyan requested review from AdamTadeusz and sunzenshen June 3, 2026 07:35
@Rainyan Rainyan merged commit a6ea02e into NeotokyoRebuild:master Jun 3, 2026
7 checks passed
@Rainyan Rainyan deleted the bug/vpk-soundscripts branch June 3, 2026 19:23
@Rainyan Rainyan removed the request for review from sunzenshen June 4, 2026 13:20
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.

4 participants