PSA - Custom Script Files

#1

Hey all,
So over the course of developing Stojkeholm (Have I announced that publicly? I guess I’m announcing that publicly. I’m making a short SP Map pack.) I had the need for some custom files. Due to the Steampipe updates way back the engine doesn’t (currently) allow overrides, so it’s basically impossible to override certain files, (namely the manifests needed to load custom scripts) and I had to go digging deep in the VDC and do a bit of first-hand research for workarounds. For anyone interested, the following files can be used to add custom content to your map that would otherwise require editing a manifest:

[table]
[tr]
[td]Soundscapes[/td]
[td]scripts/soundscapes_[mapname].txt[/td]
[/tr]
[tr]
[td]Particles[/td]
[td]maps/[mapname]_particles.txt[/td]
[/tr]
[tr]
[td]Soundscripts[/td]
[td]maps/[mapname]_level_sounds.txt[/td]
[/tr]
[/table]
I have confirmed firsthand that these files allow the loading of custom assets defined within them on the current Black Mesa branch of Source. To my knowledge, at the time of writing (July 23, 2017) no other script files requiring a manifest have per-map alternatives - if anyone else has knowledge to the contrary, please let me know by posting down below.

There is one more caveat - at present, tools mode (-tools -nop4) is non-functional in public builds of the steam version of Black Mesa. As such, if you want to make or modify particles, you’ll need to find a workaround involving another version of the engine - I personally used the mod version of Black Mesa so I wouldn’t have to extract a bunch of stuff from the VPKs. Unless you’re using CS:GO or DOTA 2, The format definitely hasn’t changed so they should be compatible with BM.

I hope this small info dump helps people who are looking to add some extra atmosphere to their BM maps, and I plan on updating this thread if I figure out ways to load more content or get word from the devs that the game has been updated to allow additional per-map scripts.
Happy Mapping!

0 Likes

#2

An issue I’ve had in my custom maps with custom sounds:

Some sounds would not be recognised by the engine as the console whines about not finding them with the path put in for the sounds (ambient_generics).

However inputting a snd_restart in the console fixes this.
So the mapper would have to put in the snd_restart with a point_clientcommand at startup of the map.

The issue being that snd_restart stops all playing sounds so you can’t have any sound be looping at the start of the map,
and if the user loads a save from the map with a fresh startup of the game (thus missing the snd_restart) the sounds will not play.

Maybe the custom sound_scripts.txt fixes this. Guess I’ll have to test it.

0 Likes