Tuesday, July 23, 2013

Radiator 1-2 Handle with Care, Sourcemod gameinfo.txt fix for Steampipe VPK file format shift

In the last few weeks, Valve has dropped the GCF file format. A "GCF" was like a ZIP file containing thousands of game files. They were usually quite large (several GB was common) and so they were prone to file fragmentation, which balloons loading times as games need to load more files and assets. With Left 4 Dead, Valve started shifting their filesystem infrastructure to a "VPK" format -- instead of being stuffed into one or two colossal files, game assets are distributed among many more smaller .VPK files, improving loading times. Valve has now converted all their older games to use the new VPK file format too.

It's great, but it has also broken most Source mods made before 2013. Fortunately, the fix is pretty trivial: it involves editing the "gameinfo.txt" to mount the file assets in a different way / order than before.

If you want to play Radiator (or any single player mod based on Episode Two), just follow these instructions:

1) Download, install, and run Half-Life 2: Episode Two at least once. You can quit right at the main menu; we just have to make sure it unpacks itself fully and generates some files.

2) In your mod installation, replace the "SearchPaths" block of the gameinfo.txt with the code below. Or, for Handle with Care, just overwrite \Steam\SteamApps\ SourceMods\morematter\ gameinfo.txt with the updated gameinfo.txt here.

So, if you want to fix it yourself -- open up \SourceMods\YOUR_MOD\gameinfo.txt -- and in the SearchPaths block, you might see something like this:
         Game            |gameinfo_path|.
         Game            |all_source_engine_paths|ep2
         Game            |all_source_engine_paths|episodic
         Game            |all_source_engine_paths|hl2

To fix it, we have to replace that SearchPaths block with an updated version, one that will load the base HL2 files using the new VPK system:
game+mod                        |gameinfo_path|.
platform                        |gameinfo_path|.
game_lv                         hl2/hl2_lv.vpk
game+mod                        ep2/ep2_english.vpk
game+mod                        ep2/ep2_pak.vpk
game                            |all_source_engine_paths|episodic/ep1_english.vpk
game                            |all_source_engine_paths|episodic/ep1_pak.vpk
game                            |all_source_engine_paths|hl2/hl2_english.vpk
game                            |all_source_engine_paths|hl2/hl2_pak.vpk
game                            |all_source_engine_paths|hl2/hl2_textures.vpk
game                            |all_source_engine_paths|hl2/hl2_sound_vo_english.vpk
game                            |all_source_engine_paths|hl2/hl2_sound_misc.vpk
game                            |all_source_engine_paths|hl2/hl2_misc.vpk
platform                        |all_source_engine_paths|platform/platform_misc.vpk
mod+mod_write+default_write_path                |gameinfo_path|.
game+game_write                 |gameinfo_path|.
gamebin                         episodic/bin
game                            |all_source_engine_paths|episodic
game                            |all_source_engine_paths|hl2
platform                        |all_source_engine_paths|platform

3) Restart Steam to make sure the gameinfo.txt changes propagate.

4) Try running the mod now.

If that doesn't work, or you want to troubleshoot a Half-Life 2 or Episode One based Source mod, look at this forum thread for more details: "SteamPipe fix for HL2 and Ep2 Mods"