CryPak Details

Initialization

To ensure that .pak files can be accessed from game code at
anytime, the CrySystem module initializes CryPak in
CSystem::Init by calling the following functions:

InitFileSystem(startupParams.pGameStartup);

InitFileSystem_LoadEngineFolders();

Tip

A good spot to test game initialization is in inside
Game.cpp at the beginning of CGame::Init.

Pak file
type priorities

Whether CryPak processes files in the file system first, or files in
.pak files first, depends on the value of
pakPriority. The default value of pakPriority depends
on the configuration settings of your build, but it can also manually be changed by
assigning the console variable sys_PakPriority the values 0, 1, 2 or
3. The meaning of these values is show in the enum EPakPriority:

Pak
loading and search priorities

The reason for adding the new pak file to the GameSDK folder in this
example is because .pak files are loaded from the
GameSDK path first. The loading order and search order of
.pak file folders are as follows. Note that the loading order and the search order
are the reverse of each other.

.pak file load order

GameSDK:
<root>\GameSDK\*.pak

Engine:<root>\Engine\

Engine.pak

ShaderCache.pak

ShaderCacheStartup.pak

Shaders.pak

ShadersBin.pak

Mods: root\Mods\MyMod\GameSDK\*.pak (this assumes
that you run the game with the command argument -mod
"MyMod")

.pak file search order

Mods If more than one mod folder exists, they will be checked
in the reverse order in which they were added.

Engine

GameSDK

Javascript is disabled or is unavailable in your browser.

To use the AWS Documentation, Javascript must be enabled. Please refer to your browser's
Help pages for instructions.