Content Streaming

From Valve Developer Community
Jump to: navigation, search
Note.pngNote:Content streaming only works for official games hosted on the Steam content servers. This page is for reference only.

Steam supports streaming content delivery - that is, not having to have to have the whole game downloaded in order to play it. This is achieved with the GCF virtual filesystem and lists of files needed to perform certain actions, known as reslists. At the time of writing there are four types of reslist: engine.lst, preload.lst, precache.lst, exclude.lst and one list for each map file in the game.

Reslist files can be found at root/reslists/ in any cache that streams.

engine.lst

The engine.lst file is likely to specify the files required before the game becomes 'Ready to play' and can launch to the main menu. It should contain code, resources needed for the menu system, and any content that is needed for all maps in the game (for instance, HUD elements or in a traditional multiplayer game all weapon models). Half-Life 2’s engline.lst also calls for all of the game’s maps among other seemingly wasteful files. This is probably an error.

Note.pngNote:This file appears to be obsolete.

preload.lst

Defines what content Steam should download when the application is not running. Usually contains all reslists.

precache.lst

The content that must be present before a game launches. As such, defines how soon a user can load the game.

exclude.lst

Defines what content should be excluded, good to use in case there are some things NOT used in the map.

Map reslists

Each map reslist contains all of the content required to run that map. In Half-Life 2 there is also much unnecessary content in these files, particularly in the form of voiceover speech, that is never used in the map. This is again likely to be an error.

Consultation

engine.lst, preload.lst and precache.lst are consulted by Steam when updating or launching a game. Map reslists are probably only directly consulted when loading that particular map. When a list is consulted, the game will not proceed until all of the content it (and any sub-lists) references is fully acquired.

Generation

To generate a reslist file for your mod or map, use the following extra parameters when launching:

-w 640 -sw -console -condebug -nocrashdialog -makereslists -usereslistfile maplist.txt %1 %2 %3 %4 %5

"condebug" is used for logging, "console" allows to see the progress, using a 640x480 window makes loading faster and less likely to crash or freeze randomly, "makereslists" puts the game into reslist mode. "usereslistsfile maplist.txt" tells the game to look at maplist.txt and load any maps listed there in order to generate their reslists (if you only want to generate the three non-map reslists, leave this command out). The %X figures allow for passing additional command line arguments.

You could also make each reslist by hand but is it not recommended since the task is time consuming and tedious to do. Reslists do not accept wildcards.