Skip to content
Beta: this is a preview of the new SplitScreen.Me. Data may be reset before launch.

Call of Duty: World at War · handler “Call of Duty World at War”

Version 5

Release notes

Final Version

Released
Size
1.1 MB
Downloads
5
Check
Unverified
SHA-256
e02de5d164ec957b1f93b27ddeb46376399de4cb9d3e1b0fe0ddb39f884bf241
Download v5 (.nc)All versions

Files 11

PathSize
CoDWaWmp/active.txt11 B
CoDWaWmp/config.cfg17 KB
CoDWaWmp/config_mp.cfg14 KB
CoDWaWmp/mod.ff683 KB
CoDWaWmp/mpdata8.3 KB
CoDWaWmp/mpdatabk00008.3 KB
CoDWaWmp/pezbot.cfg1.4 KB
CoDWaWmp/PeZBOTWaW.iwd438 KB
CoDWaWmp/pezbot_dev.cfg978 B
CoDWaWmp/XInputPlus.ini2.7 KB
handler.js8.3 KB

handler.js

Plain text
Hub.Handler.Version = 5; // Released at https://hub.splitscreen.me/ on Mon Jan 25 2021 22:22:25 GMT+0000 (UTC).
Hub.Handler.Id = "ZeCGPXaap5Dzs5PXc";
Hub.Maintainer.Name = "Perserveruz";
Hub.Maintainer.Id = "nFAYvHKj75jAFRAgt";

var answers = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18"];
var answers1 = ["0.1", "0.2", "0.3", "0.4", "0.5", "0.6", "0.7", "0.8", "0.9", "1.0"];
Game.AddOption("Select the number of bots to be added", "", "Bots", answers);
Game.AddOption("Select the bot skill level", "", "Skill", answers1);
Game.SymlinkGame = true;
Game.SymlinkExe = false;
Game.ChangeExe = true;
Game.SymlinkFolders = true;
Game.KeepSymLinkOnExit = true;
Game.SupportsKeyboard = true;
Game.UseNucleusEnvironment = true;
Game.HandlerInterval = 100;
Game.ExecutableName = "CoDWaWmp.exe";
Game.NeedsSteamEmulation = false;
Game.SteamID = "10090";
Game.GUID = "CoDWaWmp";
Game.GameName = "CoDWaWmp";
Game.MaxPlayers = 4;
Game.MaxPlayersOneMonitor = 4;
Game.SupportsPositioning = true;
Game.HideTaskbar = false;
Game.Hook.ForceFocus = true;
Game.Hook.ForceFocusWindowName = "Call of Duty®";
Game.HasDynamicWindowTitle = true;
Game.HookFocus = true;
Game.PreventWindowDeactivation = true;
Game.KeyboardPlayerSkipPreventWindowDeactivate = true;
Game.Hook.DInputEnabled = false;
Game.Hook.DInputForceDisable = true;
Game.Hook.XInputEnabled = true;
Game.Hook.XInputReroute = false;
Game.BlockRawInput = true;
Game.Hook.CustomDllEnabled = false;
Game.Hook.UseAlpha8CustomDll = false;
Game.XInputPlusDll = ["xinput1_3.dll"];
Game.PromptBetweenInstances = true;
Game.UserProfileConfigPath = "AppData\\Local\\Activision\\CoDWaW\\players\\profiles";
Game.PauseBetweenStarts = 25;
Game.Description =
  "Launch your CoDWaW instances (1-2) but prior to confirming the launch of the second instance, setup your LAN campaign/zombie lobby. Once done, confirm the second instance and prior to confirming hooks, search and connect to the host's lan lobby. Once done, the host can start the match by hovering over the start match option with the mouse and pressing X on the controller. Once in game, you will be able to access and exit the menu screen by pressing the start and O button on your controller respectively, however to select other options such as restart level etc., you will need to hover over the option with your mouse and press X on your controller. ENJOY";

