liblist.gam Last edited 4 months ago2023-11-28 10:31:46 UTC

Work In Progress
This page is still a Work In Progress and thus contributions are welcome.

Note to contributors: before "blindly copying/pasting" what other websites/pages says (like this one), please validate through testing that it works!

Preamble (terminology)

This page will use specific terminology to refer to some things. Here's a list of them:

Purpose

The main purpose of liblist.gam is to "describe" to GoldSrc (and eventually Steam) a game or mod. This is a text file that can be opened and edited with a text editor like Windows's Notepad. Its content might be scary at first, but this page is here to describe its content and such.

First, any line that starts with // is a "comment" on said line. This means that the engine will ignore and skip straight away to the next one until everything has been read. Comments are useful to humans (modders) as they work like "taking notes during a school lesson". Programmers should already be familiar with this notation and before those people ask: no, multi-line comments /* */ are NOT working.

Second, aside from these "comments", the contents must be K/V pairs or an empty line. Anything else might crash the engine or cause unexpected behavior. Values, no matter the type, should always be enclosed in "double quotes".

Finally, this file is always located inside at the root of a "game/mod folder" (bshift, cstrike, czero, czeror, dmc, dod, ricochet, tfc, valve, mymod...) Said "game/mod folder" is located at the root of the Half-Life installation (or "self-published" game/mod's copy of it).

Examples of valid hierarchies: Examples of incorrect hierarchies (the game/mod will not be recognized by Half-Life and Steam) and why:
About some command-line arguments
For the sake of simplicity, this page will assume that no command-line "overrides" like -dll are used.

Key/value pairs that work regardless of platform/GoldSrc version

This is the list of key/value pairs that are working everywhere.
Key Type of value Description
clientcrccheck Boolean For multiplayer mods, if this is enabled, clients with a different client game/mod binary than the server's will not be able to connect. This might be useful if you want servers to check that players have not modified (usually for cheating) or running an obsolete version of your mod's client.dll.
edicts Number Override the engine's default amount of "edicts" (entity dictionaries) to use. Useful for mods with extremely complex geometry, entity setups that would not work with the default value.
fallback_dir Game/mod folder name If present, add the specified mod/game as "default" when seeking content. The most common use case are mods that want to use Opposing Force as a base without additional programming and shipping its assets with the mod (in liblist.gam, this example would be: "fallback_dir" "gearbox").
fallback_maps Boolean This only works if fallback_dir is set. For multiplayer mods, if true, this will hide the maps from the "default" game/mod in the "Create Server" dialog. Example: a mod that uses Opposing Force as base and has this enabled will not show the op4ctf_crash map in the "Create Server" dialog.
game Text The name of the game/mod as it will appear in the window's title bar and "Custom Game". For games/mods not "self-published" on Steam, this will also be shown in Steam's library (the opposite being the name of the application in Steamworks itself).
gamedll Relative path to a file from mod/game folder Which server binary to use for Windows. If file is missing from the game/mod's folder, then the filesystem will fallback to the "default" game/mod (either fallback_dir if set or valve if not). Do note that the path separator on Windows is the backslash character (\) so make sure you're using it and the path is correct (example: dlls\hl.dll).
gamedll_linux Relative path to a file from mod/game folder Which server binary to use for Linux. If file is missing from the game/mod's folder, then the filesystem will fallback to the "default" game/mod (either fallback_dir if set or valve if not). Do note that the path separator on Linux is the forward slash character (/) so make sure you're using it and the path is correct (example: dlls/hl.so).
startmap Filename in maps folder Name of the first map to launch in singleplayer after choosing the difficulty (skill) level.
trainmap Filename in maps folder Name of the map to launch in singleplayer after choosing "Hazard/Training Course" option.
type Specific text Possible values are singleplayer_only or multiplayer_only. On Steam GoldSrc, the only change that this K/V pair impacts is the presence and position of the "Multiplayer" tab in the "Options" dialog. If singleplayer_only, the tab is hidden, if multiplayer_only, the tab is first (on the left) and if the K/V is omitted, the tab is last (on the right).
About the following K/V pairs
In the next table, the K/V pairs exists in the engine. Although these will only make a difference for multiplayer mods as they are part of the "network messages" between the clients and the server. Do notice that "games" is not part of the previous sentence because these K/V will do nothing on actual games/mods by Valve like Half-Life, Opposing Force, Counter-Strike and so on.

For the sake of simplicity, it is recommended to not put them in your liblist.gam as those are purely for the sake of "verbosity" with a network packet tracer or special program like HLSW. The reason they are in this page in the first place is purely for education/informational purposes.
Key Type of value Description
cldll Boolean Indicates the engine that the mod has a client binary.
size Number Size of the mod in bytes. How this is calculated and checked is unclear.
svonly Boolean Indicates the engine that the mod/game has only a server binary (no client counterpart).
url_dl URL URL to the download page of the mod. Probably used by WON's "Custom Game" as well.
url_info URL URL to the website of the mod. Probably used by WON's "Custom Game" as well.
version Text Version of the mod.

Key/value pairs that work on Steam GoldSrc only

This is the list of key/value pairs that are working only on the Steam platform/engine.
Key Type of value Description
detailed_textures Boolean If true, show the "Detailed Textures" checkbox (a feature added to GoldSrc since Counter-Strike: Condition Zero) in the "Video" options tab. If false or missing from liblist.gam, the checkbox is hidden (although details textures can still be set through the r_detailtextures CVAR). Side note: the checkbox will be greyed (can't be ticked/unticked) if the engine r_detailstextures_supported CVAR is set to "false". During the engine's initialization process, that CVAR's value is updated depending if the graphics card/chipset running the engine supports the GL_ARB_multitexture OpenGL extension or not.
icon Relative path to a file from mod/game folder Steam will use this value as the "base filename" for the icon in the library. If you set a value of foo, then Steam will seek for foo_big in TGA format first or PNG format second. Not setting this K/V pair will not provide an icon (even if you have a game_big file). This is NOT to be confused with the icon for the window's title bar (which uses game.tga).
mpfilter Text For multiplayer mods, this is a "pattern" to tell the "Create Server" dialog which maps should be filtered out in the maps list. Example #1: a mod that is both singleplayer and multiplayer has its singleplayer maps names prefixed by sp_ and dm_ for multiplayer deathmatch. Setting a value of sp_ will hide all sp_ maps from the list. Do note that the pattern is case-sensitive (although your filenames should be fully lowercase to prevent issues on Linux). For people who have C programming language knowledge, this is the equivalent of the result of strstr(mapName, pattern) == false. Unrelated note: GameUI does "internal special treatments" for key game with values Half-Life and Opposing Force.
nohimodels Boolean For multiplayer mods, if true, this will render player models using their "lower definition body". For a more in-depth example of how it works, open models/player/gordon/gordon.mdl with any model viewer and look at the different bodies on the first body group.
nomodels Boolean For multiplayer mods, if true, this will hide the ability for players to choose their model in multiplayer games in the "Multiplayer" tab in the options. Useful for mods where the model is enforced through game code (like Counter-Strike).
secure Boolean For multiplayer mods, indicates if server operators can use VAC (Valve Anti-Cheat) to protect their servers against cheating.
The following K/V pairs have been added in the Half-Life 25th anniversary update and thus will only work on said update:
Key Type of value Description
animated_title Boolean If true, tells the menu system that the mod has an animated logo for the main menu screen. Otherwise, set it to false.
hd_background Boolean If true, indicates the menu system that there is a HD background available for the main menu. Otherwise, set it to false. The menu system uses this value to determine if it should load the HD_ counterpart of Background(Loading)Layout.txt in the game/mod's resource folder or not.

Key/value pairs that work only on WON

Notice for "self-published" Steam games/mods
In the next table, K/V pairs marked with (*) indicate that an equivalent to said pair exists but somewhere in Steamworks's back-end rather than inside of liblist.gam.
Key Type of value Description
developer Text (*) The name of the developers that created this game/mod.
developer_url URL (*) Link to the developers website or something else.
hlversion Text The required Half-Life version to run this game/mod. Trying to activate a game/mod with an obsolete Half-Life version would have caused a popup showing up asking the player to download and update his Half-Life installation.
manual URL (*) Link to the manual of the game/mod on the Internet.
mpentity Entity classname Classname of the entity used to detect multiplayer maps.

Obsolete key/value pairs

This is the list of key/value pairs that are working but no longer needed as of 2022.
Key Type of value Description Why it's obsolete?
gamedll_osx Relative path from mod/game folder Which server binary to use for old Mac running on Intel platform. GoldSrc has not been ported for modern Mac running on ARM platform.

How to setup the file properly

This section describe various setups for liblist.gam depending on the context of your game/mod. Pick the section that suit best your mod and follow it.

Mods that rely entirely on custom code

Copy/paste liblist.gam from the valve folder into your mod's folder, change the game value to the name of your mod and the startmap value to the name of the first map. If you have a custom training map, change the trainmap value as well.

If you changed the name of the server binary (through Visual Studio and/or Makefiles) from hl to something else, make sure to update the gamedll values to the right name.
game "My Mod"
startmap "my_first_map"
trainmap "my_tutorial_map"
mpentity "info_player_deathmatch"
gamedll "dlls\mymod.dll"
gamedll_linux "dlls/mymod.so"
gamedll_osx "dlls/mymod.dylib"
secure "1"
type "singleplayer_only"
animated_title "1"
hd_background "1"

Mods that rely on another game/mod's code without changes

The common scenario for that use case is making a mod with Opposing Force's monsters, items, weapons without changing any code.

Copy/paste liblist.gam from the "base" game/mod, in this case: Opposing Force so gearbox folder into your mod's folder. Change the game value to the name of your mod and startmap to the name of the first map to launch. If you have a custom training map, change the trainmap value as well. There is one important addition to make, add the fallback_dir key with the value of the base game/mod's folder (in our example, this would be gearbox).

The file should look similar to this one:
game "My Mod Based On Opposing Force"
url_info "www.gearboxsoftware.com"
url_dl ""
version "1"
size "96000000"
svonly "0"
secure "0"
cldll "1"
hlversion "1111"
gamedll "dlls\opfor.dll"
gamedll_linux "dlls/opfor.so"
gamedll_osx "dlls/opfor.dylib"
startmap "my_first_map"
trainmap "ofboot0"
fallback_dir "gearbox"

Mods that rely entirely on Half-Life without custom code (mini-mods/maps pack)

Just copy/paste liblist.gam from the valve folder into your mod's folder and change the game and startmap values into the name of your mod and first map to start respectively. If you have a custom training map, change the trainmap value as well. The rest will likely not require a change and thus be identical to the Half-Life's counterpart.

End result should be:
game "My Mod"
startmap "my_first_map"
trainmap "t0a0"
mpentity "info_player_deathmatch"
gamedll "dlls\hl.dll"
gamedll_linux "dlls/hl.so"
gamedll_osx "dlls/hl.dylib"
secure "1"
type "singleplayer_only"
animated_title "1"
hd_background "1"

Comments

You must log in to post a comment. You can login or register a new account.