Call of Duty: World at War · handler “Call of Duty World at War”
Version 12
Release notes
added registry option. improved focus hook.
- Released
- Size
- 2.2 MB
- Downloads
- 9
- Check
- Verified
- SHA-256
- bfc63bed9588c659313739158f137d58c8d8e1ef3f9789dc5549351e8d0d5ddb
Files 6
| Path | Size |
|---|---|
| CoDWaW/config.cfg | 15 KB |
| CoDWaW/config_mp.cfg | 14 KB |
| CoDWaW/d3d9.dll | 2.4 MB |
| CoDWaW/RegistryFix.bat | 1.7 KB |
| CoDWaW/XInputPlus.ini | 2.7 KB |
| handler.js | 14 KB |
handler.js
Plain textHub.Handler.Version = 12; // Released at https://hub.splitscreen.me/ on Thu Jan 20 2022 18:27:35 GMT+0000 (Coordinated Universal Time).
Hub.Handler.Id = "ZeCGPXaap5Dzs5PXc";
Hub.Maintainer.Name = "Perserveruz";
Hub.Maintainer.Id = "nFAYvHKj75jAFRAgt";
var answers = ["No", "Yes"];
Game.AddOption("Swap shoulder and trigger buttons (useful for Playstation controllers)", "", "pscontrollers", answers);
Game.AddOption("Apply registry fix for cd key already in use message", "", "registry", answers);
Game.FileSymlinkExclusions = ["d3d9.dll", "Xinputplus.ini", "xinput1_4.dll", "xinput1_3.dll"];
Game.SymlinkGame = true;
Game.SymlinkExe = false;
Game.ChangeExe = true;
Game.SymlinkFolders = false;
Game.KeepSymLinkOnExit = true;
Game.SupportsKeyboard = false;
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 = false;
Game.Hook.ForceFocusWindowName = "Call of Duty®";
Game.ResetWindows = false;
Game.HasDynamicWindowTitle = true;
Game.HookFocus = false;
Game.PreventWindowDeactivation = false;
Game.KeyboardPlayerSkipPreventWindowDeactivate = false;
Game.Hook.DInputEnabled = false;
Game.Hook.DInputForceDisable = true;
Game.Hook.XInputEnabled = false;
Game.Hook.XInputReroute = false;
Game.BlockRawInput = false;
Game.Hook.CustomDllEnabled = false;
Game.Hook.UseAlpha8CustomDll = false;
Game.XInputPlusDll = ["xinput1_3.dll"];
Game.PromptBetweenInstances = false;
Game.UserProfileConfigPath = "AppData\\Local\\Activision\\CoDWaW";
Game.PauseBetweenProcessGrab = 25;
Game.DontRemoveBorders = false;
Game.DeleteFilesInConfigPath = [
"__CoDWaW",
"__CoDWaW - Player 1",
"__CoDWaWmp - Player 1",
"__CoDWaW - Player 2",
"__CoDWaWmp - Player 2",
"__CoDWaW - Player 3",
"__CoDWaWmp - Player 3",
"__CoDWaW - Player 4",
"__CoDWaWmp - Player 4"
];
Game.IgnoreDeleteFilesPrompt = true;
Game.Description =
"Make sure you have lauched CoDWaW at least once outside of Nuclues Coop. Make sure you assign at least a mouse to each instance. Launch your CoDWaW instances (max 2 players for now) and once they have resized/repositioned press the end key to install hooks. To play with controllers simply connect them to your PC, each instance will automatically recognize each of your controllers. If asked to create an online profile select cancel, no and exit. Setup your LAN campaign/zombie match and have the other player join by searching the match under find game, remember to select LAN under source. ENJOY";
Game.SupportsMultipleKeyboardsAndMice = true;
// Deprecated options
Game.HookSetCursorPos = false;
Game.HookGetCursorPos = false;
Game.HookGetKeyState = false;
Game.HookGetAsyncKeyState = false;
Game.HookGetKeyboardState = false;
Game.HookFilterRawInput = false;
Game.HookFilterMouseMessages = false;
Game.HookUseLegacyInput = false;
Game.HookDontUpdateLegacyInMouseMsg = false;
Game.HookMouseVisibility = false;
Game.SendNormalMouseInput = false;
Game.SendNormalKeyboardInput = false;
Game.SendScrollWheel = false;
Game.ForwardRawKeyboardInput = false;
Game.ForwardRawMouseInput = false;
Game.DrawFakeMouseCursor = false;
Game.LockInputAtStart = false;
Game.LockInputSuspendsExplorer = false;
Game.LockInputToggleKey = 0x23;
Game.ProtoInput.InjectStartup = false;
Game.ProtoInput.InjectRuntime_RemoteLoadMethod = false;
Game.ProtoInput.InjectRuntime_EasyHookMethod = true;
Game.ProtoInput.InjectRuntime_EasyHookStealthMethod = false;
Game.ProtoInput.FindWindowHook = true;
Game.ProtoInput.RegisterRawInputHook = true;
Game.ProtoInput.GetRawInputDataHook = false;
Game.ProtoInput.MessageFilterHook = true;
Game.ProtoInput.GetCursorPosHook = false;
Game.ProtoInput.SetCursorPosHook = false;
Game.ProtoInput.GetKeyStateHook = false;
Game.ProtoInput.GetAsyncKeyStateHook = false;
Game.ProtoInput.GetKeyboardStateHook = false;
Game.ProtoInput.CursorVisibilityHook = true;
Game.ProtoInput.ClipCursorHook = true;
Game.ProtoInput.FocusHooks = false;
Game.ProtoInput.DrawFakeCursor = false;
Game.ProtoInput.RawInputFilter = false;
Game.ProtoInput.MouseMoveFilter = false;
Game.ProtoInput.MouseActivateFilter = false;
Game.ProtoInput.WindowActivateFilter = false;
Game.ProtoInput.WindowActvateAppFilter = false;
Game.ProtoInput.MouseWheelFilter = false;
Game.ProtoInput.MouseButtonFilter = false;
Game.ProtoInput.KeyboardButtonFilter = true;
Game.ProtoInput.SendMouseWheelMessages = true;
Game.ProtoInput.SendMouseButtonMessages = true;
Game.ProtoInput.SendMouseMovementMessages = true;
Game.ProtoInput.SendKeyboardButtonMessages = true;
Game.ProtoInput.EnableFocusMessageLoop = false;
Game.ProtoInput.FocusLoopIntervalMilliseconds = 0;
Game.ProtoInput.FocusLoop_WM_ACTIVATE = true;
Game.ProtoInput.FocusLoop_WM_ACTIVATEAPP = true;
Game.ProtoInput.FocusLoop_WM_NCACTIVATE = true;
Game.ProtoInput.FocusLoop_WM_SETFOCUS = true;
Game.ProtoInput.FocusLoop_WM_MOUSEACTIVATE = true;
Game.ProtoInput.BlockedMessages = [];
Game.ProtoInput.RenameHandlesHook = false;
Game.ProtoInput.RenameHandles = [];
Game.ProtoInput.RenameNamedPipes = [];
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 registry = Context.Options["registry"];
if (registry == "Yes") {
if (Context.PlayerID == 0) {
var savePath = (Context.SavePath = Context.OrigRootFolder + "\\RegistryFix.bat");
var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "RegistryFix.bat");
System.IO.File.Copy(savePkgOrigin, savePath, true);
Context.RunAdditionalFiles([Context.OrigRootFolder + "\\RegistryFix.bat"], false, 0, true, false);
} else {
}
}
var registry = Context.Options["registry"];
if (registry == "No") {
}
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 pscontrollers = Context.Options["pscontrollers"];
if (pscontrollers == "Yes") {
var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Xinputplus.ini";
var dict = ["6|LT=LB", "7|RT=RB", "16|LB=LT", "17|RB=RT", "99|Controller1=" + (Context.PlayerID + 1) + ""];
Context.ReplaceLinesInTextFile(txtPath, dict);
}
var pscontrollers = Context.Options["pscontrollers"];
if (pscontrollers == "No") {
var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Xinputplus.ini";
var dict = ["6|LT=LT", "7|RT=RT", "16|LB=LB", "17|RB=RB", "99|Controller1=" + (Context.PlayerID + 1) + ""];
Context.ReplaceLinesInTextFile(txtPath, dict);
}
var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\d3d9.dll");
var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "d3d9.dll");
System.IO.File.Copy(savePkgOrigin, savePath, true);
if (!System.IO.File.Exists(Context.EnvironmentPlayer + Context.UserProfileConfigPath + "\\players\\profiles\\$$$")) {
var filePath = Context.EnvironmentPlayer + Context.UserProfileConfigPath + "\\players\\profiles\\$$$";
System.IO.Directory.CreateDirectory(filePath);
}
if (!System.IO.File.Exists(Context.EnvironmentPlayer + Context.UserProfileConfigPath + "\\players\\profiles\\$$$\\config.cfg")) {
var savePath = Context.EnvironmentPlayer + Context.UserProfileConfigPath + "\\players\\profiles\\$$$\\config.cfg";
var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "config.cfg");
System.IO.File.Copy(savePkgOrigin, savePath, true);
}
if (!System.IO.File.Exists(Context.EnvironmentPlayer + Context.UserProfileConfigPath + "\\players\\profiles\\$$$\\config_mp.cfg")) {
var savePath = Context.EnvironmentPlayer + Context.UserProfileConfigPath + "\\players\\profiles\\$$$\\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 + "\\players\\profiles\\active.txt";
var dict = ["$$$"];
Context.WriteTextFile(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 + "\\players\\profiles\\$$$\\config.cfg";
var dict = [
Context.FindLineNumberInTextFile(txtPath, "seta net_port", Nucleus.SearchType.StartsWith) + '|seta net_port "2896' + (Context.PlayerID + 1) + '"',
Context.FindLineNumberInTextFile(txtPath, "seta r_fullscreen", Nucleus.SearchType.StartsWith) + '|seta r_fullscreen "0"',
Context.FindLineNumberInTextFile(txtPath, "seta name", Nucleus.SearchType.StartsWith) + '|seta name "' + Context.Nickname + '"',
Context.FindLineNumberInTextFile(txtPath, "seta r_customMode", Nucleus.SearchType.StartsWith) + '|seta r_customMode "' + Context.Width + "x" + Context.Height + '"',
Context.FindLineNumberInTextFile(txtPath, "seta r_mode", Nucleus.SearchType.StartsWith) + '|seta r_mode "' + Context.Width + "x" + Context.Height + '"',
Context.FindLineNumberInTextFile(txtPath, "seta snd_menu_music", Nucleus.SearchType.StartsWith) + '|seta snd_menu_music "1"',
Context.FindLineNumberInTextFile(txtPath, "seta snd_menu_voice", Nucleus.SearchType.StartsWith) + '|seta snd_menu_voice "1"'
];
Context.ReplaceLinesInTextFile(txtPath, dict);
} else {
var txtPath = Context.EnvironmentPlayer + Context.UserProfileConfigPath + "\\players\\profiles\\$$$\\config.cfg";
var dict = [
Context.FindLineNumberInTextFile(txtPath, "seta net_port", Nucleus.SearchType.StartsWith) + '|seta net_port "2896' + (Context.PlayerID + 1) + '"',
Context.FindLineNumberInTextFile(txtPath, "seta r_fullscreen", Nucleus.SearchType.StartsWith) + '|seta r_fullscreen "0"',
Context.FindLineNumberInTextFile(txtPath, "seta name", Nucleus.SearchType.StartsWith) + '|seta name "' + Context.Nickname + '"',
Context.FindLineNumberInTextFile(txtPath, "seta r_customMode", Nucleus.SearchType.StartsWith) + '|seta r_customMode "' + Context.Width + "x" + Context.Height + '"',
Context.FindLineNumberInTextFile(txtPath, "seta r_mode", Nucleus.SearchType.StartsWith) + '|seta r_mode "' + Context.Width + "x" + Context.Height + '"',
Context.FindLineNumberInTextFile(txtPath, "seta snd_menu_music", Nucleus.SearchType.StartsWith) + '|seta snd_menu_music "0"',
Context.FindLineNumberInTextFile(txtPath, "seta snd_menu_voice", Nucleus.SearchType.StartsWith) + '|seta snd_menu_voice "0"'
];
Context.ReplaceLinesInTextFile(txtPath, dict);
}
Game.ProtoInput.OnInputLocked = function() {
if (Context.HasKeyboardPlayer) {
for (var i = 0; i < PlayerList.Count; i++) {
var player = PlayerList[i];
ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.FocusHooksHookID);
ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.GetCursorPosHookID);
ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.SetCursorPosHookID);
ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.CursorVisibilityStateHookID);
ProtoInput.StartFocusMessageLoop(player.ProtoInputInstanceHandle, 0, true, true, true, true, true);
System.Threading.Thread.Sleep(1000);
ProtoInput.SetRawInputBypass(player.ProtoInputInstanceHandle, false);
ProtoInput.StopFocusMessageLoop(player.ProtoInputInstanceHandle);
ProtoInput.EnableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.RawInputFilterID);
ProtoInput.EnableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.KeyboardButtonFilterID);
ProtoInput.EnableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.MouseButtonFilterID);
ProtoInput.EnableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.WindowActivateFilterID);
ProtoInput.EnableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.MouseWheelFilterID);
}
}
};
Game.ProtoInput.OnInputUnlocked = function() {
for (var i = 0; i < PlayerList.Count; i++) {
var player = PlayerList[i];
ProtoInput.UninstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.FocusHooksHookID);
ProtoInput.UninstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.GetCursorPosHookID);
ProtoInput.UninstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.SetCursorPosHookID);
ProtoInput.UninstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.CursorVisibilityStateHookID);
ProtoInput.UninstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.FocusHooksHookID);
ProtoInput.SetDrawFakeCursor(player.ProtoInputInstanceHandle, false);
ProtoInput.SetRawInputBypass(player.ProtoInputInstanceHandle, true);
ProtoInput.DisableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.RawInputFilterID);
ProtoInput.DisableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.WindowActivateFilterID);
ProtoInput.DisableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.MouseWheelFilterID);
ProtoInput.DisableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.MouseButtonFilterID);
ProtoInput.DisableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.KeyboardButtonFilterID);
}
};
};