Crypt of the NecroDancer · handler “Crypt of the NecroDancer”
Version 1 (current)
Release notes
First Release.
- Released
- Size
- 2.9 KB
- Downloads
- 342
- Check
- Verified
- SHA-256
- 7fe6650bb7ff350fe877c2e6c420f036312ed9bb4afdafb3e465e19ce33ebf12
Files 1
| Path | Size |
|---|---|
| handler.js | 12 KB |
handler.js
Plain textHub.Handler.Version = 1; // Released at https://hub.splitscreen.me/ on Wed Aug 31 2022 04:19:57 GMT+0000 (Coordinated Universal Time).
Hub.Handler.Id = "64GTifbZfKpiZfC6s";
Hub.Maintainer.Name = "Zensuu";
Hub.Maintainer.Id = "sshRgms8c4xET4sCy";
var answers1 = ["No", "Yes", "Launch only first instance with Steam"];
Game.AddOption(
"Launch all instances with Steam?",
"Select no if you are using the GOG version or if you want to play the Steam version without Steam. If you select yes all instances will share the same save but you can unlock Steam achievements. Make sure you disable Steam Input for gamepads to work correctly.",
"Steam",
answers1
);
Game.ExecutableContext = ["Galaxy64.dll"];
Game.DirSymlinkExclusions = ["data", "Necrodancer64", "Necrodancer", "logs"];
Game.FileSymlinkExclusions = ["steam_api.dll", "steam_api64.dll", "steam_appid.txt", "local_save.txt", "dinput8.dll"];
Game.FileSymlinkCopyInstead = ["necrodancer.xml", "sounds.xml", "save_data.xml", "fmodex.dll", "NecroDancer.exe", "config.json"];
Game.UseNucleusEnvironment = true;
Game.UseGoldberg = true;
Game.GoldbergNoLocalSave = true;
Game.HandlerInterval = 100;
Game.SymlinkExe = false;
Game.SymlinkGame = true;
Game.SymlinkFolders = true;
Game.ExecutableName = "NecroDancer.exe";
Game.SteamID = "247080";
Game.GUID = "Crypt of the NecroDancer";
Game.GameName = "Crypt of the NecroDancer";
Game.LauncherTitle = "";
Game.BinariesFolder = "Necrodancer64";
Game.MaxPlayersOneMonitor = 8;
Game.MaxPlayers = 8;
Game.Hook.ForceFocus = true;
Game.Hook.ForceFocusWindowName = "Crypt of the NecroDancer";
Game.HasDynamicWindowTitle = true;
Game.ResetWindows = true;
Game.Hook.DInputEnabled = true;
Game.Hook.XInputEnabled = true;
Game.Hook.XInputReroute = false;
Game.UseDevReorder = true;
Game.Hook.CustomDllEnabled = false;
Game.UserProfileSavePath = "AppData\\Roaming\\Goldberg SteamEmu Saves\\247080\\remote";
Game.UserProfileSavePathNoCopy = true;
Game.UserProfileConfigPath = "AppData\\Roaming\\NecroDancer";
Game.UserProfileConfigPathNoCopy = true;
Game.Description =
'IMPORTANT: This requires the SYNCHRONY DLC. Run your main game at least once before using this and set it to windowed. Select multiplayer and host with one player using LAN (switch lobby visibility to "IP ADDRESS") and join with the rest using "CONNECT TO IP ADDRESS", connect with IP 127.0.0.1. Alt-tab between instances to use the keyboard. Make sure music is only enabled for one player. If you use gamepads make sure you select your gamepad in the game input options per instance and map the menu keys. When using the steam version disable Steam Input for this game in Steam settings for the gamepads to work and restrict correctly. If you have keyboard players once all instances have resized and repositioned, press the END key to lock input for all instances to have control. Press the END key again to unlock input. While input is unlocked you can use CTRL+T and CTRL+Q to minimized all instances and close all instances respectively. This handler supports dinput gamepads, xinput emulators are not needed. Xbox One gamepads do not work and have issues with background input/focus because of this: http://www.snes9x.com/phpbb3/viewtopic.php?t=27510 .';
Game.KeepSymLinkOnExit = false;
Game.PauseBetweenProcessGrab = 2;
Game.PauseBetweenStarts = 25;
//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 = 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 = false;
Game.ProtoInput.ClipCursorHook = true;
Game.ProtoInput.FocusHooks = false;
Game.ProtoInput.DrawFakeCursor = false;
Game.ProtoInput.FindWindowHook = 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 = false;
Game.ProtoInput.SendMouseWheelMessages = true;
Game.ProtoInput.SendMouseButtonMessages = true;
Game.ProtoInput.SendMouseMovementMessages = true;
Game.ProtoInput.SendKeyboardButtonMessages = true;
Game.ProtoInput.XinputHook = false;
Game.ProtoInput.UseOpenXinput = false;
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() {
var steam = Context.Options["Steam"];
if (steam == "No") {
}
if (steam == "Yes") {
var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\steam_api.dll");
var savePkgOrigin = System.IO.Path.Combine(Context.OrigRootFolder, "steam_api.dll");
System.IO.File.Copy(savePkgOrigin, savePath, true);
var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Necrodancer64\\steam_api64.dll");
var savePkgOrigin = System.IO.Path.Combine(Context.OrigRootFolder, "Necrodancer64\\steam_api64.dll");
System.IO.File.Copy(savePkgOrigin, savePath, true);
var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Necrodancer\\steam_api.dll");
var savePkgOrigin = System.IO.Path.Combine(Context.OrigRootFolder, "Necrodancer\\steam_api.dll");
System.IO.File.Copy(savePkgOrigin, savePath, true);
}
if (steam == "Launch only first instance with Steam") {
if (Context.PlayerID == 0) {
var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\steam_api.dll");
var savePkgOrigin = System.IO.Path.Combine(Context.OrigRootFolder, "steam_api.dll");
System.IO.File.Copy(savePkgOrigin, savePath, true);
var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Necrodancer64\\steam_api64.dll");
var savePkgOrigin = System.IO.Path.Combine(Context.OrigRootFolder, "Necrodancer64\\steam_api64.dll");
System.IO.File.Copy(savePkgOrigin, savePath, true);
var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Necrodancer\\steam_api.dll");
var savePkgOrigin = System.IO.Path.Combine(Context.OrigRootFolder, "Necrodancer\\steam_api.dll");
System.IO.File.Copy(savePkgOrigin, savePath, true);
}
}
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);
//Avoid the mouse move filter unless absolutely necessary as it can massively affect performance if the game gets primary input from mouse move messages
//ProtoInput.EnableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.MouseMoveFilterID);
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.StopFocusMessageLoop(player.ProtoInputInstanceHandle);
}
};
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.InstallHook(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.StartFocusMessageLoop(player.ProtoInputInstanceHandle, 5000, true, true, false, false, false);
}
};
};