RJ's RES Generator
- Windows XP or later
- .NET Framework 2.0 or later
.NET Framework 2.0 can be downloaded from http://www.microsoft.com/downloads/details.aspx?FamilyID=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5&displaylang=en
To simply generate a resource file for your map(s),
- Launch RJ's RES Generator if you have not already.
- Click on the button labeled New.
- Under Name, replace Unnamed with a profile name of your choice. Since I am using Half-Life: Sven Co-op as my example, I will be replacing Unnamed with Sven Co-op.
- Under Path, enter the full path to you're the folder of the Half-Life mod for which you want to generate a resource file(s) for; use the button labeled Browse to help you visually locate the proper directory. It should be something like C:\Program Files\Steam\SteamApps\\half-life\<modfolder> or C:\Sierra\Half-Life\<modfolder>. For me it will be E:\Games\Steam\SteamApps\hlrsecom\half-life\SvenCoop.
- Click on the button labeled Add on the right side of the window and add half-life.gdf to the list (it is located in the same folder as the executable for RJ's RES Generator); since I am generating resource files for Half-Life: Sven Co-op, I will be adding half-life.gdf and svencoop.gdf. (RJ's Note: half-life.gdf will always needed to be added since every mod depends on the valve folder in one way or another)
- Click on the button labeled Apply.
- From this point on you will only have to launch RJ's RES Generator and go to the RES Management tab unless you have to make a few modifications to your profile or change it to different profile. The Apply button will save the profile information.
- Click Set Active to select the current configuration as the active configuration.
- Go to the RES Management tab and select the maps you want to generate RES files for and then click Generate .res file.
- Script for Extra Parsing: Specify a path to a .cs file that does extra parsing for maps for a specific mod. You can find these in the scripts folder where the exe is located.
- For each generated .res file:
- Prepend File: Specify a path to a text file that will be added to the beginning of each generated .res file.
- Append File: Specify a path to a text file that will be added to the end of each generated .res file.
- Check to see if file exists: For each custom file found in a map, it'll check to see if it actually exists in the folder specified in the Path of the configuration.
- Comment out the line: Comments out the line in the file. Useful if you want to double-check the line.
- Remove the line: Removes the line from the generated .res file.
Extending the Parser:
Note: You need to have knowledge of C# and .NET Framework before you can use this section.
In the scripts folder, there is a file called template.cs to help you get started. You would use this if you needed to add some parsing code for mod-specific things. For example in Sven Coop, maps can use a sound replacement txt file that, even though is specified in the bsp, this txt file would not get parsed by normal parsing. I have already written the code for it to serve as a guide if other mods have features that aren't parsed normally.
Function Parameters Details:
- MapEntity entity: The current entity in the map being parsed.
- string currentMap: The current map being parsed.
- ref string gamePath: The path of the mod. Be careful NOT to modify this value since it's passed by reference.
- ref List bFileList: The current list of files found by the parser. The comparison of this list to the GDF file lists has not occurred yet so take this into account when coding. You should check to make sure that each file you add is not already in the list by the Contains method.
Qwerty: For pretty much a lot of things, and for writing the basic usage section of this page (even though I modified it a bit).
CPeanutG: Reporting bugs and feedback.
goanna: Also reporting bugs.
Bundled with RJ's RES Generator
GDF Files are used to tell the RES Generator what files are part of a standard installation of a mod. It's also used to tell the generator what extra files it should look for on a map. All of the official HL Mods and SvenCoop are supported already, but if you have another mod you want to generate res files for, this is the program to add support for it.
- Path: The path to either a mod directory or a GCF File.
- Folder Name: If the path is to a mod directory, then this should be the mod name folder. Otherwise, it is ignored.
- Special Rules: A list of extra files to check for when parsing a map. Ex: maps/%MAPNAME%_readme.txt
After that, just click the Generate button and you're all done.
Bundled with RJ's RES Generator
If you need to make minor changes to a GDF File, this is the tool to use. Everything should be self-explanatory.