I’ve been having trouble remembering the installation and setup sequence to modify Half-Life 2. If you are interested in making code changes to the game, here is the installation methods for the tools needed (as of this date). This assumes you have done the mod creation setup in Steam.
HL2 Setup:
- Install Steam, then install the following games and tools:
- Half-Life 2:
- Half-Life 2 Deathmatch
- Source SDK
- Source SDK Base
- Anything else you might want to utilize in your modding or gaming.
- Start the game you will be modding. This sets up the necessary files.
- Open Source SDK
- Select Half-Life 2 as your Current Game
- Select Create a Mod
- Enter the path of your mod as C:MyMod (anywhere you want to save this is fine) where MyMod is the name of your mod.
- Enter the same MyMod name in the mod name field
- Finish the installation of the SDK mod files
Files required (install these):
Setup of Visual Studio C++ 2005 (after installation above):
- Go to Tools – Options: Projects and Solutions – VC++ Directories
- In the upper right drop down box, select “Executable files” and add “…Microsoft Platform SDKBin” (replace with the correct path)
- Then select “Include files” and add “…Microsoft Platform SDKInclude” and “…Microsoft DirectX SDK (December 2005)Include”
- Then select “Library files” and add “…Microsoft Platform SDKLib” and “…Microsoft DirectX SDK (February 2007)Libx86″
- load the solution Game_HL2-2005 and go to the project properties for hl and client and add user32.lib to Linker->Input->Additional Dependencies (with spaces between entries)
Now that this is done, close everything down. Then open Visual Studio and your game solution again. Recheck that the setting you made are still there. Often, I find the user32.lib change wasn’t saved. Make this change again and save the client and the server each separately from under the File menu. Now when you Rebuild your solution, everything should work.
Note: you should build the Release HL2 and not the Debug HL2. This option is in the drop down at the top-middle of the program window.
Follow Me!