Creating Resource Lists and Build Paks

Obsolete

As of CRYENGINE 3.6.7, we’re no longer building some cache files for packaged builds. The functionality to do so in the engine is still present, though it will likely be removed at a later date.

We anticipate this will not only improve performance on current platforms, it also simplifies the build process greatly and also removes some post-build issues, such as having to modify the startup.pak in order to remove the shipped sample levels which had file content inside.

The reason for this change is these cache files were built with 7th Generation consoles (Xbox 360 / Playstation 3) in mind and specifically, optical disk access performance. With the Xbox One and Playstation 4 requiring all apps be installed onto the hard disk, these cache files no longer offer performance benefits.

Among the files/folders affected are:

  • GameSDK/_FastLoad/startup.pak
  • GameSDK/_LevelCache/*.*
  • GameSDK/modes/*.*

Overview

These list files are created for the build process to read from and obtain assets for packaging inside dedicated .pak files, which are then used by the engine for pre-loading. This helps speed up menu loading and performance greatly.

The "sequence" version of the resource file is the exact sequence which the engine loaded each asset, rather than sorted by name. This file is provided for debugging purposes and is not required for the build process.

See the shipped .xml build scripts inside Bin32/rc/ folder for references and more information on building these pak files in the SDK.

It is recommended to update these files frequently, as assets change and these lists can become out-of-date, making them less effective and sometimes causing invalid warnings in console.

MP Menu pak

  1. Run the PC version.
  2. Set g_FEMenuCacheSaveList=1 in the console on the main menu before choosing multiplayer option.
  3. Enter the multiplayer menu.
  4. The output file is:
    • GameSDK\Levels\Multiplayer\mpmenu_list.txt
  5. Commit this file to Perforce.
  6. The build system will automatically build a new version of the MP menu pak for the build.
    • GameSDK\modes\mpmenumodels.pak

Game Mode switcher pak

  1. Run the PC version.
  2. Set sys_PakSaveLevelResourceList=1 in the console on the main menu.
  3. Enter the multiplayer menu.
  4. Enter the singleplayer menu.
  5. The output files are:
    • GameSDK\gamemodeswitch_sp\auto_resourcelist.txt
    • GameSDK\gamemodeswitch_mp\auto_resourcelist.txt
    • Important: Edit these files by hand to remove any files from the Localization folder, otherwise localization will break!
  6. Copy/rename them to:
    • GameSDK\Levels\Multiplayer\gamemodeswitch_sp_list.txt
    • GameSDK\Levels\Multiplayer\gamemodeswitch_mp_list.txt
  7. Commit them to Perforce.
  8. The build system will automatically build a new version of the game mode switch pak for the build:
    • GameSDK\modes\gamemodeswitch.pak

The creation of these files is a bit more hands-on, and requires you to traverse all of the menu options/functions to get the most out of the process.

  1. Run the PC version.
  2. Set sys_PakSaveMenuCommonResourceList=1 in the console on the main menu.
  3. Enter all menus and activation all options.
    • Ensure that you traverse the Singleplayer menu, then the Multiplayer menu and then back to the Singleplayer menu (so that the MP content is fully written).
  4. The output files are:
    • GameSDK\menucommon_sp\auto_resourcelist.txt
    • GameSDK\menucommon_mp\auto_resourcelist.txt
  5. Copy/rename them to:
    • GameSDK\Levels\Multiplayer\menucommon_sp_list.txt
    • GameSDK\Levels\Multiplayer\menucommon_mp_list.txt
  6. Commit them to Perforce.
  7. The build system will automatically build a new version of the menu common paks for the build:
    • GameSDK\modes\menucommon_sp.pak
    • GameSDK\modes\menucommon_mp.pak

Startup Pak

The final piece of the process is the Startup.pak file, located in the GameSDK\_FastLoad\ folder.

  1. Edit the system.cfg file located in the SDK root folder:
    • Add this line at the bottom: sys_PakSaveFastLoadResourceList=1
  2. Run the PC version.
  3. The output file is:
    • GameSDK\auto_resourcelist.txt
  4. Copy/rename the file to:
    • GameSDK\Levels\Multiplayer\startup_list.txt
  5. Some entries may have double slashes (//), manually edit these to only have one.
  6. Commit this file to Perforce.
  7. The build system will automatically build a new version of the startup pak for the build.
    • GameSDK\_FastLoad\startup.pak