Jump King · handler “Jump King Co-op Mod”
Version 2
Release notes
Jump King Plus support.
- Released
- Size
- 1.7 MB
- Downloads
- 322
- Check
- Verified
- SHA-256
- d7051d59c034e22637319be25ea744887f80b303737bd71fdbe99b9a4b0040e5
Files 6
| Path | Size |
|---|---|
| handler.js | 14 KB |
| JumpKing/0Harmony.dll | 788 KB |
| JumpKing/Content/mods/JumpKingCoop.dll | 54 KB |
| JumpKing/Content/mods/JumpKingCoop.xml | 241 B |
| JumpKing/MonoGame.Framework.dll | 882 KB |
| JumpKing/steam_api.dll | 2.4 MB |
handler.js
Plain textHub.Handler.Version = 2; // Released at https://hub.splitscreen.me/ on Sat Aug 13 2022 07:15:13 GMT+0000 (Coordinated Universal Time).
Hub.Handler.Id = "ns73BtZRYhbcC4eaa";
Hub.Maintainer.Name = "Talos91";
Hub.Maintainer.Id = "eeL7HAz8zJovChWw4";
Game.ExecutableContext = ["Content"];
Game.DirSymlinkExclusions = ["Content\\mods", "Content\\Saves", "Content\\SavesPerma", "Content\\settings"];
Game.FileSymlinkExclusions = ["steam_api.dll", "steam_appid.txt", "0Harmony.dll", "MonoGame.Framework.dll", "JumpKingCoop.dll", "JumpKingCoop.log", "JumpKingCoop.xml"];
Game.FileSymlinkCopyInstead = [
"combined.sav",
"attempt_stats.stat",
"event_flags.set",
"general_settings.set",
"inventory.inv",
"perma_player_stats.stat",
"babe.xml",
"discordLocations.xml",
"graphics.xml",
"crashlog.log",
"DiscordRPC.dll",
"DiscordRPC.xml",
"install_slimdx.vdf",
"JumpKing.exe.config",
"JumpKingPlus.dll",
"language.xml",
"LanguageJK.dll",
"LanguageJK.dll.config",
"MonoGame.Framework.xml",
"Newtonsoft.Json.dll",
"Newtonsoft.Json.xml",
"SharpDX.Direct2D1.dll",
"SharpDX.Direct2D1.xml",
"SharpDX.Direct3D11.dll",
"SharpDX.Direct3D11.xml",
"SharpDX.dll",
"SharpDX.DXGI.dll",
"SharpDX.DXGI.xml",
"SharpDX.MediaFoundation.dll",
"SharpDX.MediaFoundation.xml",
"SharpDX.XAudio2.dll",
"SharpDX.XAudio2.xml",
"SharpDX.XInput.dll",
"SharpDX.XInput.xml",
"SharpDX.xml",
"SlimDX.dll",
"SlimDX.xml",
"Steamworks.NET.dll"
];
Game.NeedsSteamEmulation = false;
Game.UseGoldberg = true;
Game.GoldbergExperimental = true;
Game.HandlerInterval = 100;
Game.SymlinkExe = false;
Game.SymlinkGame = true;
Game.SymlinkFolders = true;
Game.ExecutableName = "JumpKing.exe";
Game.SteamID = "1061090";
Game.GUID = "Jump King";
Game.GameName = "Jump King";
Game.MaxPlayers = 8;
Game.MaxPlayersOneMonitor = 8;
Game.LauncherTitle = "";
Game.HideTaskbar = false;
Game.NotTopMost = false;
Game.DontResize = false;
Game.DontReposition = false;
Game.DontRemoveBorders = false;
Game.Hook.ForceFocus = true;
Game.Hook.ForceFocusWindowName = "Jump King";
Game.FakeFocus = true;
Game.FakeFocusInterval = 7000;
Game.SendFakeFocusMsg = true;
Game.ResetWindows = true;
Game.SetWindowHook = true;
Game.RefreshWindowAfterStart = true;
Game.Hook.DInputEnabled = false;
Game.Hook.XInputEnabled = true;
Game.Hook.XInputReroute = false;
Game.Hook.CustomDllEnabled = false;
Game.XInputPlusDll = ["xinput1_4.dll", "xinput9_1_0.dll"];
Game.Description =
"IMPORTANT: This handler now supports JumpKingPlus for co-op, install JumpKingPlus in your main game files before running this, if you want to use the vanilla Jump King Steam files the handler will use the Jump King Co-op Mod by sajmonks instead. Requires Jump King Steam version. Run your main game and change some graphics settings before launching this handler so that the graphics settings file gets generated. If you are using the vanilla Steam files to connect the instances start a game in one instance then in the others in the same area and they will auto connect to each other. If you have JumpKingPlus installed to connect the instances start a game in all instances in the same area, press start and enable online in all then use the overlay to invite the other players, press left shift+tab to open the invite overlay, alt-tab between instances to use the keyboard, in an instance press F1 to accept the invite, if the overlay does not show make sure you disable any external overlays that could be interfering. Delete Nucleus Co-op content folder before running the handler if you switch between the vanilla game files and JumpKingPlus. Your saves per instance are inside Nucleus content folder in the Jump King instances folders (Content\\Saves), so be careful about not deleting them, you can also copy your main saves there. If you use multiple keyboards press the END key once when the instances finish setting up to lock and restrict the keyboards to each instance correctly. 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.";
Game.KeepSymLinkOnExit = true;
Game.PauseBetweenProcessGrab = 1;
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 = false;
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 = false;
Game.ProtoInput.SendMouseWheelMessages = true;
Game.ProtoInput.SendMouseButtonMessages = true;
Game.ProtoInput.SendMouseMovementMessages = true;
Game.ProtoInput.SendKeyboardButtonMessages = true;
Game.ProtoInput.XinputHook = false;
Game.ProtoInput.UseDinputRedirection = false;
Game.ProtoInput.UseOpenXinput = false;
Game.ProtoInput.DinputDeviceHook = false;
Game.ProtoInput.DinputHookAlsoHooksGetDeviceState = false;
Game.ProtoInput.EnableFocusMessageLoop = false;
//Game.ProtoInput.FocusLoopIntervalMilliseconds = 5;
//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 path = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Content\\settings\\graphics.xml";
Context.ChangeXmlNodeInnerTextValue(path, "//screen_mode", "Windowed");
Context.ChangeXmlNodeInnerTextValue(path, "//size_mode", "x2");
Context.ChangeXmlNodeInnerTextValue(path, "//vsync_on", "false");
var filePath = (Context.filePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\steam_settings\\mods");
System.IO.Directory.CreateDirectory(filePath);
var appid = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\steam_settings\\steam_appid.txt";
var lines = ["1061090"];
Context.WriteTextFile(appid, lines);
if (System.IO.File.Exists(Context.OrigRootFolder + "\\JumpKingPlus.dll")) {
var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\steam_api.dll");
var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "steam_api.dll");
System.IO.File.Copy(savePkgOrigin, savePath, true);
System.IO.File.Copy(System.IO.Path.Combine(Context.RootInstallFolder, "MonoGame.Framework.dll"), System.IO.Path.Combine(Context.RootFolder, "MonoGame.Framework.dll"), true);
} else {
Context.CopyScriptFolder(Context.GetFolder(Nucleus.Folder.InstancedGameFolder));
var nolay = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\steam_settings\\disable_overlay.txt";
var lines = [""];
Context.WriteTextFile(nolay, lines);
if (Context.PlayerID == 0) {
var path = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Content\\mods\\JumpKingCoop.xml";
Context.ChangeXmlNodeInnerTextValue(path, "//Enabled", "true");
Context.ChangeXmlNodeInnerTextValue(path, "//Server", "true");
Context.ChangeXmlNodeInnerTextValue(path, "//IpAddress", "127.0.0.1");
Context.ChangeXmlNodeInnerTextValue(path, "//Nickname", Context.Nickname);
} else {
var path = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Content\\mods\\JumpKingCoop.xml";
Context.ChangeXmlNodeInnerTextValue(path, "//Enabled", "true");
Context.ChangeXmlNodeInnerTextValue(path, "//Server", "false");
Context.ChangeXmlNodeInnerTextValue(path, "//IpAddress", "127.0.0.1");
Context.ChangeXmlNodeInnerTextValue(path, "//Nickname", Context.Nickname);
}
}
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.FocusHooksHookID);
ProtoInput.EnableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.RawInputFilterID);
// 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.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);
}
};
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.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.StopFocusMessageLoop(player.ProtoInputInstanceHandle);
}
};
};