Skip to content

File System Load Precedences

dGr8LookinSparky edited this page May 26, 2018 · 14 revisions

Table of Contents

Engine Version Precedence

The engine version of a pk3 file specifies the earliest version of Tremulous the pk3 is used in. Engine version precedence is used by the hardcoded core assets and by the versioned base folders. The precedence order from lowest precedence to highest is:

  • 1.1: Has lowest precedence.
  • gpp: Special case naming convention for backwards compatibility. Has higher precedence than 1.1 but lower precedence than 1.3. gpp would technically have lower precedence than 1.2 if 1.2 was ever used.
  • 1.3
  • X.Y: X and Y are non-negative integers. Larger values for X have higher precedence than lower values for X. If X was equal for two different versions, larger values for Y have higher values than lower values for Y.

core assets

The core assets include a "special" cgame dynamic library, a "special" ui dynamic library, and pk3 files that are specified as core assets by a hard-coded hash list inside the client and tremded binaries. core assets 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 core assets files and basemod files are loaded. The between core assets files has its precedence hardcoded which includes being organized by engine version precedence, and can have special hardcoded precedence. core assets files with a higher engine version than the engine version of the current basegame, are not used.

Location Precedence

basepath & homepath

The basepath would contain the installation binaries, shipped core assets, 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.

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/precedence of sub-folders is the same between the basepath and the homepath.

Precedence is not factored into homepath-basepath differences. (However, what would be done in the case of the existence two different pk3 files with different two different hashes, but with the same pk3 file name, with one only in the homepath, the other only in the basepath, both having the same relative subdirectory locations?)

Sub-directory Precedence

Sub-directories are the folders in the homepath and/or the basepath. The precedence order from lowest precedence to highest is:

  • inactive mod folders
  • versioned base folders
  • core assets (as mentioned above, the core assets are not location based, however, there are precedence relations between types of locations the whole of the core assets)
  • basemod
  • fs_game

inactive mod folders

These are the top folders in the homepath and/or in basepath that are none of the versioned base folders, not the basemod, and not the currently active fs_game. For pure and semipure servers, pk3 files in the inactive mod folders are only used if they match the allowed pk3 hashes and names. For unpure servers, any particular pk3 file in the inactive mod folders is only used if it contains a needed file not found anywhere else.

Versioned base Folders

The versioned base folders are located in the homepath and/or in the basepath. Each versioned base folder is associated with an Engine Version, and Engine Version Precedence applies between the different versioned base folders. versioned base folders with a higher engine version than the engine version of the current basegame, are not used. The associations of the specific versioned base folders with the corresponding engine version are as follows:

  • base: associated with version 1.1.
  • gpp: associated with version gpp.
  • base_1.3: associated with version 1.3.
  • base_X.Y: associated with version X.Y Where X.Y is a version after 1.3 (doesn't have to be consecutive).

basemod

The basemod folder is generally used for local base overrides. Like the the core assets files, basemod files are used in the main menu in the download menu. Files can't be downloaded from game servers to the basemod folder even if it is located in the homepath. Generally only the fs_game has higher precedence than the basemod. (but what happens when the fs_game is set to a versioned base folder?)

fs_game

The fs_game can be set to any top level sub-directory in the homepath and/or the basepath, including any of the versioned base folders, but excluding the basemod folder.

pk3 files

Platform Specific

QVM's & Dynamic Libraries

See also

New homepath layout

Clone this wiki locally