Mounting multiple GCFs: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m ({{cleanup}})
Line 1: Line 1:
[[Category:Programming]][[Category:Tutorials]][[Category:Modding]]
{{cleanup}}[[Category:Programming]][[Category:Tutorials]][[Category:Modding]]
Sometimes we want to mount multiple GCF's, for example: if you have made a new mod, based on HL2MP, that needs to loads files from HL2MP '''and''' HL2. Well, of course you could copy the files to your mod but that's just wasting bandwidth and space :)
Sometimes we want to mount multiple GCF's, for example: if you have made a new mod, based on HL2MP, that needs to loads files from HL2MP '''and''' HL2. Well, of course you could copy the files to your mod but that's just wasting bandwidth and space :)



Revision as of 17:29, 29 March 2006

Broom icon.png
This article or section needs to be cleaned up to conform to a higher standard of quality.
For help, see the VDC Editing Help and Wikipedia cleanup process. Also, remember to check for any notes left by the tagger at this article's talk page.

Sometimes we want to mount multiple GCF's, for example: if you have made a new mod, based on HL2MP, that needs to loads files from HL2MP and HL2. Well, of course you could copy the files to your mod but that's just wasting bandwidth and space :)

Well, it's only a couple of lines of code:

The code

Open the file cdll_client.cpp and find the function int CHLClient::Init. Go to end of the function and add before return true;

filesystem->AddSearchPath("hl2", "GAME");
filesystem->MountSteamContent(220); 

That's all :)

This only adds HL2 but you can add more, possible values are listed in Steam Application IDs, although mounting a Half-Life or a Third party game GCF might not be beneficial.