Packing Soundscapes
Quote from Tmast98 on October 14, 2013, 5:36 pmTheTobbell wrote:Tmast98 wrote:Scripts in generalReally? 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?
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.
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?
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.
Quote from FelixGriffin on October 14, 2013, 6:52 pmSpecifically, 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.
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.
Quote from HMW on October 15, 2013, 7:43 amTmast98 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.
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.
Other Portal 2 maps: Medusa Glare
Portal 1 maps: Try Anything Twice | Manic Mechanic
Quote from Tmast98 on October 15, 2013, 9:14 amHMW 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.
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.
Quote from HMW on October 15, 2013, 4:10 pmSo 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....
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....
Other Portal 2 maps: Medusa Glare
Portal 1 maps: Try Anything Twice | Manic Mechanic
Quote from josepezdj on October 16, 2013, 6:26 amHMW 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!
@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).
- Code: Select all
sv_soundemitter_flush
This can be done with a logic_auto and a point_servercommand.
WOW, that was an awesome find!
@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).
Quote from Tmast98 on October 16, 2013, 4:31 pmjosepezdj 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!
@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 . 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 .
- Code: Select all
sv_soundemitter_flush
This can be done with a logic_auto and a point_servercommand.
WOW, that was an awesome find!
@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 . 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 .
Quote from HMW on October 19, 2013, 10:39 amyishbarr 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.txtI know this because I used custom soundscapes for rattmann returns.
Tmast98 wrote:Yeah, I'm referring to the one map you know I am . 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 .
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.
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:
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.
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 .
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.
Other Portal 2 maps: Medusa Glare
Portal 1 maps: Try Anything Twice | Manic Mechanic
Quote from Tmast98 on October 19, 2013, 12:51 pmHMW 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.txtI know this because I used custom soundscapes for rattmann returns.
Tmast98 wrote:Yeah, I'm referring to the one map you know I am . 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 .
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 .
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:
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.
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 .
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 .