I've finally pulled all the information and thrown together a little guide.
Along with a proof of concept tweaks mod.
Grab it here:http://www.filefront.com/14500291/risk-a5.zip
= Pre SDK Modding of Wolfenstein (2009) Single Player =
Author: Jarad Hansen aka TinMan aka Tex
Guide version: 3
= What =
A guide to pre-SDK modding of Wolfenstein (2009) Single Player
NOTE: modding the game this way would be outside the bounds of Activision Technical Support.
Basically don't request support if you are running a modded game.
This document assumes some knowledge of idTech 4 engines.
= The engine =
Raven seems to have made great strides with the original idTech 4 codebase, a huge am mount has been upgraded or extended with a focus on multiplied of what was originally a PC engine.
As such there is a file streaming system with new file format meaning jumping in straight from a previous idTech 4 knowledge base is not so simple.
= The usual method =
Usually you'd create a folder parallel to the games base folder, and just work on the files you want to edit there, then package the files into pk4 for release.
The problems currently are:
1. Loading a mod in a separate folder is unsupported (fs_game), apparently the new file streaming system doesn't fall back to looking for files in base.
2. si_pure was removed, the nearest equivalent fs_disablePK4s as the name suggests doesn't fall back to the files in the pk4s, so you need to extract all the files from pk4s rather than just the ones you want to modify
= Console Access =
Indispensable for the developer, accessing is also not so simple as in the past.
1. Start wolf2.exe with the command line +set com_allowConsole 1
2. When in game press Right Alt + Left Alt + `
= A mod folder =
Create a folder parallel to base
= Decls =
1. Open Wolfenstein\SP\base\assets.pk4 in WinRAR. An error message about unexpected end of archive will pop up.
2. Choose 'Repair Archive' from the tools menu. 'Make sure treat corrupted archive as Zip' is selected.
3. This will create a rebuilt.assets.pk4, extract it to your mod folder folder. Messy, I know, but as mentioned above it's the best of the current situation.
4. There's still a few files missing, copy over the fonts folder that should be in the folder this txt file is in and also the def folder.
= Savepath =
Knowing where the engine saves things is naturally important.
On XP: C:\Documents and Settings\<UserName>\Local Settings\Application Data\id Software\WolfSP\
On Vista: C:\AppData\Local\id Software\WolfSP\
You'll seen in \base wolf.cfg and a savegames folder. This is also where the condump command saves to.
Create a folder in here for your mod, using the same name as the one you created in the game folder.
While you're at it, copy wolf.cfg and save files from base to the folder.
= More Files =
Copy the streampacks folder from base to your mod folder, as well as the maps folder (hope you've got enough space ~4gb
). This step is only necessary due to a pre-sdk limitation.
= Loading up the game for modding =
A couple of command line settings to add to a batch file or shortcut:
+set fs_game mymod (or whatever you called your mod folder).
+set com_SingleDeclFile 0
+set fs_disablepk4s 1
= Modding =
You may want to switch the game to window mode to easily tab in and out.
Edit the decls you want.
Type reloaddecls at the console.
This will usually reset your weapons to a default set, so you may want to load a save game.
Test the changes.
If for whatever reason you find yourself at a full screen console without a map loaded enter this at the console:
= Packaging =
Not so easy here, you don't really want to repackage all the decls, so it's a matter of doing a file search for the files you modified (unmodified files will have a July filestamp) and copying them to another folder to package.
See the Risk mod for further example, in respects to package layout, installation (described in read-me) and batch file to load mod. This mod is set up for installation in base.
= User Mod installation =
The issue here is the fs_game/streamloading problem.
Either we have them install the mod to your mod folder, and have them copy 4Gb from base (streampacks/maps).
Or we have them install the mod to base, which means there will be conflicts if more than one mod is installed as to which files from which mods will load. (See: http://www.modwiki.net/wiki/Id_Tech_4#File_system
= Thanks and credits =
doom3world forums for method for console access.
seligkram at the Wolfenstein forums for method for extracting assets.pk4
Csimbi at xentax forums for the globals.decls unpacker Wolf2Dec.
ZippyDSMlee at Wolfenstein forums for bringing up a few points, leading to v2.
Sikkpin at doom3world for pointing out the missing post-process effects, thus leading to v3, I had not noticed -_-