This is an addendum to the original tutorial series, concerning other things to consider for your mod
that is not covered in previous articles, and outside the realm of actual mapping, modelling, programming, etc.
Other things you can customize
The general rule of thumb is that you can always
omit stuff that you don't want to customize, as the game will read the default files from Half-Life (the valve folder).
Whereas WON GoldSrc spins up your physical CD drive looking for the soundtrack, they're included in the Steam version in the
folder, comprised of a bunch of mp3 files. Customizing these simply involve adding mp3 files of the same name in the same location in your mod.
This file defines the UI scheme for GoldSrc's Steam UI, but you can have a custom one for your mod. Things such as UI colours, fonts for various elements, and borders, are defined here.
To customize your mod's UI scheme, copy the original from
The following block, for example, defines the font properties for the game menu.
"tall" "18" // increase this to make menu items larger
"antialias" "0" // set to 1 to enable anti-aliasing (why wouldn't you want anti-aliased texts?)
And the following block defines its colours and metrics:
"MenuColor" "200 200 200 255"
"ArmedMenuColor" "255 255 255 255"
"DepressedMenuColor" "192 186 80 255"
"WidescreenBarColor" "0 0 0 0"
"MenuItemVisibilityRate" "0.03" // time it takes for one menu item to appear
This file is executed after
, and is a way to have a persistent command list that is not managed by the game (config.cfg gets overwritten by the game when cvars and keybinds change.)
One use case for userconfig.cfg is to define aliases, which is not possible with config.cfg. These are strings of commands you can execute in a single command, and bindable to keys. Aliases prefixed with + or - work as a pair, and used for keybinds (the + alias is executed on key down, the - one on key up). You can use this, and some script-fu, to have, for example, the Ctrl key toggle ducking, or a "bullet time" key.
Multiplayer Advanced dialog with a custom user.cfg
This pair of files is a way of mapping the GUI to cvars in ways not covered by the standard engine GUI.
settings.scr corresponds to the Create Server > Advanced dialog
user.cfg corresponds to Options > Multiplayer > Advanced dialog
You can, for example, add a checkbox that toggles whether the game ignores textures embedded in maps (
), a text box to set your FOV (
), or a drop down that lets you select between filtered or pixelated textures a-la software mode (
This file, located in
, is the list of keybindable commands, as seen in the Options > Keyboard
dialog. You may want to customize this file to give yourself and other players easier means to bind keys to custom aliases you may have defined in
A commandmenu in game.
Half-Life and many first-party mods supports
, though this feature is largely unknown outside of the Counter-Strike community.
You can use this feature, for example, to add a chapter selection menu, change cvars on the fly, or add a dev menu.
However, you'd need to edit
and add a keybind option for
as per aforementioned.
If you want to have your menu's command accept a text input (such as entering a map name), set
messagemode <command_name> as the command. This also applies to keybinds/aliases described elsewhere on this page.
This file manages the skill system, defining NPC's health, ammo pickup, and damage dealt. Although it is strongly advised against
editing these, it is one way of mod
ifying the balancing of a mod without diving into code.
A Mod, or an Addon Pack? The
Steam GoldSrc supports the [over]loading of files without overwriting the base file through the
folder. This is also the case for HD and server-downloaded content via the
Thus, some circumstances where separate mods were required before, might now be a simple drop-in into the
folder, without the risk of permanently corrupting your game. To disambiguate, lets call the _addon folder use case as an Addon Pack instead of a Mod.Is my content a Mod or an Addon Pack?
Your content might be an Addon Pack if:
- It's purely cosmetic.
- They are deathmatch/teamplay maps.
- They are edits or additions to another base game/mod.
- It's a short mission pack (but can still be considered a mod as otherwise people can't access your maps without typing in the console.)
- It's basically Half-Life but with a gimmick that doesn't involve custom maps.
- People might want to mix and match your content with other people's content.
On the other hand, you must distribute as a Mod if:
So, what changed?
- You have custom server/client code.
- Your content is entirely self-contained.
An addon pack installs differently to a mod. Firstly you don't need the liblist.gam just to add, say, custom models to Half-Life. Secondly, players can mix and match other things in their games, and they can toggle them on or off (details below), or otherwise jump between vanilla and modded setup quickly.Other things about addons
To toggle the loading of this folder, go to Options > Video > Enable custom content
The addon system also
works for mods! You can, for example, have addons for Poke646 populating the
folder, and toggle them on and off.
The kitchen sink approach of this system is not great (compared to Source's
folder) but it beats needing to surgically remove files, or reinstalling whole mods and losing saves due to corrupted modifications.
Distributing your mod/addon pack
You have your mod (or an addon pack). You want others to play them. You need to send these files to them. This raises a question: how, where, and which files?
What to [not] include
This depend on your intention, whether it is a general release, or a source release.
In general, whatever game engine file is custom to your mod, include them. To be absolutely safe, run your map through a RES file generator. Whatever files it lists in there, include them, unless they're part of the standard Half-Life asset which you don't have to.
But for a general release, you wouldn't want to include the working file or file sources (e.g. the PSDs for the textures); only the end products needed for the game engine would suffice. These are the maps, models, sprites, sounds, skyboxes, textures, the other files aforementioned earlier on this page, etc.
- Compile your map with
-wadinclude, so that all textures are baked into the BSP and you don't need to distribute the WADs you used.
game_text instead of a modified titles.txt means not having to override someone else's titles.txt (applicable to custom mission addons only.)
- If your mod contains custom code/entities, include the FGD.
- If your mod has a distinct style/setting, include your WADs (and your .rad files too!)
Packing the files
The best practice is to pack the files into a ZIP archive, as most OSes natively support it. Other archive formats would require players to have the associated archiver programs, and the compression improvements are generally insignificant.
Do not create an installer, as was common in the 00s. Those often make assumptions that can be obsoleted (e.g. past installers assuming you have WON or pre-SteamPipe Steam configurations), create clutter on people's systems (e.g. desktop icons, entries in "installed programs", and uninstallers, all of which cease to work if you move your Steam library), and generally confuse more than help contemporary players.
- With the Half-Life directory open, take the folder that contains your mod, and put it into an archive.
- Once the archive is created, check that inside the archive is that same folder, and the directory structure is preserved.
- If you have working files you wish to exclude, remove them at this stage.
For addon packs:
- With the addon folder open, select every file related to your content pack and add them to an archive.
- Once the archive is created, check that the archive contains your files and the directory structure is preserved (not flat.)
- If you have working files you wish to exclude, remove them at this stage.
To help would-be players, include a readme file in the archive directing them to extract the archive into the correct installation folder. Also provide them information to verify what a correct installation looks like.
Example install instruction for a mod:
1. Extract the archive into <steam/library/path>/steamapps/common/Half-Life
2. After extraction, find the folder <modfolder> inside the above path, in the same place as the valve folder.
Example install instruction for an addon pack:
1. In <steam/library/path>/steamapps/common/Half-Life, create folder named "<gamefolder>_addon" if it doesn't already exist.
1. Extract the archive into <steam/library/path>/steamapps/common/Half-Life/<gamefolder>_addon.
2. After extraction, find the files inside the <steam/library/path>/steamapps/common/Half-Life/<gamefolder>_addon folder.
Never instruct players to install into
valve (or other mods) and overwrite the existing files. You may corrupt their existing games/mods, and when they're done with your stuff (or if your stuff breaks their game) they have no choice but to reinstall the game/mod, and they wouldn't be happy about it.
Hosting the files
There are several places on the Internet that can host your mod/addon files, including:
Some of these sites require you to fill a form, so have these information figured out in advance:
- General description and summary
- Installation directions
- Tools used
which brings us to...
Note: this is not legal advice.
It's the last thing on your mind when you're in the zone. You might assume it'd be one of "here's the files, do whatever" or "credit me if you do stuff with it" and you'll be correct, but the platforms you distribute your mod under has other assumptions, and you may not want to go with the default.
The website https://choosealicense.com/
can help you decide which license you want to distribute your mod under. Then, select the appropriate license type on the hosting website's upload form.
A few pointers:
- GameBanana defaults to Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0). The "NoDerivatives" clause may not be what you want if you're putting out things like prefabs; in general preventing others from having their own take on your stuff and sharing it legally.
- Use GameBanana's custom license checklist. It presents you with a checklist of what you want to allow.
- TWHL defaults to "All rights reserved." Use any other license, unless you're absolutely sure you want to keep it a sealed box.
- A GPL license means you need to include your source code.
In The End
Congratulations! You've published your mod (or addon pack)!
Hopefully the series has been helpful in assembling and getting your stuff out into the world, for other people to enjoy.
Also it's past midnight and I have to postpone integrating this to the rest of the tutorial's navigation.
-wadincludecompile command-line argument and
game_textentities. I think they are better suited for addon pack where you "can't" edit the original files and copying/pasting the original ones is not an option as if everyone was doing that, it would "overlap".
For mods, shipping the WAD(s) and using titles.txt is fine since it's distributed as "standalone".