What's a RES File and How To Use Resguy

What's a RES File and How To Use Resguy

Submitted by: Chimz76Chimz76 on 28 Nov 2025 20:18
Last updated by: Chimz76Chimz76 on 28 Nov 2025 20:21

I would recommend reading the Steam Version as it offers better readability and support. Click here to head there.

RES File Explained

A RES file (short for Resource File) is a list of all the custom assets used in a map, such as models, audio, sprites, etc. Any custom asset that is used or even referenced in a map is logged within this file.

What is it for?

RES files are only used for Multiplayer purposes, such as Sven Co-op or Half-Life Deathmatch. In this guide I will focus on Sven Co-op but the same principles apply to HL:DM and CS 1.6. Each map has its own unique RES file, sharing the same name. When a Player joins a Server that's running a custom map, by default only the map file will sent to the Client and downloaded. All the other content is left behind, meaning that the Client will either not be able to join, getting a "Missing files" error, or will join but cannot hear the custom sounds, see the custom models, etc.

Servers use a map's RES file to know what additional files they need to send over to the client. These files are crosschecked between server and client in this manner:

  1. First, the Server checks if the Client has the file or not.
  2. If the Client does not have it, the Server sends it over to be downloaded.
  3. If the Client has it, it is crosschecked to make sure it matches the one in the server. There can be instances where files share the same name but contents differ. If they match, that file is approved and skipped. If not, the Client gets Dropped with an error saying "X file does not match with the one on server". Servers don't automatically overwrite these files and in such cases the Client must delete said file manually and connect again to have the matching file downloaded.

How do I create a RES file?

RES files are simply a bunch of references written as addresses. Here's an example of a RES file opened in Text Editor from my Sven Co-op map Lab Break:
27E7EE6085069D3DF22735024B633089CEFB8129
As you can see, each file reference is its address from root. This address is not limited to a single content folder (e.g. svencoop, svencoop_addons, etc.), meaning if the desired file is not in the first one, it will check others for it automatically.

What you will notice in the image is that it includes both custom content (such as the frank wav files) and default vanilla content (such as Opfor.wad). This brings up something important;

Do not include default files.

Addressing default files will just cause players who are using custom skins (that have replaced default files) to run into issues joining the server, doing your map no good. The Resguy Tool automatically skips over default files. You could still force Resguy to include them but I would highly recommend against it.

Also, going back to how mismatched files can cause issues for clients, it is always best to place your map's custom assets in unique folders (e.g. place your models in models/[mapname]/…) and not in root or in folders used by other maps.

Okay, now that we know all about what RES files are, let's learn how to make them using Resguy.

What is Resguy

