---
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"
---
<p>A <code>.res</code> 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 <code>ERROR</code> models and silent weapons for anyone who does not already have the content. The <code>.res</code> lives next to the map — <code>maps/de_mymap.res</code> beside <code>maps/de_mymap.bsp</code> — and lists every custom file the map pulls in. This is how you build one correctly.</p><h2>1. Know what belongs in a .res</h2><p>The file lists game-relative paths, one per line, to <strong>every custom asset the map references that is not part of stock CS</strong>:</p><ul><li>Models under <code>models/</code> (custom props, view models)</li><li>Sounds under <code>sound/</code> (ambient_generic, custom weapon sounds)</li><li>Sprites under <code>sprites/</code> (glows, custom HUD art the map spawns)</li><li>The overview under <code>overviews/</code> (<code>.bmp</code> + <code>.txt</code>) if you made one</li><li>The skybox files under <code>gfx/env/</code> if the map uses a custom sky</li><li>Detail textures and any custom <code>.wad</code> you ship externally</li></ul><p>You do <em>not</em> list the <code>.bsp</code> itself, and you do not list stock content every client already has — that just wastes bandwidth. Paths are relative to <code>cstrike/</code>.</p><h2>2. Build it automatically with RESGen</h2><p>RESGen is the standard tool for this: it scans a <code>.bsp</code>, finds every entity that references an external file, and writes the <code>.res</code>. Point it at your compiled map:</p><pre>RESGen.exe de_mymap.bsp</pre><p>It produces <code>de_mymap.res</code> with the models, sounds, sprites and sky it detected. RESGen reads the entity data (<code>ambient_generic</code> sound paths, <code>cycler</code>/<code>env_sprite</code> 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.</p><h2>3. Write or fix one by hand</h2><p>A <code>.res</code> 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 <code>//</code>:</p><pre>// 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"</pre><p>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.</p><h2>4. Include the skybox and overview</h2><p>Two things mappers forget: the six skybox faces in <code>gfx/env/</code> (named after your sky with the <code>up/dn/lf/rt/ft/bk</code> suffixes) and the radar overview in <code>overviews/</code>. If the map uses a custom sky set in <a href="/tutorials/light-environment-and-sky">light_environment and skybox</a>, all six faces must be listed or players get a plain sky. List both the <code>.bmp</code> and <code>.txt</code> of a custom overview.</p><h2>5. Place it and let the server use it</h2><p>Drop <code>de_mymap.res</code> in <code>cstrike/maps/</code> 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 <code>sv_downloadurl</code> is set. The <code>.res</code> is the bridge between your map and <a href="/tutorials/package-map-for-fastdl">the FastDL packaging step</a>.</p><h2>6. Keep the .res in sync as the map changes</h2><p>The most common way a <code>.res</code> 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 <code>.res</code> silently omits the new asset. Make regenerating the <code>.res</code> the last step of every compile-and-ship cycle, not a one-time job. Re-run RESGen on each new <code>.bsp</code>, diff the result against the previous <code>.res</code>, and add anything new. If you maintain the file by hand, keep it open next to your entity work so a new <code>ambient_generic</code> path goes into the manifest the moment you place the entity. A stale <code>.res</code> is indistinguishable, from the player's side, from having no <code>.res</code> at all for the files it forgot.</p><h2>Common errors</h2><ul><li><strong>Players get <code>ERROR</code> models or silent sounds</strong> — the asset is not listed in the <code>.res</code> (or the path is wrong). Add or correct the line.</li><li><strong>Sky is plain / wrong for players</strong> — the six <code>gfx/env/</code> faces are missing from the <code>.res</code>. List all six.</li><li><strong>One file never downloads, rest work</strong> — a case or spelling mismatch between the <code>.res</code> line and the file. Match it exactly.</li><li><strong>RESGen produced an empty or tiny list</strong> — run it on the compiled <code>.bsp</code>, not the <code>.map</code>; it reads entity data from the BSP.</li><li><strong>Listed stock files too</strong> — harmless but wasteful; the client re-downloads content it already has. Trim stock entries.</li></ul><h2>Verification</h2><p>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 <code>.res</code> 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 <code>.res</code> line for a typo. Then move on to <a href="/tutorials/package-map-for-fastdl">packaging the whole map for FastDL</a>.</p>









