--- title: "Generating a .res File for Custom Map Content" excerpt: "What a .res file lists, why every custom model, sound, sprite and texture must appear in it, and how to build one with RESGen or by hand." category: "mapping" tags: "res-file, fastdl" image: "" read_time: "8 min read" ---
A .res file is the manifest that tells clients exactly which extra files a map needs, so the server can send them and FastDL can host them. Without it, a map that references a custom model or sound will load with ERROR models and silent weapons for anyone who does not already have the content. The .res lives next to the map — maps/de_mymap.res beside maps/de_mymap.bsp — and lists every custom file the map pulls in. This is how you build one correctly.
The file lists game-relative paths, one per line, to every custom asset the map references that is not part of stock CS:
models/ (custom props, view models)sound/ (ambient_generic, custom weapon sounds)sprites/ (glows, custom HUD art the map spawns)overviews/ (.bmp + .txt) if you made onegfx/env/ if the map uses a custom sky.wad you ship externallyYou do not list the .bsp itself, and you do not list stock content every client already has — that just wastes bandwidth. Paths are relative to cstrike/.
RESGen is the standard tool for this: it scans a .bsp, finds every entity that references an external file, and writes the .res. Point it at your compiled map:
RESGen.exe de_mymap.bsp
It produces de_mymap.res with the models, sounds, sprites and sky it detected. RESGen reads the entity data (ambient_generic sound paths, cycler/env_sprite model and sprite paths, the skybox name) so it catches things you would forget by hand. Always open the result and read it — RESGen finds referenced files, but it cannot know about content your map only loads indirectly.
A .res is plain text; you can author or patch it in any editor. The format is a list of quoted, game-relative paths, and comment lines start with //:
// de_mymap.res "models/props/mymap_crate.mdl" "sound/ambient/mymap_wind.wav" "sprites/mymap_glow.spr" "gfx/env/mysky_up.tga" "gfx/env/mysky_dn.tga" "gfx/env/mysky_lf.tga" "gfx/env/mysky_rt.tga" "gfx/env/mysky_ft.tga" "gfx/env/mysky_bk.tga" "overviews/de_mymap.bmp" "overviews/de_mymap.txt"
Add any file RESGen missed, and delete lines for content that is actually stock. Each path must match the real file on disk exactly — wrong case or a typo means that one file never downloads.
Two things mappers forget: the six skybox faces in gfx/env/ (named after your sky with the up/dn/lf/rt/ft/bk suffixes) and the radar overview in overviews/. If the map uses a custom sky set in light_environment and skybox, all six faces must be listed or players get a plain sky. List both the .bmp and .txt of a custom overview.
Drop de_mymap.res in cstrike/maps/ next to the BSP. The dedicated server reads it when the map loads and offers each listed file to connecting clients; FastDL then serves those files over HTTP if sv_downloadurl is set. The .res is the bridge between your map and the FastDL packaging step.
The most common way a .res goes wrong is drift: you add a new ambient sound or swap a model in a later build and forget to regenerate the manifest, so the old .res silently omits the new asset. Make regenerating the .res the last step of every compile-and-ship cycle, not a one-time job. Re-run RESGen on each new .bsp, diff the result against the previous .res, and add anything new. If you maintain the file by hand, keep it open next to your entity work so a new ambient_generic path goes into the manifest the moment you place the entity. A stale .res is indistinguishable, from the player's side, from having no .res at all for the files it forgot.
ERROR models or silent sounds — the asset is not listed in the .res (or the path is wrong). Add or correct the line.gfx/env/ faces are missing from the .res. List all six..res line and the file. Match it exactly..bsp, not the .map; it reads entity data from the BSP.The real test is a clean client with none of the custom content. Connect it to a server running the map with FastDL configured and watch the download screen — every file in the .res should transfer, and the map should then show its models, sounds and sky correctly. If something is still missing, compare the missing asset's path against the .res line for a typo. Then move on to packaging the whole map for FastDL.