Grim Dawn · handler “Grim Dawn”
Version 16 (current)
Release notes
native LAN fixed on the same PC for Grim Dawn v1.3.0
- Released
- Size
- 6.5 MB
- Downloads
- 504
- Check
- Verified
- SHA-256
- 8bc96552448e3a402dec4b936f86af9334da8990333a838126364d1ec1ee93f8
Files 7
| Path | Size |
|---|---|
| GrimDawn/PortRebinderV3.asi | 126 KB |
| GrimDawn/PortRebinderV3.ini | 1.5 KB |
| GrimDawn/winmm.dll | 5.2 MB |
| GrimDawn/x64/PortRebinderV3.asi | 132 KB |
| GrimDawn/x64/PortRebinderV3.ini | 1.5 KB |
| GrimDawn/x64/winmm.dll | 3.5 MB |
| handler.js | 12 KB |
handler.js
Plain textHub.Handler.Version = 16; // Released at https://hub.splitscreen.me/ on Sun Aug 16 2026 10:35:36 GMT+0000 (Coordinated Universal Time).
Hub.Handler.Id = "K8M5mDtTcKu4ofMYn";
Hub.Maintainer.Name = "Talos91";
Hub.Maintainer.Id = "eeL7HAz8zJovChWw4";
var answers1 = ["x64", "x86", "DX9"];
Game.AddOption("Version?", "Select the game's exe to use.", "Ver", answers1);
Game.ExecutableContext = ["resources"];
Game.KillMutex = ["GrimDawn"];
Game.DirSymlinkCopyInstead = ["x64"];
Game.FileSymlinkExclusions = ["steam_appid.txt", "winmm.dll", "xinput1_3.dll"];
Game.FileSymlinkCopyInstead = ["Grim Dawn.exe", "steam_api.dll", "steam_api64.dll"];
Game.UseNucleusEnvironment = false;
Game.HandlerInterval = 100;
Game.SymlinkExe = false;
Game.SymlinkGame = true;
Game.ExecutableName = "Grim Dawn.exe";
Game.SteamID = "219990";
Game.GUID = "Grim Dawn";
Game.GameName = "Grim Dawn";
Game.MaxPlayers = 4;
Game.MaxPlayersOneMonitor = 4;
Game.SetTopMostAtEnd = true;
Game.Hook.ForceFocus = true;
Game.Hook.ForceFocusWindowName = "Grim Dawn";
Game.IgnoreWindowBorderCheck = true;
Game.DontRemoveBorders = true;
Game.Hook.DInputEnabled = false;
Game.Hook.XInputEnabled = false;
Game.Hook.XInputReroute = false;
Game.Hook.CustomDllEnabled = false;
Game.UserProfileSavePath = "Documents\\My Games\\Grim Dawn\\save";
Game.UserProfileConfigPath = "Documents\\My Games\\Grim Dawn\\Settings";
Game.Description =
"Launch with Steam opened and disable Steam Input for this game. After all the instances have launched, resized and positioned correctly, press the END key once to lock the input for all instances to have their own working cursor, even gamepad instances, you need to left click on an instance to make the emulated cursors appear after locking the input. Press the END key again to unlock the input when you finish playing. You can also use CTRL+Q to close Nucleus and all its instances when the input is unlocked. Use a different character/save per instance, host a LAN game in one instance and join in the others, you can create and name a new character when the input is unlocked.";
Game.PauseBetweenContextAndLaunch = 3;
Game.PauseBetweenProcessGrab = 3;
Game.PauseBetweenStarts = 27;
//USS 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.HookReRegisterRawInput = false;
Game.HookReRegisterRawInputMouse = false;
Game.HookReRegisterRawInputKeyboard = false;
Game.DrawFakeMouseCursor = false;
//ProtoInput:
Game.SupportsMultipleKeyboardsAndMice = true;
Game.ProtoInput.InjectStartup = false;
Game.ProtoInput.InjectRuntime_RemoteLoadMethod = false;
Game.ProtoInput.InjectRuntime_EasyHookMethod = true;
Game.ProtoInput.InjectRuntime_EasyHookStealthMethod = false;
Game.LockInputAtStart = false;
Game.LockInputSuspendsExplorer = true;
Game.ProtoInput.FreezeExternalInputWhenInputNotLocked = false;
Game.LockInputToggleKey = 0x23;
Game.ProtoInput.RenameHandlesHook = false;
Game.ProtoInput.RenameHandles = [];
Game.ProtoInput.RenameNamedPipes = [];
Game.ProtoInput.RegisterRawInputHook = true;
Game.ProtoInput.GetRawInputDataHook = true;
Game.ProtoInput.MessageFilterHook = true;
Game.ProtoInput.GetCursorPosHook = true;
Game.ProtoInput.SetCursorPosHook = true;
Game.ProtoInput.GetKeyStateHook = true;
Game.ProtoInput.GetAsyncKeyStateHook = true;
Game.ProtoInput.GetKeyboardStateHook = true;
Game.ProtoInput.CursorVisibilityHook = true;
Game.ProtoInput.ClipCursorHook = true;
Game.ProtoInput.FocusHooks = true;
Game.ProtoInput.DrawFakeCursor = true;
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 = false;
Game.ProtoInput.SendMouseWheelMessages = true;
Game.ProtoInput.SendMouseButtonMessages = true;
Game.ProtoInput.SendMouseMovementMessages = true;
Game.ProtoInput.SendKeyboardButtonMessages = true;
Game.ProtoInput.XinputHook = true;
Game.ProtoInput.UseOpenXinput = true;
Game.ProtoInput.UseDinputRedirection = false;
Game.ProtoInput.DinputDeviceHook = false;
Game.ProtoInput.DinputHookAlsoHooksGetDeviceState = false;
Game.ProtoInput.EnableFocusMessageLoop = false;
//Game.ProtoInput.FocusLoopIntervalMilliseconds = 40000;
//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 = [0x0008]; //Blocks WM_KILLFOCUS.
Game.Play = function() {
Context.BackupFile(Context.GetFolder(Nucleus.Folder.Documents) + "\\My Games\\Grim Dawn\\Settings\\options.txt", true);
var txtPath = Context.GetFolder(Nucleus.Folder.Documents) + "\\My Games\\Grim Dawn\\Settings\\options.txt";
var dict = [
//Context.FindLineNumberInTextFile(txtPath, "inactiveUpdateRate", Nucleus.SearchType.StartsWith) + "|inactiveUpdateRate = 0",
//Context.FindLineNumberInTextFile(txtPath, "cloudSaving", Nucleus.SearchType.StartsWith) + "|cloudSaving = false",
Context.FindLineNumberInTextFile(txtPath, "gamepadSupport", Nucleus.SearchType.StartsWith) + "|gamepadSupport = true",
Context.FindLineNumberInTextFile(txtPath, "resolution", Nucleus.SearchType.StartsWith) + "|resolution = " + Context.Width + " " + Context.Height,
//Context.FindLineNumberInTextFile(txtPath, "windowPosition", Nucleus.SearchType.StartsWith) + "|windowPosition = " + Context.PosX + ' ' + Context.PosY,
Context.FindLineNumberInTextFile(txtPath, "screenMode", Nucleus.SearchType.StartsWith) + "|screenMode = 2",
Context.FindLineNumberInTextFile(txtPath, "voicechatEnabled", Nucleus.SearchType.StartsWith) + "|voicechatEnabled = false"
];
Context.ReplaceLinesInTextFile(txtPath, dict);
var appid = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\steam_appid.txt";
var lines = ["219990"];
Context.WriteTextFile(appid, lines);
var appid = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\x64\\steam_appid.txt";
var lines = ["219990"];
Context.WriteTextFile(appid, lines);
//rebind ports for the native LAN to work on the same PC:
Context.CopyScriptFolder(Context.GetFolder(Nucleus.Folder.InstancedGameFolder));
var savePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\PortRebinderV3.ini";
Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [new Nucleus.IniSaveInfo("PORTS", "ToPort", "4280" + (Context.PlayerID + 1))]);
var savePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\x64\\PortRebinderV3.ini";
Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [new Nucleus.IniSaveInfo("PORTS", "ToPort", "4280" + (Context.PlayerID + 1))]);
var ver = Context.Options["Ver"];
if (ver == "x64") {
Context.StartArguments = "/x64";
}
if (ver == "DX9") {
Context.StartArguments = "/d3d9";
}
Game.ProtoInput.OnInputLocked = function() {
for (var i = 0; i < PlayerList.Count; i++) {
var player = PlayerList[i];
//ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.GetCursorPosHookID);
//ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.SetCursorPosHookID);
//ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.GetKeyStateHookID);
//ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.GetAsyncKeyStateHookID);
//ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.GetKeyboardStateHookID);
//ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.CursorVisibilityStateHookID);
//ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.GetRawInputDataHookID);
//ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.RegisterRawInputHookID);
//ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.MessageFilterHookID);
//ProtoInput.EnableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.MouseMoveFilterID);
//ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.FocusHooksHookID);
ProtoInput.EnableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.RawInputFilterID);
ProtoInput.EnableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.MouseActivateFilterID);
ProtoInput.EnableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.WindowActivateFilterID);
ProtoInput.EnableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.WindowActivateAppFilterID);
ProtoInput.EnableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.MouseWheelFilterID);
ProtoInput.EnableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.MouseButtonFilterID);
ProtoInput.EnableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.KeyboardButtonFilterID);
//ProtoInput.SetDrawFakeCursor(player.ProtoInputInstanceHandle, true);
ProtoInput.SetRawInputBypass(player.ProtoInputInstanceHandle, false);
}
};
Game.ProtoInput.OnInputUnlocked = function() {
for (var i = 0; i < PlayerList.Count; i++) {
var player = PlayerList[i];
//ProtoInput.UninstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.GetCursorPosHookID);
//ProtoInput.UninstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.SetCursorPosHookID);
//ProtoInput.UninstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.GetKeyStateHookID);
//ProtoInput.UninstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.GetAsyncKeyStateHookID);
//ProtoInput.UninstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.GetKeyboardStateHookID);
//ProtoInput.UninstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.CursorVisibilityStateHookID);
//ProtoInput.UninstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.GetRawInputDataHookID);
//ProtoInput.UninstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.RegisterRawInputHookID);
//ProtoInput.UninstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.MessageFilterHookID);
//ProtoInput.UninstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.FocusHooksHookID);
ProtoInput.DisableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.RawInputFilterID);
ProtoInput.DisableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.MouseMoveFilterID);
ProtoInput.DisableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.MouseActivateFilterID);
ProtoInput.DisableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.WindowActivateFilterID);
ProtoInput.DisableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.WindowActivateAppFilterID);
ProtoInput.DisableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.MouseWheelFilterID);
ProtoInput.DisableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.MouseButtonFilterID);
ProtoInput.DisableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.KeyboardButtonFilterID);
//ProtoInput.SetDrawFakeCursor(player.ProtoInputInstanceHandle, false);
ProtoInput.SetRawInputBypass(player.ProtoInputInstanceHandle, true);
}
};
};