Please or Register to create posts and topics.

Packing Soundscapes

PreviousPage 3 of 5Next
TheTobbell wrote:
Tmast98 wrote:
Scripts in general

Really? I thought Scripts are not packable, for example the scripts for the elevators, or are just some of them not working when the map is uploaded on the workshop? :notwant:

I can guarantee they do work. It's just the dlc2 folder overwrites the other scripts if they share the same name (like the elevator script), so in some cases you have to save them under different names if they don't work. I use a script in a map I'm working on to change cube model's, but keep their properties for example.

This Signature is Beyond Your Range of Seeing.

Image

Specifically, any file in a VPK has highest priority. Most people consider this a bug, as it breaks the old way of using skins and model replacements and so forth, but there you have it. It used to be possible to distribute a VPK as an "addon", which Omni did for Retrospective (note the custom video_splitter.nut), but DLC1 broke that too.

Now the only ways to override files in a VPK are:
1) Make your own VPK, make it an addon, and hope that your players will know the fake-sourcemod workaround. Not many people have used this approach.
2) Make your own VPK and release it as dlc3. A few mods have used this approach, but only one will work at a time, so this is best for big mods (in between normal map packs and full sourcemods).

To make a VPK, drag and drop a folder onto /bin/vpk.exe or launch it from the command line.

Falsi sumus crusto!
Tmast98 wrote:
HMW wrote:
So can you pack soundscripts in a BSP? (As in, compatible with the workshop.) I have tried it in the past but could not get it to work... Maybe I missed something obvious.

Yup I did, do you set the search filter to all files when packing, and not all valid pak files?

Hmmm... I definitely need to try that again. In a previous attempt at getting this to work, I only packed one of the manifest files. (I don't remember which one.) Maybe that was the problem.

Sendificate series: Sendificate | A Beam Too Far | Airtime | 302
Other Portal 2 maps: Medusa Glare
Portal 1 maps: Try Anything Twice | Manic Mechanic
HMW wrote:
Tmast98 wrote:
HMW wrote:
So can you pack soundscripts in a BSP? (As in, compatible with the workshop.) I have tried it in the past but could not get it to work... Maybe I missed something obvious.

Yup I did, do you set the search filter to all files when packing, and not all valid pak files?

Hmmm... I definitely need to try that again. In a previous attempt at getting this to work, I only packed one of the manifest files. (I don't remember which one.) Maybe that was the problem.

Did you update and pack both the one in Portal 2 and DLC1? Those are the two I packed (as well as my soundscript.txt) to get it working.

This Signature is Beyond Your Range of Seeing.

Image

So I spent some more time horsing around with those manifest files, to no avail. I followed your advice of packing both the base and DLC1 files, but that didn't work either. (Wouldn't they get the same internal path inside the BSP anyway?)

As is often the case, the real problem turned out to be something completely different:

When using custom soundscripts, you do indeed need to pack both the script file itself and the manifest. (I took the one from DLC2 as it has the most entries, and added my stuff to the end.)

After the map starts, you then have to reset the sound system with this console command:

Code: Select all
sv_soundemitter_flush

This can be done with a logic_auto and a point_servercommand. It causes the game to re-read the manifest file and reload all of the soundscripts. Since your map is now loaded, its custom version of game_sounds_manifest.txt is visible in the virtual file system, so it will load your custom sounds in addition to the normal ones.

I don't see this documented anywhere on the wiki, so this may be just as much of a WTF revellation to anyone as it is to me. Or, maybe this is completely old news to any of you who are used to working with the sound system, in which case can someone please tell me how hard I should be slamming my head into the desk....

Sendificate series: Sendificate | A Beam Too Far | Airtime | 302
Other Portal 2 maps: Medusa Glare
Portal 1 maps: Try Anything Twice | Manic Mechanic
HMW wrote:
After the map starts, you then have to reset the sound system with this console command:

Code: Select all
    sv_soundemitter_flush

This can be done with a logic_auto and a point_servercommand.

WOW, that was an awesome find! :thumbup:

@Tmast: are you completely sure you actually made this to work? did you remove the local files once you pakrated them, and restarted the game? (this is how it should be done to be completely sure).

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]
josepezdj wrote:
HMW wrote:
After the map starts, you then have to reset the sound system with this console command:

Code: Select all
    sv_soundemitter_flush

This can be done with a logic_auto and a point_servercommand.

WOW, that was an awesome find! :thumbup:

@Tmast: are you completely sure you actually made this to work? did you remove the local files once you pakrated them, and restarted the game? (this is how it should be done to be completely sure).

Yeah, I'm referring to the one map you know I am :lol:. You can hear them in the map already.

What I did was add the new .txt file to both the dlc1 and the portal2 soundscript manifest, and packed both manifests and the new soundscript file into the .bsp via pakrat, and it works perfectly for me and other people who have played it :D.

This Signature is Beyond Your Range of Seeing.

Image

I tried that command, but I can't get my custom sound in my soundscape working.

yishbarr wrote:
I tried that command, but I can't get my custom sound in my soundscape working.

Yeah we got a bit derailed; the above is about soundscripts, which are somewhat different from soundscapes. For the latter, you should name your soundscape file with a map-specific name, as ChickenMobile explained:

ChickenMobile wrote:
Soundscapes are one of things that will work when packed.

they should be under /scripts and be named relative to the name of your map.
e.g. scripts/soundscapes_mapname.txt

I know this because I used custom soundscapes for rattmann returns.

Tmast98 wrote:
Yeah, I'm referring to the one map you know I am :lol:. You can hear them in the map already.

What I did was add the new .txt file to both the dlc1 and the portal2 soundscript manifest, and packed both manifests and the new soundscript file into the .bsp via pakrat, and it works perfectly for me and other people who have played it :D.

Have you published that map yet? If not, can we see it please? I'm really curious how you managed to pack both manifest files and have the game read them.

Sendificate series: Sendificate | A Beam Too Far | Airtime | 302
Other Portal 2 maps: Medusa Glare
Portal 1 maps: Try Anything Twice | Manic Mechanic
HMW wrote:
yishbarr wrote:
I tried that command, but I can't get my custom sound in my soundscape working.

Yeah we got a bit derailed; the above is about soundscripts, which are somewhat different from soundscapes. For the latter, you should name your soundscape file with a map-specific name, as ChickenMobile explained:

ChickenMobile wrote:
Soundscapes are one of things that will work when packed.

they should be under /scripts and be named relative to the name of your map.
e.g. scripts/soundscapes_mapname.txt

I know this because I used custom soundscapes for rattmann returns.

Tmast98 wrote:
Yeah, I'm referring to the one map you know I am :lol:. You can hear them in the map already.

What I did was add the new .txt file to both the dlc1 and the portal2 soundscript manifest, and packed both manifests and the new soundscript file into the .bsp via pakrat, and it works perfectly for me and other people who have played it :D.

Have you published that map yet? If not, can we see it please? I'm really curious how you managed to pack both manifest files and have the game read them.

I was not planning on releasing any information on this map for another two weeks. If I release a teaser image of it now, you won't be to play it. Are you okay with that?

EDIT: If you want to see the exacts though send me a private message, I can better help you there so I don't spoil the map :lol:.

This Signature is Beyond Your Range of Seeing.

Image
PreviousPage 3 of 5Next