NOTE: This is a post I put on the Steam forums about this same topic, but with some new information, so I'm posting it here too.
I am now writing the code that allows players to mount content for their other Source engine games and I need to figure out the proper way to do this in 2013.
So far I have been able to mount CS:S content by using this in my gameinfo.txt:
- Code: Select all
FileSystem
{
SteamAppId 243750
SearchPaths
{
game+mod hl2mp/custom/*
game+mod hl2/custom/*
game+mod "|all_source_engine_paths|../Counter-Strike Source/cstrike/custom/*"
game+mod+mod_write+default_write_path |gameinfo_path|.
gamebin |gameinfo_path|bin
game_lv hl2/hl2_lv.vpk
game+mod hl2mp/hl2mp_english.vpk
game+mod hl2mp/hl2mp_pak.vpk
game "|all_source_engine_paths|../Counter-Strike Source/cstrike/cstrike_pak_dir.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
game+game_write hl2mp
gamebin hl2mp/bin
game "|all_source_engine_paths|../Counter-Strike Source/cstrike"
game |all_source_engine_paths|hl2mp
game |all_source_engine_paths|hl2
platform |all_source_engine_paths|platform
}
}
First I'll describe what I did and why, and then at the end I'll explain why I think this method is not the proper way to do it.
- Code: Select all
game+mod "|all_source_engine_paths|../Counter-Strike Source/cstrike/custom/*"
This line is so the player's CS:S addons (the content in their CS:S custom folder) can also be used in my game.
- Code: Select all
game "|all_source_engine_paths|../Counter-Strike Source/cstrike/cstrike_pak_dir.vpk"
This line mount the majority of CS:S content. For other games like TF2, you will have to include MANY different VPK's from their folder. It gets messy, but works just the same. Note that maps and some other content are NOT in these VPKs!
- Code: Select all
game "|all_source_engine_paths|../Counter-Strike Source/cstrike"
This will mount the remaining files such as maps and any other loose files that the player has sitting in their CS:S folder.
THE PROBLEMThe problem comes in the way that the CS:S folder itself is located. As far as I can tell, it works like this:
- Start in C:\Program Files (x86)\Steam\SteamApps\common\Source SDK Base 2013 Multiplayer
- Move up 1 folder level to C:\Program Files (x86)\Steam\SteamApps\common
- Look for a folder named Counter-Strike Source in this location
But what if the player has their CS:S installed onto a different hard drive? Their
Counter-Strike Source folder wouldn't even be on the same drive letter, and certainly not in
C:\Program Files (x86)\Steam\SteamApps\common.
What exactly does "|all_source_engine_paths|" mean? And are there any other variables that can be used here?
NOTEMounting content from HL2 and HL2: MP is very different than mounting content from other games because the HL2 and HL2: MP content is included within the Source SDK Base 2013 Multiplayer folder itself. Trying to mount TF2 or CS:S content the same way that HL2 and HL2: MP content is mounted does not work.
On a side note, I am also still trying to figure out what order things should be mounted in to insure that my game's files takes priority over the ones mounted from TF2 or CS:S.