Call of Duty 5: FastFile Study

From COD Modding & Mapping Wiki
Revision as of 15:47, 10 March 2012 by CoDEmanX (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

*** Article and investigation in early progress ***

Article looking at how fast files are made and how the process is coded, hope this is useful to people who want to know a little bit more on how the fast file process is handled.

New information regarding fast files

Due to the strings in the linker_pc.exe, I have discovered that the encrypter that Infinity Ward and Treyarch use is "libtomcrypt-1.17", this is an open source program that is available here


private void ModBuildFastFileDelegate(Process lastProcess)
{
if (this.LauncherModBuildFastFilesCheckBox.Checked)
{
Launcher.CopyFileSmart(Path.Combine(Launcher.GetModDirectory(this.modName), "mod.csv"), Path.Combine(Launcher.GetZoneSourceDirectory(), "mod.csv"));
}
this.LaunchProcessHelper(this.LauncherModBuildFastFilesCheckBox.Checked, new ProcessFinishedDelegate(this.ModBuildMoveModFastFileDelegate), Launcher.GetLanguage() + " -moddir " + this.modName + " mod");
}




private void CompileLevelMoveFastFilesDelegate(Process lastProcess)
{
string zoneDirectory = Launcher.GetZoneDirectory();
string str2 = Launcher.mapSettings.GetBoolean("compile_modenabled") ? Launcher.GetModDirectory(Launcher.mapSettings.GetString("compile_modname")) : Path.Combine(Launcher.GetUsermapsDirectory(), this.mapName);
string str3 = this.mapName + ".ff";
string str4 = this.mapName + "_load.ff";
Launcher.MoveFile(Path.Combine(str3), Path.Combine(str3));
Launcher.MoveFile(Path.Combine(str3), Path.Combine(str3));
Launcher.MoveFile(Path.Combine(str4), Path.Combine(str4));
Launcher.Publish();
this.CompileLevelRunGameDelegate(lastProcess);
}




public static void CreateZoneSourceFiles(string mapName)
{
using (StreamWriter writer = new StreamWriter(GetZoneSourceFile(IsMP(writer.WriteLine("ignore,code_post_gfx_mp");
WriteLine("ignore,common_mp");
WriteLine("col_map_mp,maps/mp/" + writer.WriteLine("rawfile,maps/mp/" + writer.WriteLine("rawfile,maps/mp/" + writer.WriteLine("sound,common," + writer.WriteLine("sound,generic," + writer.WriteLine("sound,voiceovers," + writer.WriteLine("sound,multiplayer," + string GetRawDirectory();




What I believe this means, with the little coding I know, I think in the fast file, they combine the d3dbsp with the "launcherCS.launcher" file, and they also combine the zone source directory with the d3dbsp, what i'm I missing?
The more I look into it, the more I realize the launcher.cs.launcher file is mostly just calling every string, I will post more of the file later today. Here is part of the launcher.cs.launcher file, like stated above, its just calling strings.


public static string GetRawMapsDirectory();
public static string GetRootDirectory();
etc....

--Theoneman 16:27, 3 January 2012 (UTC)

The code you posted has nothing to do with fastfile compilation, it's the code of modbuilder, which generates a zone file (csv) for compilation. Not sure about encryption, the fastfile isn't in the first place. Remove the first 12 bytes and decompress with zlib, will give you a block file with many unencrypted data such as map entities. If there's encryption involved, then they did it for certain parts only. --CoDEmanX 12:47, 10 March 2012 (UTC)