Forum Thread
  Posts  
weapons config file (Forums : General Banter : weapons config file) Locked
Thread Options
Jul 24 2017 Anchor

Does anyone know where the weapons.cfg file was placed, or scattered, in the Steam/Activision version of Return to Castle Wolfenstein? I'd like to change some of settings for my own use, however, I've searched through so many of their file trees and come up with nothing. Any help would be appreciated. (Don't get me started on them using the same four file names in every directory.)

Thanks, for any help, in advance.

fva
fva
Jul 26 2017 Anchor

The parameters you are likely interested in are hardcoded in "qagamex86.dll". Specifically, look for the "ammoTable" definition in the beginning of the source file "bg_misc.c". This table specifies max ammo, max clip size, time between shots, etc., for each weapon.

Edited by: fva

Jul 27 2017 Anchor

Steam/Activision have really messed with the game files. <root>:\SteamLibrary\steamapps\common\Return to Castle Wolfenstein\qagamex86.dll has four files: .text, .reloc, .rdata, and .data . None of those are readable text files. They have obfuscated the files.

fva
fva
Jul 28 2017 Anchor

The files aren't obfuscated. You see, "qagamex86.dll" is a native dynamic-link library (dll), so it contains executable machine code. You won't find any source files there :) . If you want to modify this dll, you need to get the single-player rtcw source code, make the changes you want, and then compile the modified code.

Although you can use the original code from id software's RTCW-SP repository, I believe that the "v1.42d Patch" by Knightmare might be a better option (this patch improves the original code by fixing bugs and adding widescreen support). You can get Knightmare's code in his download page.

To compile the code, you need Visual Studio (Community Edition is ok). Knightmare's code compiles fine with Visual Studio 2015, and I'm mostly sure it also will with the 2017 edition.

After compiling, you need to replace the original binaries with the new ones (WolfSP.exe, qagamex86.dll, cgamex86.dll, uix86.dll). Since you are using steam, I recommend creating a second rtcw installation to play the modified game (copy the rtcw folder to another location, and modify this copy instead). Knightmare's version also requires adding an extra pk3 file to the "Main" folder. You can get this from his binaries download (available in the same download page), or by zipping the "maps" and "ui" folders from the root of his source code. Make sure this file is named "sp_pak5.pk3" (the one in his binaries is named "sp_pak4.pk3", but this is likely a mistake).

Before proceeding, notice that Visual Studio is one of those tools that "glue" on your system (removing it is a bad idea), so install it only if you are ok with this (and never install a release candidate or beta version).

Edited by: fva

Jul 31 2017 Anchor

Oh, man. And here I was, looking for a plain text file, the same as in the old Doom engine. Well, now that I have instructions that I can actually follow, thank you!, I'll probably be giving this a try this weekend. Probably, not assuredly, but probably.

Thanks, again, fva.

fva
fva
Aug 2 2017 Anchor

You're welcome. Something I've recently noticed is that Knightmare's patch includes a few cvars to change max ammo. If this is what you're after, you can use his binaries directly (no need to deal with code). If you want to change other settings, however, modifying the code is required. In fact, the ammo cvars and the "staticAmmoTable" he added will likely stand in your way, so you may wish to remove them (or make them non-functional) before changing "ammoTable". Also, for some reason, his code package is interpreted as an html file when I try to download it :S . If this happens to you, you can save the package as an html file to your machine, and later change its extension to 7z.

Edited by: fva

Sep 21 2017 Anchor

Steam/Activision have really messed with the game files. :\SteamLibrary\steamapps\common\Return to Castle Wolfenstein\qagamex86.dll has four files: .text, .reloc, .rdata, and .data Mutuelles senior . None of those are readable text files. They have obfuscated the files.

I will not any longer because i'll do it right now.

Reply to thread
click to sign in and post

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.