Half-Life 2

Half-Life 2

75 ratings
How to: Half Life 2 Workshop Modding
By Vitamin Celsius
A foolproof guide for creating Half-Life 2 workshop mods.
   
Award
Favorite
Favorited
Unfavorite
Preparing Your Content Folder
To begin understanding HL2 Modding, let's start with the "custom" folder. We add mods into there, and they work like on the workshop.

Within the custom folder, each mod is essentially a folder containing a set of modified Half-Life 2 files that it replaces. Thus, every mod must mimic the same folder structures. The directories for Half-Life 2 look like this:


A mod might look like this:


The mod modifies something inside of the "materials" and "sound" folder. Once the game starts, it will "mount" (add into the game) these files, according to how they fit.

It's important to understand that you don't just paste the actual content folders directly into the custom folder - you need a "mod" folder containing them first. Like this:


If you haven't created a mod before, create a "custom" folder in your ep2 (recommended), episodic (which is ep1's files), or hl2 folders, which can be found inside Half-Life 2. Then, when you are in the particular game, you will load the mod automatically.

Place what you want into the folders, ensuring that you have correctly mimicked the placement of what you are modifying.


When disabling mods, it's neater and more convenient to place them into a "disabled" subfolder in custom, which will effectively disable them without visual clutter.

If your mod works, then what you're replacing will be replaced. If not, you might have forgotten a folder. When it does work, continue to the next section to upload it.
Uploading Your Mod
To locate the workshop uploader:

Click this to upload a new item.


Here are some points of advice for the uploader.

1. Your thumbnail should be square to look best. Make it clear even from a distance.

2. Understanding: Campaign or Content?

Content: The mod is mounted everywhere. Best for mods you want to play with Half-Life with.
Campaign: The mod is ONLY mounted when the campaign is selected from the workshop menu. It will be quickly dis-mounted otherwise. You can change maps in workshop campaigns with "changelevel", while "map" will likely cause an error due to dis-mounting the content.

3. When you are prompted for the folder to upload, upload the MOD folder, not the CONTENT folders INSIDE of it. If you followed the step of placing the mod inside the custom folder, here's a chart of which one to upload.
(ignore the mod folders inside of ep2; those are placed there to ensure they AREN'T mounted)

4. Once you've hit "Upload", the web browser will open with it displayed.

I recommend adding screenshots to give the mod a more professional feel, but this is better done via the normal browser, because the Steam file picker doesn't preview images.

To get there, you can find your uploads in the "Workshop" section of your profile.


Once there, click this to add images:


5. Afterwards, set your visibility to "Public", and now people can discover it.

Locating and Opening Mods
Workshop uploads can be difficult to find. Here's how.

1. Go to your Steam directory. The default choice is C:\Program Files (x86)\Steam.
2. WIthin Steam, go to Steamapps\Workshop.
3. Now, you have a variety of game IDs. The one for Half-Life 2 is 220, so this is the one we open.


4. We are greeted by a set of different numbers. What does this mean? These are the workshop IDs. These can be found by going to a workshop page in your web browser, and then copying the corresponding number. Want to do so conveniently? Type the last 4 numbers into the search bar and it will come up quickly.


In the section "Useful Modding Tools", I mention VPKedit. We will need this. Install it first.

Now, open workshop_dir.vpk in the correct folder - opening workshop_000 will not work.

Once you have it open, you can browse the contents in there, or extract it from the right-click menu.

Quick Fixes
Is the console complaining about VTF texture headers, and you can't get the texture to load? You need to lower the version of your VTF. It does not support version 7.5.

Are you SURE you have the right folders for the game to recognize it needs to replace it?

Why isn't my mod displaying in recent files? Sometimes the list stops updating for awhile. It sucks, but basically you just wait and it'll show up eventually.

"Failed to submit item update":
  • Try restarting hl2.
  • Try restarting steam.
  • Make your thumbnail image smaller. 512x is the typical recommendation.
  • Make your title and description longer. It might be some kind of spam filter going off?

DON'T put the files into a VPK. Half-Life 2 already does this, and it will make the mod inoperable.
Useful Modding Tools
Model Decompilation / Compilation GUI: Crowbar
Map Decompilation: BSPSource[github.com] (install Java [www.java.com] first)
Opening VPKs, packed BSP file extraction: VPKEdit[github.com] (I recommend GCFscape users switch over)
Seeing VTFs in the file browser: VTF Shell Extensions[archive.org] (Pick 1.7.5.1)

Better Hammer: Hammer++[ficool2.github.io]

Let me know if there's anything I'm missing.
Contact
Please post on my profile if you have questions or feedback. I'm not getting notifications and I have too many to manually check.
24 Comments
Efil Flah 11 Jul @ 6:12pm 
quick saves do not load in my mods. what can I do?
Vitamin Celsius  [author] 25 Apr @ 11:55pm 
No, unless it only modifies episodic content.
BIg-Heavy-Mann 22 Apr @ 6:25am 
Is it possible to make episode specific mods that doesn't affect base hl2? for example, A combine Model replacement that only appears in ep2 and not base hl2
LeonJee 26 Dec, 2024 @ 9:48am 
Thanks :steamthumbsup:
Vitamin Celsius  [author] 26 Dec, 2024 @ 12:32am 
You could just merge the animations for both models together and see what happens. But I'm not an expert there.
LeonJee 12 Dec, 2024 @ 1:27pm 
How could I make a mod for both base HL2 and the episodes?
I'm trying to reskin Lamarr but, because episode 2 has more animations for Lamarr, it breaks during that episode.
Or should I upload 2 mods for each episode?
Gamer Awesome 6 Dec, 2024 @ 3:36am 
coolness
Vitamin Celsius  [author] 5 Dec, 2024 @ 3:22pm 
Sure.
Gamer Awesome 5 Dec, 2024 @ 2:28am 
i recommend mentioning that episodic is ep1 though, its not that obvious
Vitamin Celsius  [author] 4 Dec, 2024 @ 9:57pm 
I've included a new chapter on locating and extracting workshop mods.