Game.Play = function() {
  Context.PatchFile(
    System.IO.Path.Combine(Game.Folder, "CoDWaWmp.exe"),
    System.IO.Path.Combine(Context.RootFolder, "CoDWaWmp.exe"),
    [0x39, 0x8e, 0xe3, 0x3f],
    Context.ConvertToBytes(Context.AspectRatioDecimal)
  );

  var Args = (Context.Args = " +exec default_controller.cfg +set fs_game mods/mp_PeZBOTWAW +exec pezbot.cfg ");
  Context.StartArguments = Args;

  var Bots = Context.Options["Bots"];

  var username = System.Environment.UserName;
  var cfgFilePath = Game.Folder + "\\pezbot.cfg";
  Context.ReplaceLinesInTextFile(cfgFilePath, ['11|set svr_pezbots "' + Bots + '"'], "utf-8");

  var Skill = Context.Options["Skill"];

  var username = System.Environment.UserName;
  var cfgFilePath = Game.Folder + "\\pezbot.cfg";
  Context.ReplaceLinesInTextFile(cfgFilePath, ['14|set svr_pezbots_skill "' + Skill + '"'], "utf-8");

  var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\XInputPlus.ini");
  var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "XInputPlus.ini");
  System.IO.File.Copy(savePkgOrigin, savePath, true);

  var filePath = Context.EnvironmentPlayer + "\\Appdata\\Local\\Activision\\CoDWaW\\Mods";
  System.IO.Directory.CreateDirectory(filePath);

  var filePath = Context.EnvironmentPlayer + "\\Appdata\\Local\\Activision\\CoDWaW\\Mods\\mp_PeZBOTWAW";
  System.IO.Directory.CreateDirectory(filePath);

  var savePath = (Context.SavePath = Context.EnvironmentPlayer + "Appdata\\Local\\Activision\\CoDWaW\\Mods\\mp_PeZBOTWAW\\pezbot.cfg");
  var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "pezbot.cfg");
  System.IO.File.Copy(savePkgOrigin, savePath, true);

  var savePath = (Context.SavePath = Context.EnvironmentPlayer + "Appdata\\Local\\Activision\\CoDWaW\\Mods\\mp_PeZBOTWAW\\mod.ff");
  var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "mod.ff");
  System.IO.File.Copy(savePkgOrigin, savePath, true);

  var savePath = (Context.SavePath = Context.EnvironmentPlayer + "Appdata\\Local\\Activision\\CoDWaW\\Mods\\mp_PeZBOTWAW\\pezbot_dev.cfg");
  var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "pezbot_dev.cfg");
  System.IO.File.Copy(savePkgOrigin, savePath, true);

  var savePath = (Context.SavePath = Context.EnvironmentPlayer + "Appdata\\Local\\Activision\\CoDWaW\\Mods\\mp_PeZBOTWAW\\PeZBOTWaW.iwd");
  var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "PeZBOTWaW.iwd");
  System.IO.File.Copy(savePkgOrigin, savePath, true);

  var filePath = Context.EnvironmentPlayer + Context.UserProfileConfigPath + "\\$$$";
  System.IO.Directory.CreateDirectory(filePath);

  var savePath = (Context.SavePath = Context.EnvironmentPlayer + Context.UserProfileConfigPath + "\\active.txt");
  var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "active.txt");
  System.IO.File.Copy(savePkgOrigin, savePath, true);

  var txtPath = Context.EnvironmentPlayer + Context.UserProfileConfigPath + "\\active.txt";
  var dict = ["1|$$$"];
  Context.ReplaceLinesInTextFile(txtPath, dict);

  var savePath = Context.EnvironmentPlayer + Context.UserProfileConfigPath + "\\$$$\\config.cfg";
  var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "config.cfg");
  System.IO.File.Copy(savePkgOrigin, savePath, true);

  var savePath = Context.EnvironmentPlayer + Context.UserProfileConfigPath + "\\$$$\\config_mp.cfg";
  var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "config_mp.cfg");
  System.IO.File.Copy(savePkgOrigin, savePath, true);

  var txtPath = Context.EnvironmentPlayer + Context.UserProfileConfigPath + "\\$$$\\config_mp.cfg";
  var dict = ['361|seta name "' + Context.Nickname + '"', '396|seta r_fullscreen "0"', '406|seta r_mode "' + Context.Width + "x" + Context.Height + '"'];
  Context.ReplaceLinesInTextFile(txtPath, dict);

  if (!System.IO.File.Exists(Context.EnvironmentPlayer + Context.UserProfileConfigPath + "\\$$$\\mpdata")) {
    var savePath = Context.EnvironmentPlayer + Context.UserProfileConfigPath + "\\$$$\\mpdata";
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "mpdata");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }
  if (!System.IO.File.Exists(Context.EnvironmentPlayer + Context.UserProfileConfigPath + "\\$$$\\mpdatabk0000")) {
    var savePath = Context.EnvironmentPlayer + Context.UserProfileConfigPath + "\\$$$\\mpdatabk0000";
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "mpdatabk0000");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }
  var savePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\CoDWaWmp - Player " + (Context.PlayerID + 1) + ".exe";
  var savePkgOrigin = System.IO.Path.Combine(Context.RootFolder, "CoDWaWmp.exe");
  System.IO.File.Copy(savePkgOrigin, savePath, true);

  if (Context.PlayerID == 0) {
    var txtPath = Context.EnvironmentPlayer + Context.UserProfileConfigPath + "\\$$$\\config_mp.cfg";
    var dict = [
      '172|seta cl_punkbuster "0"',
      '304|seta r_customMode "' + Context.Width + "x" + Context.Height + '"',
      '320|seta name "' + Context.Nickname + '"',
      '353|seta r_fullscreen "0"',
      '364|seta r_mode "' + Context.Width + "x" + Context.Height + '"'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);
  } else {
    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Xinputplus.ini";
    var dict = ["99|Controller1=" + (Context.PlayerID + 1) + ""];
    Context.ReplaceLinesInTextFile(txtPath, dict);

    var txtPath = Context.EnvironmentPlayer + Context.UserProfileConfigPath + "\\$$$\\config_mp.cfg";
    var dict = [
      '172|seta cl_punkbuster "0"',
      '304|seta r_customMode "' + Context.Width + "x" + Context.Height + '"',
      '320|seta name "' + Context.Nickname + '"',
      '353|seta r_fullscreen "0"',
      '364|seta r_mode "' + Context.Width + "x" + Context.Height + '"',
      '451|seta snd_menu_music "0"',
      '453|seta snd_menu_voice "0"'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);
  }
};