Skip to content

File System Load Precedences

dGr8LookinSparky edited this page May 24, 2018 · 14 revisions

Table of Contents

Defaults

The defaults as a category are loaded before all mod folders and when designated by a game version are loaded before all other default files of a higher game version, and before non-default files in the base folder of the same game version and above (see #Versioned base Folders below). The defaults include a "special" cgame dynamic library, a "special" ui dynamic library, and pk3 files that are specified as default by a hard-coded hash list inside the client and tremded binaries. default files can be located anywhere the binaries have access to load. While the client is either at the main menu or at the download menu, only the defaults can be loaded (with the exception of the basemod files, as described in the next section).

basepath vs. homepath

The basepath would contain the installation binaries, shipped defaults, and any other files that might be included with an installation. One of the uses of the basepath would be to provide a common base installation folder for a multi-user system that would have a separate homepath for each user. When the basepath and the homepath are set to be separate paths, files can't be downloaded to the basepath from game servers.

The homepath would contain the user data (such as configs, demos, screenshots, condumps, qkey, and rsa key), as well as pk3 files downloaded from game servers. The organization of sub-folders is the same between the basepath and the homepath.

Files in the basepath are generally loaded before files in the homepath (or perhaps the loading precedence should treat files as if the homepath and basepath are the same folder and not provide additional precedence rules for the distinction since we have the defaults?). If the basepath and the homepath are set to be identical, there is effectively no distinction.

Versioned base Folders

The base folders are located in the homepath and/or in the basepath. Depending on the version of the game the client is connecting to, the base folders are generally available regardless of which fs_game is loaded (with some exception, to be explained shortly). Files that are in the base folders are loaded before files in other fs_game mod folders. The base folders are versioned, with the earlier versions being loaded before later versions. base folder versions older than the version of the game the client is connecting to, are not loaded. The current list of base folder versions are as follows:

  • base: files are loaded for version 1.1 games and up.
  • gpp: files are loaded for version gpp games and up.
  • base_1.3: files are loaded for version 1.3 games and up.
  • base_X.Y: Where X.Y is a version after 1.3 (doesn't have to be consecutive), files are loaded for version X.Y games and up.
(new feature to be added:) Game servers communicate the highest supported game version for each given pk3 file to the connected clients, and clients communicate their client version to the connected server. If a connected client/server fails to communicate versions, it will be assumed that it is a legacy client/server and versioning would be handled based on the network protocol of the connection.

basemod

The basemod folder is generally used for testing. Like the the default files, basemod files are loaded at the main menu and at the download menu. The basemod files are loaded as overrides after all of the default files and after all of the loaded versioned base folders, but before the fs_game mod and inactive mod folders. Files can't be downloaded from game servers to the basemod folder even if it is located in the homepath.

fs_game Mod Folders and Inactive Mod Folders

Like the base folders, the mod folders can be located in the basepath and/or in the homepath. The contents of fs_game mods, are loaded after all of the base folders for the specific game version are loaded. For pure and semipure servers, only files on the white list (and verified defaults) can be loaded from inactive mods, and the precedence of files in those folders are treated as if they were in the same active fs_game mod. The fs_game can be set to one of the base folders, and would not allow higher base folder versions to be loaded.

pk3 files

Platform Specific

QVM's & Dynamic Libraries

See also

New homepath layout

Clone this wiki locally