While you can certainly write RES file by hand, you will inevitably miss a couple and pull out your hair trying to find them (and won't). That's where Resguy (created by w00tguy) comes in. I should point out that Resguy is for Sven Co-op only. If you want to make one for HL:DM, use Resgen.

So, what does Resguy do? It is an application built to:

  1. Find all required references and skip the unnecessary
  2. Help you troubleshoot and find missing references
  3. Create the RES file for you

How does Resguy know what files are needed? It reads the BSP file and through its internal references (such as Entities) makes a list of all assets that are used. This even includes Entities that exist but are never triggered. It also reads the actual assets to see if they have any dependencies.

"What do you mean assets with their own dependencies?" I hear you ask. Well, some assets such as Models can reference other assets such Audio. As an example I've decompiled the default HL Zombie Model with the Crowbar application and inside its QC file (where its data such as animations are stored) I have scrolled to the Walk animation.
505AEB644EC46927B9E60A24CDED087894E8E705
The lines starting with "event" are times when the zombie's feet touch the ground and make a footstep sound. Said sounds are referenced directly in this QC file. Models that requires sounds to be played at specific times can either call them directly through script (like weapon models) or will use events to call for required audio files to play (like the Zombie one we just checked). This goes for custom models too. They may use default (existing) files or custom ones. Resguy will check all used model assets and find these references for you.

How do I use Resguy?

First, go to its Github Page and in the Releases part (located on the right) get the latest version. Once downloaded place resguy and resguy_default_content.txt into a content folder (e.g. svencoop, svencoop_addon, or something you made). Now simply open resguy.exe.

First, it'll ask you what map you want to make the RES file for. Input your map's file name. The map I'm going to showcase is called "cweps.bsp". I can input either "cweps.bsp" or just type "cweps" without the format. Both are acceptable.
32BC989A9285F0E665C3712C23376ABD0955EABD

After that it will present you with 9 options for creating the RES file. You can check or uncheck any of them. The options are:

  1. test = Don't write any .res files, just check for problems.
  2. allrefs = List all references for missing files (normally clipped to 3)
  3. printskip = Log content that was skipped because it was invalid, unused, optional, or listed in resguy_default_content.txt
  4. extra = Write server files to .res file (not recommended*)
  5. extra2 = Write server files to a separate .res2 file
  6. missing = Write missing files to .res file (not recommended**)
  7. missing3 = Write missing files to a separate .res3 file
  8. series = Write the same files into every .res file (includes BSPs for other maps in the series)
  9. log = Log output to mapname_resguy.log
The most useful one is number 2which lists all the references for the missing files. In the image below, I have checked options 1 and 2. Now, when I press Enter it will print the missing files for me. (I checked option 1 at this stage because I don't want to generate the RES file just yet)
621F3A1437F84ACE0B11F667E8D062327183DC6C
Now, here's the dependency part I talked about. In the image below you can see it says "11 files missing" and has printed all of them.
A700213B21BAB5F6A3E88DED567381D553F1BB9E
While there's a lot to look through, allow me to focus your attention to this single missing file for now. See image below.
3F7E6B0C1447DF406BECFFCD5195D0382A7D2B73

In the image you can see it says:
"The audio file in sound/sound/magic/spellfail.wav is missing. Where is it referenced? It's referenced in cweps.bsp (the desired map) which has an entity called weapon_custom that references/uses a model called v_spellcast.mdl (located in models/crypt/weapons/) and that model is referencing this audio file in its Event(s)."

Sure enough, when I decompile the model and check its QC I see that this particular model (which has been taken from the Master Sword: Continued mod) is referencing the missing audio files in its animations.
E91B526EAD35416BED17FB70BE3133C239CB69C5

All of this brings up a question:

Do I need to account for every referenced missing file?

Fortunately, the answer is no. If these files are missing, they will not cause a crash or gatekeep the player. So, if something is not referenced in the RES file, its file is not sent over to the Client and they will simply not hear/see it. When this is the case where it's an audio file you don't care about that is referenced in a model, it will not deduct from the experience and will only print an error in the Console.

Now, how to make the RES file with Resguy? Actually, nothing ever stopped you. Resguy will always make your RES file in the same location as your map (whether its in svencoop or svencoop_addons or etc.) even if it finds missing references. The only time it won't make a RES file is if you check option 1 which was "Don't write any .res files, just check for problems.".

Checking the log or RES file after a compile, you might notice that some things are not included. These have been skipped by Resgun. To know why they were skipped, run Resguy but in the options menu, select option 3 so that it will print what content was skipped and why.
C886ACFE0E63A6531EDD0929C66FE6FC10A7EAC0
70 files were skipped. By scrolling through you can see why each one was skipped. Many of them are skipped because they are Defaults. The "resguy_default_content.txt" file contains references to all default/vanilla files so that Resguy can automatically skip them.

As for other reasons of skipping, it could be that said references are either invalid, unused or optional. While the first two speak for themselves, "optional" is what raises an eyebrow. Resguy does not include everything. Resguy will find and process the following files but NOT include them in the .res file. These files are excluded because clients don't need them, and some can't be sent to clients anyway. You can still include these with "-extra" if you really want to:

  • BSP file (included with -extra2, but not -extra)
  • MOTD file
  • CFG files (SC does not allow .cfg files to be transferred to clients)
  • map_script file with all its #includes (.as files are also not allowed to be transferred to clients)
  • Custom sentence files
  • Global model/sound replacement files
  • Per-monster sound replacement files

And that just about sums up how to use Resguy. Now let's talk about cleaning up unused stuff.

Cleanup

While not necessary, it's good practice and keeps the player's console free of errors. Usually when you're making a RES file, it's at the end of the project and time of publishing. This means that the map is finished, the assets are set and you can separate the used from unused.

I would recommend making a copy of your project file (jmf/rmf) that would be your final version. Here, what you'll do is, using Resguy, go over all unused stuff and remove their references from inside the project. Some things like the model dependencies are more work than their worth, so don't fret about those, but the references inside the map's project file are best to be cleaned.

And That's It

I hope this has been useful to you. If you have any questions, feel free to ask.

Check out my maps [I hope this has been useful to you. If you have any questions, feel free to ask.

Check out my maps Lab Break for Sven Co-op and Plucked From Reality for Half-Life Deathmatch.

If you found the guide useful, please give the Steam Version a like.

I also do paid model commissions for GldSource, DM me in Discord for more info at: chimz76

}

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License