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 4

Release notes

v4

Released
Size
29 KB
Downloads
38
Check
Unverified
SHA-256
5e59826c573984c1807e9984e8b7f71ceb746b453f531afb2fe2fdbeabade47a
Download v4 (.nc)All versions

Files 7

PathSize
CoDWaW/active.txt11 B
CoDWaW/config.cfg17 KB
CoDWaW/config_mp.cfg14 KB
CoDWaW/mpdata8.3 KB
CoDWaW/mpdatabk00008.3 KB
CoDWaW/XInputPlus.ini2.7 KB
handler.js6.2 KB

handler.js

Plain text
Hub.Handler.Version = 4; // Released at https://hub.splitscreen.me/ on Sat Jan 23 2021 15:01:26 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 filePath = Context.EnvironmentPlayer + Context.UserProfileConfigPath + "\\" + Context.Nickname;
  System.IO.Directory.CreateDirectory(filePath);

  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 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.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 txtPath = Context.EnvironmentPlayer + Context.UserProfileConfigPath + "\\" + Context.Nickname + "\\config.cfg";
  var dict = [
    '361|seta name "' + Context.Nickname + '"',
    '380|seta r_customMode "' + Context.Width + "x" + Context.Height + '"',
    '396|seta r_fullscreen "0"',
    '406|seta r_mode "' + Context.Width + "x" + Context.Height + '"'
  ];
  Context.ReplaceLinesInTextFile(txtPath, dict);

  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);

  if (!System.IO.File.Exists(Context.EnvironmentPlayer + Context.UserProfileConfigPath + "\\" + Context.Nickname + "\\mpdatabk")) {
    var savePath = Context.EnvironmentPlayer + Context.UserProfileConfigPath + "\\" + Context.Nickname + "\\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 + "\\" + Context.Nickname + "\\mpdatabk0000")) {
    var savePath = Context.EnvironmentPlayer + Context.UserProfileConfigPath + "\\" + Context.Nickname + "\\mpdatabk0000";
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "mpdatabk0000");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }
  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 + '"', '396|seta r_fullscreen "0"', '406|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 + "\\" + Context.Nickname + "\\config.cfg";
    var dict = [
      '361|seta name "' + Context.Nickname + '"',
      '396|seta r_fullscreen "0"',
      '406|seta r_mode "' + Context.Width + "x" + Context.Height + '"',
      '512|seta snd_menu_music "0"',
      '514|seta snd_menu_voice "0"'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);
  }
};