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 6

Release notes

Final Version

Released
Size
12 KB
Downloads
4,845
Check
Verified
SHA-256
883a0413fbdd6e9d612aeee632a0579a2efd8f6e37f80f9e3c5f3826e7aba6ec
Download v6 (.nc)All versions

Files 5

PathSize
CoDWaW/active.txt5 B
CoDWaW/config.cfg17 KB
CoDWaW/config_mp.cfg14 KB
CoDWaW/XInputPlus.ini2.7 KB
handler.js5.4 KB

handler.js

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

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 = "CoDWaW.exe";
Game.NeedsSteamEmulation = false;
Game.SteamID = "10090";
Game.GUID = "CoDWaW";
Game.GameName = "CoDWaW";
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, "CoDWaW.exe"),
    System.IO.Path.Combine(Context.RootFolder, "CoDWaW.exe"),
    [0x39, 0x8e, 0xe3, 0x3f],
    Context.ConvertToBytes(Context.AspectRatioDecimal)
  );

  var Args = (Context.Args = " +exec default_controller.cfg +r_fullscreen 0 ");
  Context.StartArguments = Args;

  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 + Context.UserProfileConfigPath + "\\" + Context.Nickname;
  System.IO.Directory.CreateDirectory(filePath);

  var savePath = Context.EnvironmentPlayer + Context.UserProfileConfigPath + "\\" + Context.Nickname + "\\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 + "\\" + Context.Nickname + "\\config_mp.cfg";
  var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "config_mp.cfg");
  System.IO.File.Copy(savePkgOrigin, savePath, true);

  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.Nickname + ""];
  Context.ReplaceLinesInTextFile(txtPath, dict);

  var savePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\CoDWaW - Player " + (Context.PlayerID + 1) + ".exe";
  var savePkgOrigin = System.IO.Path.Combine(Context.RootFolder, "CoDWaW.exe");
  System.IO.File.Copy(savePkgOrigin, savePath, true);

  if (Context.PlayerID == 0) {
    var txtPath = Context.EnvironmentPlayer + Context.UserProfileConfigPath + "\\" + Context.Nickname + "\\config.cfg";
    var dict = [
      '361|seta name "' + Context.Nickname + '"',
      '364|seta net_port "2896' + Context.PlayerID + '"',
      '381|seta r_customMode "' + Context.Width + "x" + Context.Height + '"',
      '397|seta r_fullscreen "0"',
      '407|seta r_mode "' + Context.Width + "x" + Context.Height + '"',
      '509|seta snd_menu_music "1"',
      '511|seta snd_menu_voice "1"'
    ];
    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 + "\\" + Context.Nickname + "\\config.cfg";
    var dict = [
      '361|seta name "' + Context.Nickname + '"',
      '364|seta net_port "2896' + Context.PlayerID + '"',
      '381|seta r_customMode "' + Context.Width + "x" + Context.Height + '"',
      '397|seta r_fullscreen "0"',
      '407|seta r_mode "' + Context.Width + "x" + Context.Height + '"',
      '509|seta snd_menu_music "0"',
      '511|seta snd_menu_voice "0"'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);
  }
};