Call of Duty: World at War · handler “Call of Duty World at War”
Version 17
Release notes
Fixed vertical split screen and controller input
- Released
- Size
- 7.5 MB
- Downloads
- 13
- Check
- Unverified
- SHA-256
- be23cb389bede439304a48bc6ed4537e213262fc74e5726bd2ca9e6077bdd3f2
Files 10
| Path | Size |
|---|---|
| handler/CD Key Player 1.bat | 262 B |
| handler/CD Key Player 2.bat | 262 B |
| handler/CoDWaW.exe | 5.3 MB |
| handler/config.cfg | 15 KB |
| handler/config_mp.cfg | 16 KB |
| handler/d3d9.dll | 8.0 MB |
| handler/d3d9.ini | 4.5 KB |
| handler/RegistryFix.bat | 1.7 KB |
| handler/T4M.dll | 2.4 MB |
| handler.js | 25 KB |
handler.js
Plain textHub.Handler.Version = 17; // Released at https://hub.splitscreen.me/ on Mon Sep 12 2022 21:41:50 GMT+0000 (Coordinated Universal Time).
Hub.Handler.Id = "ZeCGPXaap5Dzs5PXc";
Hub.Maintainer.Name = "Perserveruz";
Hub.Maintainer.Id = "nFAYvHKj75jAFRAgt";
var answers = ["No", "Yes"];
var answers1 = ["None", "Clinic Of Evil", "HelloKittyRemastered"];
var answers2 = ["Yes", "No"];
var answers3 = ["No", "720p", "1080p"];
Game.AddOption("Apply optimized graphic settings for low-end PC", "", "opt", answers);
Game.AddOption("Swap shoulder and trigger buttons (useful for Playstation controllers)", "", "pscontrollers", answers2);
Game.AddOption("Select Custom Mod", "", "Mod", answers1);
Game.AddOption("Apply 720p or 1080p resolution and fullscreen for low-end PC (no splitscreen)", "", "fullscreen", answers3);
Game.AddOption("Enable music only in the first instance?", "", "Mus", answers2);
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 = 2;
Game.MaxPlayersOneMonitor = 2;
Game.SupportsPositioning = true;
Game.HideTaskbar = false;
Game.Hook.ForceFocus = true;
Game.Hook.ForceFocusWindowName = "Call of Duty®";
Game.HasDynamicWindowTitle = true;
Game.HookFocus = true;
Game.PreventWindowDeactivation = false;
Game.KeyboardPlayerSkipPreventWindowDeactivate = false;
Game.Hook.DInputEnabled = false;
Game.Hook.DInputForceDisable = true;
Game.Hook.XInputEnabled = true;
Game.Hook.XInputReroute = false;
Game.BlockRawInput = false;
Game.Hook.CustomDllEnabled = false;
Game.Hook.UseAlpha8CustomDll = false;
Game.ResetWindows = false;
Game.InjectHookXinput = true;
Game.PromptBetweenInstances = false;
Game.UserProfileConfigPath = "AppData\\Local\\Activision";
Game.SetForegroundWindowElsewhere = true;
Game.Description =
"Assign either controllers or mouse/keyboard and launch your instances(max 2 players for now). Only if you're using a keyboard/mouse, once the instances have resized/repositioned press the end key to lock and apply hooks. You will need to press the end key again to unlock your instances and close Nucleus, this only applies if you're using keyboard/mouse. In case the mouse cursor is not responding in one of the instances, just press the end key and then press it again to apply hooks again. Once the instances are unlocked, you can quickly close all your instances by holding Ctrl and Q. If asked to create an online profile select cancel, no and exit. Setup your LAN campaign/zombie match in the first instance and have the other player join by searching the match under find game, remember to select LAN under source. For custom mods to work, unless the name of the mod is already reflected under Select Custom Mod, you will need to open and edit the game handler by right clicking on the CoDWaW icon in the left column of Nucleus Coop, and on the second line, you will need to add the exact name of the mod preceded by a coma and putting quotations. Lastly, you will need to open your userprofile config file path by right clicking on the CoDWaW icon in the left column of Nucleus Coop and selecting Open Userprofile Config Path and your Nucleus Userprofile. Once your userprofile config file path has opened in explorer, proceed to place your custom mod under the CoDWaW/mod folder. This procoedure will need to be repeated for each of the instances you wish to launch. Have fun playing split screen!";
Game.SupportsMultipleKeyboardsAndMice = true;
Game.Play = function() {
// 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;
var mod = Context.Options["mod"];
if (mod == "None") {
}
var Mod = Context.Options["Mod"];
var Args = (Context.Args = " +r_fullscreen 0 +set fs_game mods/" + Mod + " ");
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") {
}
if (System.IO.File.Exists(Context.EnvironmentPlayer + "\\Appdata\\Local\\Activision\\CoDWaW\\__CoDWaW")) {
System.IO.File.Delete(Context.EnvironmentPlayer + "\\Appdata\\Local\\Activision\\CoDWaW\\__CoDWaW");
}
if (System.IO.File.Exists(Context.EnvironmentPlayer + "\\Appdata\\Local\\Activision\\CoDWaW\\__CoDWaWmp")) {
System.IO.File.Delete(Context.EnvironmentPlayer + "\\Appdata\\Local\\Activision\\CoDWaW\\__CoDWaWmp");
}
var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\CoDWaW.exe");
var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "CoDWaW.exe");
System.IO.File.Copy(savePkgOrigin, savePath, true);
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);
var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\d3d9.ini");
var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "d3d9.ini");
System.IO.File.Copy(savePkgOrigin, savePath, true);
var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Whatever.dll");
var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "T4M.dll");
System.IO.File.Copy(savePkgOrigin, savePath, true);
if (!System.IO.File.Exists(Context.EnvironmentPlayer + "\\Appdata\\Local\\Activision\\CoDWaW\\players\\profiles\\$$$")) {
var filePath = Context.EnvironmentPlayer + "\\Appdata\\Local\\Activision\\CoDWaW\\players\\profiles\\$$$";
System.IO.Directory.CreateDirectory(filePath);
}
if (!System.IO.File.Exists(Context.EnvironmentPlayer + "\\Appdata\\Local\\Activision\\CoDWaW\\players\\profiles\\$$$\\config.cfg")) {
var savePath = Context.EnvironmentPlayer + "\\Appdata\\Local\\Activision\\CoDWaW\\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 + "\\Appdata\\Local\\Activision\\CoDWaW\\players\\profiles\\$$$\\config_mp.cfg")) {
var savePath = Context.EnvironmentPlayer + "\\Appdata\\Local\\Activision\\CoDWaW\\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 + "\\Appdata\\Local\\Activision\\CoDWaW\\players\\profiles\\active.txt";
var dict = ["$$$"];
Context.WriteTextFile(txtPath, dict);
var pscontrollers = Context.Options["pscontrollers"];
if (pscontrollers == "Yes") {
var txtPath = Context.EnvironmentPlayer + "\\Appdata\\Local\\Activision\\CoDWaW\\players\\profiles\\$$$\\config.cfg";
var dict = [
Context.FindLineNumberInTextFile(txtPath, "bind BUTTON_LSHLDR", Nucleus.SearchType.StartsWith) + '|bind BUTTON_LSHLDR "+speed_throw"',
Context.FindLineNumberInTextFile(txtPath, "bind BUTTON_RSHLDR", Nucleus.SearchType.StartsWith) + '|bind BUTTON_RSHLDR "+attack"',
Context.FindLineNumberInTextFile(txtPath, "bind BUTTON_LTRIG", Nucleus.SearchType.StartsWith) + '|bind BUTTON_LTRIG "+smoke"',
Context.FindLineNumberInTextFile(txtPath, "bind BUTTON_RTRIG", Nucleus.SearchType.StartsWith) + '|bind BUTTON_RTRIG "+frag"',
Context.FindLineNumberInTextFile(txtPath, "seta gpad_buttonsConfig", Nucleus.SearchType.StartsWith) + '|seta gpad_buttonsConfig "buttons_default_alt"'
];
Context.ReplaceLinesInTextFile(txtPath, dict);
}
var pscontrollers = Context.Options["pscontrollers"];
if (pscontrollers == "No") {
var txtPath = Context.EnvironmentPlayer + "\\Appdata\\Local\\Activision\\CoDWaW\\players\\profiles\\$$$\\config.cfg";
var dict = [
Context.FindLineNumberInTextFile(txtPath, "bind BUTTON_LSHLDR", Nucleus.SearchType.StartsWith) + '|bind BUTTON_LSHLDR "+smoke"',
Context.FindLineNumberInTextFile(txtPath, "bind BUTTON_RSHLDR", Nucleus.SearchType.StartsWith) + '|bind BUTTON_RSHLDR "+frag"',
Context.FindLineNumberInTextFile(txtPath, "bind BUTTON_LTRIG", Nucleus.SearchType.StartsWith) + '|bind BUTTON_LTRIG "+speed_throw"',
Context.FindLineNumberInTextFile(txtPath, "bind BUTTON_RTRIG", Nucleus.SearchType.StartsWith) + '|bind BUTTON_RTRIG "+attack"'
];
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 (Player.Owner.IsDualVertical()) {
Context.PatchFile(
System.IO.Path.Combine(Game.Folder, "CoDWaW.exe"),
System.IO.Path.Combine(Context.RootFolder, "CoDWaW.exe"),
[0xab, 0xaa, 0xaa, 0x3f],
Context.ConvertToBytes(Context.AspectRatioDecimal)
);
var txtPath = Context.EnvironmentPlayer + "\\Appdata\\Local\\Activision\\CoDWaW\\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.ReplaceLinesInTextFile(txtPath, dict);
var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\d3d9.ini";
Context.ReplaceLinesInTextFile(
txtPath,
[
Context.FindLineNumberInTextFile(txtPath, "ConfineCursor=", Nucleus.SearchType.StartsWith) + "|ConfineCursor=true",
Context.FindLineNumberInTextFile(txtPath, "UnconfineCursor=", Nucleus.SearchType.StartsWith) + "|UnconfineCursor=true",
Context.FindLineNumberInTextFile(txtPath, "AlwaysOnTop=", Nucleus.SearchType.StartsWith) + "|AlwaysOnTop=1",
Context.FindLineNumberInTextFile(txtPath, "Borderless=", Nucleus.SearchType.StartsWith) + "|Borderless=true",
Context.FindLineNumberInTextFile(txtPath, "Center=", Nucleus.SearchType.StartsWith) + "|Center=false",
Context.FindLineNumberInTextFile(txtPath, "OverrideRes=", Nucleus.SearchType.StartsWith) + "|OverrideRes=" + Context.Width + "x" + Context.Height
],
"utf-8"
);
} else {
var fullscreen = Context.Options["fullscreen"];
if (fullscreen == "No") {
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 txtPath = Context.EnvironmentPlayer + "\\Appdata\\Local\\Activision\\CoDWaW\\players\\profiles\\$$$\\config.cfg";
var dict = [
Context.FindLineNumberInTextFile(txtPath, "seta r_fullscreen", Nucleus.SearchType.StartsWith) + '|seta r_fullscreen "0"',
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.ReplaceLinesInTextFile(txtPath, dict);
var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\d3d9.ini";
Context.ReplaceLinesInTextFile(
txtPath,
[
Context.FindLineNumberInTextFile(txtPath, "ConfineCursor=", Nucleus.SearchType.StartsWith) + "|ConfineCursor=true",
Context.FindLineNumberInTextFile(txtPath, "Fullscreen=", Nucleus.SearchType.StartsWith) + "|Fullscreen=false",
Context.FindLineNumberInTextFile(txtPath, "UnconfineCursor=", Nucleus.SearchType.StartsWith) + "|UnconfineCursor=true",
Context.FindLineNumberInTextFile(txtPath, "AlwaysOnTop=", Nucleus.SearchType.StartsWith) + "|AlwaysOnTop=1",
Context.FindLineNumberInTextFile(txtPath, "Borderless=", Nucleus.SearchType.StartsWith) + "|Borderless=true",
Context.FindLineNumberInTextFile(txtPath, "Center=", Nucleus.SearchType.StartsWith) + "|Center=false",
Context.FindLineNumberInTextFile(txtPath, "OverrideRes=", Nucleus.SearchType.StartsWith) + "|OverrideRes=" + Context.Width + "x" + Context.Height
],
"utf-8"
);
}
if (fullscreen == "720p") {
Game.DontResize = true;
Game.DontRemoveBorders = true;
Game.DontReposition = true;
var txtPath = Context.EnvironmentPlayer + "\\Appdata\\Local\\Activision\\CoDWaW\\players\\profiles\\$$$\\config.cfg";
var dict = [
Context.FindLineNumberInTextFile(txtPath, "seta r_fullscreen", Nucleus.SearchType.StartsWith) + '|seta r_fullscreen "1"',
Context.FindLineNumberInTextFile(txtPath, "seta r_aaSamples", Nucleus.SearchType.StartsWith) + '|seta r_aaSamples "1"',
Context.FindLineNumberInTextFile(txtPath, "seta r_specular", Nucleus.SearchType.StartsWith) + '|seta r_specular "0"',
Context.FindLineNumberInTextFile(txtPath, "seta sm_enable", Nucleus.SearchType.StartsWith) + '|seta sm_enable "0"',
Context.FindLineNumberInTextFile(txtPath, "seta r_vsync", Nucleus.SearchType.StartsWith) + '|seta r_vsync "1"',
Context.FindLineNumberInTextFile(txtPath, "seta r_dof_enable", Nucleus.SearchType.StartsWith) + '|seta r_dof_enable "0"',
Context.FindLineNumberInTextFile(txtPath, "seta ragdoll_enable", Nucleus.SearchType.StartsWith) + '|seta ragdoll_enable "0"',
Context.FindLineNumberInTextFile(txtPath, "seta r_customMode", Nucleus.SearchType.StartsWith) + '|seta r_customMode "1280x720"',
Context.FindLineNumberInTextFile(txtPath, "seta r_mode", Nucleus.SearchType.StartsWith) + '|seta r_mode "1280x720"'
];
Context.ReplaceLinesInTextFile(txtPath, dict);
}
if (fullscreen == "1080p") {
Game.DontResize = true;
Game.DontRemoveBorders = true;
Game.DontReposition = true;
var txtPath = Context.EnvironmentPlayer + "\\Appdata\\Local\\Activision\\CoDWaW\\players\\profiles\\$$$\\config.cfg";
var dict = [
Context.FindLineNumberInTextFile(txtPath, "seta r_fullscreen", Nucleus.SearchType.StartsWith) + '|seta r_fullscreen "1"',
Context.FindLineNumberInTextFile(txtPath, "seta r_aaSamples", Nucleus.SearchType.StartsWith) + '|seta r_aaSamples "1"',
Context.FindLineNumberInTextFile(txtPath, "seta r_specular", Nucleus.SearchType.StartsWith) + '|seta r_specular "0"',
Context.FindLineNumberInTextFile(txtPath, "seta sm_enable", Nucleus.SearchType.StartsWith) + '|seta sm_enable "0"',
Context.FindLineNumberInTextFile(txtPath, "seta r_vsync", Nucleus.SearchType.StartsWith) + '|seta r_vsync "1"',
Context.FindLineNumberInTextFile(txtPath, "seta r_dof_enable", Nucleus.SearchType.StartsWith) + '|seta r_dof_enable "0"',
Context.FindLineNumberInTextFile(txtPath, "seta ragdoll_enable", Nucleus.SearchType.StartsWith) + '|seta ragdoll_enable "0"',
Context.FindLineNumberInTextFile(txtPath, "seta r_customMode", Nucleus.SearchType.StartsWith) + '|seta r_customMode "1920x1080"',
Context.FindLineNumberInTextFile(txtPath, "seta r_mode", Nucleus.SearchType.StartsWith) + '|seta r_mode "1920x1080"'
];
Context.ReplaceLinesInTextFile(txtPath, dict);
}
}
var Mus = Context.Options["Mus"];
if (Mus == "Yes") {
if (Context.PlayerID == 0) {
var txtPath = Context.EnvironmentPlayer + "\\Appdata\\Local\\Activision\\CoDWaW\\players\\profiles\\$$$\\config.cfg";
var dict = [
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 + "\\Appdata\\Local\\Activision\\CoDWaW\\players\\profiles\\$$$\\config.cfg";
var dict = [
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);
}
}
if (Mus == "No") {
var txtPath = Context.EnvironmentPlayer + "\\Appdata\\Local\\Activision\\CoDWaW\\players\\profiles\\$$$\\config.cfg";
var dict = [
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);
}
var opt = Context.Options["opt"];
if (opt == "Yes") {
var txtPath = Context.EnvironmentPlayer + "\\Appdata\\Local\\Activision\\CoDWaW\\players\\profiles\\$$$\\config.cfg";
var dict = [
Context.FindLineNumberInTextFile(txtPath, "seta r_aaSamples", Nucleus.SearchType.StartsWith) + '|seta r_aaSamples "1"',
Context.FindLineNumberInTextFile(txtPath, "seta r_specular", Nucleus.SearchType.StartsWith) + '|seta r_specular "0"',
Context.FindLineNumberInTextFile(txtPath, "seta sm_enable", Nucleus.SearchType.StartsWith) + '|seta sm_enable "0"',
Context.FindLineNumberInTextFile(txtPath, "seta r_vsync", Nucleus.SearchType.StartsWith) + '|seta r_vsync "1"',
Context.FindLineNumberInTextFile(txtPath, "seta r_dof_enable", Nucleus.SearchType.StartsWith) + '|seta r_dof_enable "0"',
Context.FindLineNumberInTextFile(txtPath, "seta ragdoll_enable", Nucleus.SearchType.StartsWith) + '|seta ragdoll_enable "0"'
];
Context.ReplaceLinesInTextFile(txtPath, dict);
}
if (Context.HasKeyboardPlayer) {
if (System.IO.File.Exists((Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\d3d9.dll"))) {
System.IO.File.Delete((Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\d3d9.dll"));
}
Game.PauseBetweenProcessGrab = 25;
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 = [];
} else {
Game.PauseBetweenStarts = 20;
}
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, 5, 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.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);
}
};
};