Peak · handler “PEAK Game”
Version 9
Release notes
badges fix gb update
- Released
- Size
- 8.0 MB
- Downloads
- 6,096
- Check
- Verified
- SHA-256
- 098e2d46eb318a2a6f6557ded110fa78ce7c3dced178176a02762448d3976df7
Files 120
| Path | Size |
|---|---|
| handler.js | 16 KB |
| Peak/inputmessagetranslator.asi | 17 KB |
| Peak/steam_api64.dll | 10.9 MB |
| Peak/steam_settings/achievements.json | 178 KB |
| Peak/steam_settings/auto_accept_invite.txt | 0 B |
| Peak/steam_settings/auto_send_invite.txt | 0 B |
| Peak/steam_settings/configs.app.ini | 1.1 KB |
| Peak/steam_settings/configs.main.ini | 6.9 KB |
| Peak/steam_settings/configs.overlay.ini | 4.7 KB |
| Peak/steam_settings/configs.user.ini | 1.6 KB |
| Peak/steam_settings/img/05543471ee7f7ab73d2c873b6157ca2c5cfa7b27.jpg | 26 KB |
| Peak/steam_settings/img/05d979b4b8cd780c5bb1bf12defe061104d1d3c0.jpg | 25 KB |
| Peak/steam_settings/img/070ee570b3e6bf5299bcf9d9077e1d840eb812ad.jpg | 15 KB |
| Peak/steam_settings/img/080311b4db37226006349b94c06f17520ee13fa7.jpg | 28 KB |
| Peak/steam_settings/img/08c7c216ca0c200944c175bc1f03cc11f97aa327.jpg | 15 KB |
| Peak/steam_settings/img/0e8f81985c2d3102cd469112f97223d22125e35b.jpg | 17 KB |
| Peak/steam_settings/img/17f7ba1cf072db223badfd2d30a36faf5dac4b77.jpg | 31 KB |
| Peak/steam_settings/img/1c7eb9a4f5e33c592fe3e205c33edcfca8fd25c1.jpg | 22 KB |
| Peak/steam_settings/img/27f25eb3ec8fb4e7245aec8b48705a0812738773.jpg | 35 KB |
| Peak/steam_settings/img/2c65ac4eb3bbf6bbe02d19641ef4afdbdd1d5aa1.jpg | 14 KB |
| Peak/steam_settings/img/2c6b08b788bb9f884be54aa6b762f161994834d2.jpg | 19 KB |
| Peak/steam_settings/img/2d29940da60a812076e97d91d82f316d981bc552.jpg | 15 KB |
| Peak/steam_settings/img/2ea1f88b36c6416b5bc58e3bffb7a63510eee39f.jpg | 16 KB |
| Peak/steam_settings/img/2f73b72495694ecee87919961c15d9431dc9bb18.jpg | 17 KB |
| Peak/steam_settings/img/30f54b2dc7c920c7a4372c34f030cf2fe4b0c904.jpg | 16 KB |
| Peak/steam_settings/img/35c2dd94aee952a32c1650bffc2684e21c945db7.jpg | 15 KB |
| Peak/steam_settings/img/3b753366be9aa0a7577f0268fb36841555ffe410.jpg | 14 KB |
| Peak/steam_settings/img/3d4ac6ffb9a3c7b1d802b91aebde66e0e7450b74.jpg | 16 KB |
| Peak/steam_settings/img/3e34acf0bdc5e8e618d57ed4051b6674a961a761.jpg | 18 KB |
| Peak/steam_settings/img/40606fe9cbafb08a0e15d20315829f6747b335f9.jpg | 27 KB |
| Peak/steam_settings/img/40701fa821c4afaec63b4910d6508d296c28c7a7.jpg | 21 KB |
| Peak/steam_settings/img/41ce6d7161b1da52240972e63e0169007cb78b67.jpg | 18 KB |
| Peak/steam_settings/img/437385b0e5c2930db3496429ffb06a135f21d197.jpg | 22 KB |
| Peak/steam_settings/img/43c8e5a5f436b7992d826b2eb1ee6ca5926fff4b.jpg | 15 KB |
| Peak/steam_settings/img/479cd32912ac5fe93fb53905423291e7f6b67e51.jpg | 28 KB |
| Peak/steam_settings/img/4cfa107040054253f82d9d3dbf69a97d84701c19.jpg | 24 KB |
| Peak/steam_settings/img/4d918837219756f88b6fb411f3c6ec2b917f8523.jpg | 15 KB |
| Peak/steam_settings/img/50646ee6476bba68169b763a7b7f4a465c09d583.jpg | 12 KB |
| Peak/steam_settings/img/52b14c9fd204fe795d8cbb61663f673b86cd1bf7.jpg | 13 KB |
| Peak/steam_settings/img/5401aa59d9da99722a2b440cedf2bbe39baef566.jpg | 25 KB |
| Peak/steam_settings/img/5418e39582953a08895061345a55a7182937baea.jpg | 12 KB |
| Peak/steam_settings/img/59f105343a7cda0259cfabd1992463f28dd95200.jpg | 25 KB |
| Peak/steam_settings/img/5b223346eb5582f81162d92c6c3cc3bf033c7f0f.jpg | 22 KB |
| Peak/steam_settings/img/5f6f1907569a33eb62aebf8d0c75e66db5509549.jpg | 14 KB |
| Peak/steam_settings/img/60c5d0119b273cabd8ad12e29f48e3b32dacf874.jpg | 18 KB |
| Peak/steam_settings/img/623990845edc6b7e7a3591a543923a0507356490.jpg | 16 KB |
| Peak/steam_settings/img/633c5096e49e88946c6ee564046cc0a1d43ec146.jpg | 22 KB |
| Peak/steam_settings/img/6541523d91357a00bb49e24567429de6505ddcd3.jpg | 21 KB |
| Peak/steam_settings/img/680044b125a70f9d6b3293f847bf0115f710ae98.jpg | 15 KB |
| Peak/steam_settings/img/68f452a9898f794532f05cb6167122dba64dfb57.jpg | 22 KB |
| Peak/steam_settings/img/6a51615469153bf8c206044c3c2190fe34e2cd12.jpg | 25 KB |
| Peak/steam_settings/img/6ee281715373d8c3ce5ebb20196c5ef8d92d8dd6.jpg | 27 KB |
| Peak/steam_settings/img/6ff2bd89d83094ee9047e2455f1e64fdcb6612b3.jpg | 17 KB |
| Peak/steam_settings/img/7687e0907862bf82f0d64161bfbd9fa548482e32.jpg | 24 KB |
| Peak/steam_settings/img/77f181c574365f647af0073f559b639213855576.jpg | 19 KB |
| Peak/steam_settings/img/7904cc232eac6ffb345a96f2a265b1db4c1c535e.jpg | 25 KB |
| Peak/steam_settings/img/7b9dca4f5bd14effe9605284fad4e54bf42bbdd7.jpg | 19 KB |
| Peak/steam_settings/img/7d7633df25696d11b458fe294d5d00791243e9e0.jpg | 14 KB |
| Peak/steam_settings/img/7df1b695aa8618de20684d3ac3b155da1e4094cd.jpg | 13 KB |
| Peak/steam_settings/img/7e05f985fbd08bafb766314917b5cd857c6c2a7a.jpg | 14 KB |
| Peak/steam_settings/img/7e2752b0fd334c62fa8e9c33f94ff148900c1310.jpg | 16 KB |
| Peak/steam_settings/img/7ef1a19e7f1fc0156e8fbdc51425e6518cd2628b.jpg | 18 KB |
| Peak/steam_settings/img/7f147afe83d692cb9199f654945b0b631b48190d.jpg | 25 KB |
| Peak/steam_settings/img/82d65f1b4dd1482707d2f2c2f74d52521adb8be1.jpg | 26 KB |
| Peak/steam_settings/img/872c6763d6463af921c3553d21e7bccba00f35d3.jpg | 13 KB |
| Peak/steam_settings/img/89f7a17e55764abe4b0d9b59ab514f3abfef9605.jpg | 26 KB |
| Peak/steam_settings/img/8a4dc7bbf6d10ac13a7d55ad16ff21c1c5c61c2d.jpg | 21 KB |
| Peak/steam_settings/img/8ae93a068c402d8c43241e19b302171050c0050f.jpg | 24 KB |
| Peak/steam_settings/img/8c10405f5bdfa9f2787403c5484697b7c5ee48f4.jpg | 30 KB |
| Peak/steam_settings/img/8c2578497e1d65abff1092f5229cef68c061b3b9.jpg | 18 KB |
| Peak/steam_settings/img/8c3fe3d2eb49cb6d920cb2cdcf2aa6f2cb2b3167.jpg | 15 KB |
| Peak/steam_settings/img/8d3b6538701b338c533edd21f6f96438ccbb5e27.jpg | 13 KB |
| Peak/steam_settings/img/8d759e3de8c3e1e04c7e22e1b68990b57004a5e9.jpg | 24 KB |
| Peak/steam_settings/img/8fad9e85b8299250818db82fdf566d761121cc9a.jpg | 18 KB |
| Peak/steam_settings/img/95cc9ce0ad2a7b402f60b380c37b321f8104846e.jpg | 17 KB |
| Peak/steam_settings/img/9757dbabadd3711df0ad3706383b36375d210dbd.jpg | 22 KB |
| Peak/steam_settings/img/97cb4ca98da4fccf015d3dd893937b3a9172f62e.jpg | 22 KB |
| Peak/steam_settings/img/9f9e0fd40720a12fdd64c3ad8269348e5342d6ec.jpg | 23 KB |
| Peak/steam_settings/img/ad231c9a8244dbe6fd7a2b722c2068719e499be4.jpg | 15 KB |
| Peak/steam_settings/img/adcfd45f1f9a5b166810bcde765b296bd7aa6307.jpg | 17 KB |
| Peak/steam_settings/img/adf04113ad409279bd2733d6ecc2504b96dc43a1.jpg | 21 KB |
| Peak/steam_settings/img/ae8905110ad33ae398a0d21a82fe1f307064c5fb.jpg | 16 KB |
| Peak/steam_settings/img/b49a0c2aa5bb652c2e6ecfdc57ccc28d49e33f39.jpg | 15 KB |
| Peak/steam_settings/img/b6352212350b1281e5949a6524009ecfaffd303a.jpg | 15 KB |
| Peak/steam_settings/img/b6712f9c8113a1a7c66ebf4c685ca41f06aab598.jpg | 16 KB |
| Peak/steam_settings/img/b718db38a9d552456b69608abb21712a00a17ccf.jpg | 15 KB |
| Peak/steam_settings/img/bae410cc1fda34ebea932ccd7c1b5e7595345a3a.jpg | 16 KB |
| Peak/steam_settings/img/bb7847efa4f3fdc753bd30688f557afb3b5a9b07.jpg | 15 KB |
| Peak/steam_settings/img/be89f4398d2d5e045084d0f3ae6fc614b9502361.jpg | 14 KB |
| Peak/steam_settings/img/c209aa569e2f24ced48efc7f7d0fcfb8929ddcce.jpg | 15 KB |
| Peak/steam_settings/img/c330833ce80ea47ee0093bacceda296dc7565e5c.jpg | 35 KB |
| Peak/steam_settings/img/ca74df980945b5ad9b1aefc8bf61686c7cee0be4.jpg | 11 KB |
| Peak/steam_settings/img/cd4367de9dca4e160bdf86297d7e9003cb791c74.jpg | 27 KB |
| Peak/steam_settings/img/cd63536e849abccb956946a00f8d9ee99009af81.jpg | 29 KB |
| Peak/steam_settings/img/d370dcb90349afee0020fe3e3bb919f9f35c5092.jpg | 23 KB |
| Peak/steam_settings/img/d7fbe6dcb35a51e67be5f38023b99b7cc90e4dd1.jpg | 24 KB |
| Peak/steam_settings/img/d8e491ed5b6489b4b9c44cca9b0d8422267a8a53.jpg | 24 KB |
| Peak/steam_settings/img/da9184f21ff1dae46b4de56ffda9a9458c4bfa09.jpg | 28 KB |
| Peak/steam_settings/img/dc79e538e20135ca50ff1735e87bd87bcf62dd9e.jpg | 26 KB |
| Peak/steam_settings/img/de12d278a0764bf904a5f70bd0d5a0ce248c078d.jpg | 25 KB |
| Peak/steam_settings/img/e09d312cab58be2b5765a63772f77fe19f5d0c77.jpg | 22 KB |
| Peak/steam_settings/img/e15c55deafcdfd3e6cb185100384c75d0e44496c.jpg | 28 KB |
| Peak/steam_settings/img/e1e3550680fdce7c09093f29f2c9b205f737f4b4.jpg | 21 KB |
| Peak/steam_settings/img/e2c914d9a5584fa70875fca8f5a080569f6bcccc.jpg | 28 KB |
| Peak/steam_settings/img/e54c31508e016e0599a54dc344cd63a50cf04a00.jpg | 26 KB |
| Peak/steam_settings/img/e581cbc6f3483ff5ac80ee9cbfe2f541d9e4a3a6.jpg | 19 KB |
| Peak/steam_settings/img/e748ca99706ac0b09ae5328747b13e6a1d2d42bf.jpg | 25 KB |
| Peak/steam_settings/img/ec338a888bb02b501e139b3f5184a83c1589a0d5.jpg | 27 KB |
| Peak/steam_settings/img/ee86200b7333f439d40a1c15ca6551f5fa02e1bb.jpg | 17 KB |
| Peak/steam_settings/img/f0a1dda89831d0d613b9b73a8f32d96f417b54c0.jpg | 14 KB |
| Peak/steam_settings/img/f2b577c84bea7f45ccc79ca2ccb2adcc2b99e120.jpg | 23 KB |
| Peak/steam_settings/img/f3b16344af02078e58510412f68f07f5a3bef554.jpg | 15 KB |
| Peak/steam_settings/img/f8da9f53f5938be55aef11a9890b6713164471d6.jpg | 27 KB |
| Peak/steam_settings/img/fb4d1339a859ab618ea42781f692ed7464d7eae8.jpg | 27 KB |
| Peak/steam_settings/img/fea95e0fefe5fcd5517b88f29554aab4f2435e29.jpg | 15 KB |
| Peak/steam_settings/img/ffee535eef452f0542338d9208bbeb74d092928b.jpg | 13 KB |
| Peak/steam_settings/stats.json | 5.0 KB |
| Peak/steam_settings/steam_appid.txt | 7 B |
| Peak/steam_settings/supported_languages.txt | 137 B |
| Peak/winmm.dll | 3.4 MB |
handler.js
Plain textHub.Handler.Version = 9; // Released at https://hub.splitscreen.me/ on Wed Sep 02 2026 16:51:38 GMT+0000 (Coordinated Universal Time).
Hub.Handler.Id = "rLSxwziuvTcuF3GTp";
Hub.Maintainer.Name = "Talos91";
Hub.Maintainer.Id = "eeL7HAz8zJovChWw4";
var answers1 = ["DX11", "DX12" /*"Vulkan"*/];
Game.AddOption("Select Graphics API:", "Select the GAPI you want the game to use.", "GAPI", answers1);
Game.ExecutableContext = ["PEAK_Data"];
Game.DirExclusions = ["settings", "steam_settings"];
Game.DirSymlinkExclusions = ["PEAK_Data\\Plugins\\x86_64"];
Game.FileSymlinkExclusions = ["steam_api64.dll", "steam_appid.txt", "winmm.dll", "inputmessagetranslator.asi", "xinput1_3.dll", "xinput1_4.dll"];
Game.FileSymlinkCopyInstead = [
"D3D12Core.dll",
"UnityCrashHandler64.exe",
"UnityPlayer.dll",
"version.txt",
"unity default resources",
"unity_builtin_extra",
"UnityServicesProjectConfiguration.json",
"app.info",
"boot.config",
"globalgamemanagers",
"sharedassets0.assets",
"sharedassets0.assets.resS",
"sharedassets0.resource",
"sharedassets1.assets",
"sharedassets1.assets.resS",
"sharedassets1.resource",
"sharedassets2.assets",
"sharedassets2.assets.resS",
"sharedassets3.assets",
"sharedassets3.assets.resS",
"sharedassets3.resource",
"sharedassets4.assets",
"sharedassets4.assets.resS",
"sharedassets4.resource"
];
Game.GameName = "PEAK";
Game.HandlerInterval = 100;
Game.SymlinkExe = false;
Game.SymlinkGame = true;
Game.SymlinkFolders = false;
Game.ExecutableName = "PEAK.exe";
Game.SteamID = "3527290";
Game.CreateSteamAppIdByExe = true;
Game.GUID = "PEAK";
Game.MaxPlayers = 4;
Game.MaxPlayersOneMonitor = 4;
Game.UseNucleusEnvironment = true;
Game.Hook.ForceFocus = true;
Game.Hook.ForceFocusWindowName = "PEAK";
Game.HasDynamicWindowTitle = true;
Game.RefreshWindowAfterStart = true;
Game.ResetWindows = true;
Game.SetForegroundWindowElsewhere = true;
Game.Hook.DInputEnabled = false;
Game.Hook.XInputEnabled = false;
Game.Hook.XInputReroute = false;
Game.Hook.CustomDllEnabled = false;
Game.BlockRawInput = false;
Game.UserProfileSavePath = "AppData\\Roaming\\GSE Saves\\3527290";
//Game.UserProfileConfigPath = "AppData\\LocalLow\\LandCrab";
Game.UserProfileSavePathNoCopy = true;
Game.UserProfileConfigPathNoCopy = true;
Game.Description =
"IMPORTANT: Host a co-op game in one instance and use the invite kiosk to invite the other players, the other instances should join automatically after you interact with it. If you use keyboards and mice 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 and keyboard, you need to left click each mouse to make the emulated cursors appear after locking the input. Press the END key again to unlock the input when you finish playing.";
Game.PauseBetweenContextAndLaunch = 5;
Game.PauseBetweenProcessGrab = 2;
Game.PauseBetweenStarts = 30;
//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 = 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.ClipCursorHookCreatesFakeClip = false;
Game.ProtoInput.EnableToggleFakeCursorVisibilityShortcut = false;
Game.ProtoInput.DontShowCursorWhenImageUpdated = 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.MultipleProtoControllers = 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, 0x02a3, 0x02a1]; //Blocks WM_KILLFOCUS, WM_MOUSEHOVER and WM_MOUSELEAVE.
Game.Play = function() {
var gapi = Context.Options["GAPI"];
if (gapi == "DX12") {
Context.StartArguments = "-screen-fullscreen 0" + " -screen-width " + Context.Width + " -screen-height " + Context.Height;
}
if (gapi == "DX11") {
Context.StartArguments = "-screen-fullscreen 0 -force-d3d11" + " -screen-width " + Context.Width + " -screen-height " + Context.Height;
}
if (gapi == "Vulkan") {
Context.StartArguments = "-screen-fullscreen 0 -force-vulkan" + " -screen-width " + Context.Width + " -screen-height " + Context.Height;
}
//Context.EditRegKey("HKEY_CURRENT_USER", "SOFTWARE\\LandCrab\\PEAK", "FULLSCREEN_MODE_h3940033702", 1, Nucleus.RegType.DWord);
//Context.EditRegKey("HKEY_CURRENT_USER", "SOFTWARE\\LandCrab\\PEAK", "Screenmanager Fullscreen mode_h3630240806", 3, Nucleus.RegType.DWord);
//Context.EditRegKey("HKEY_CURRENT_USER", "SOFTWARE\\LandCrab\\PEAK", "Screenmanager Resolution Height_h2627697771", Context.Height, Nucleus.RegType.DWord);
//Context.EditRegKey("HKEY_CURRENT_USER", "SOFTWARE\\LandCrab\\PEAK", "Screenmanager Resolution Width_h182942802", Context.Width, Nucleus.RegType.DWord);
//Context.EditRegKey("HKEY_CURRENT_USER", "SOFTWARE\\LandCrab\\PEAK", "Screenmanager Window Position X_h4088080503", Context.PosX, Nucleus.RegType.DWord);
//Context.EditRegKey("HKEY_CURRENT_USER", "SOFTWARE\\LandCrab\\PEAK", "Screenmanager Window Position Y_h4088080502", Context.PosY, Nucleus.RegType.DWord);
var SW = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\PEAK_Data\\Plugins\\x86_64";
var filePath = SW + "\\steam_settings\\mods";
System.IO.Directory.CreateDirectory(filePath);
Context.CopyFolder(Context.ScriptFolder + "\\steam_settings", SW + "\\steam_settings");
var savePath = (Context.SavePath = SW + "\\steam_api64.dll");
var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "steam_api64.dll");
System.IO.File.Copy(savePkgOrigin, savePath, true);
var savePath = SW + "\\steam_settings\\configs.user.ini";
Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [
new Nucleus.IniSaveInfo("user::general", "account_name", Context.Nickname),
new Nucleus.IniSaveInfo("user::general", "account_steamid", Context.PlayerSteamID),
new Nucleus.IniSaveInfo("user::general", "language", Context.SteamLang)
]);
var dllPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\UnityPlayer.dll";
var searchPattern = "57 00 69 00 6E 00 64 00 6F 00 77 00 73 00 2E 00 47 00 61 00 6D 00 69 00 6E 00 67 00 2E 00 49 00 6E 00 70 00 75 00 74 00 2E 00 47 00 61 00 6D 00 65 00 70 00 61 00 64";
var patchPattern = "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00";
Context.PatchFileFindPattern(dllPath, dllPath, searchPattern, patchPattern, true);
var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\inputmessagetranslator.asi");
var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "inputmessagetranslator.asi");
System.IO.File.Copy(savePkgOrigin, savePath, true);
var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\winmm.dll");
var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "winmm.dll");
System.IO.File.Copy(savePkgOrigin, savePath, true);
var fillPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\PEAK_Data\\globalgamemanagers";
var base = Context.Nickname;
var og_Path = "PEAK";
//Create newPath by rearranging characters from base
var newPath = og_Path.substring(0, og_Path.length - 3) + base.charAt(0) + base.charAt(base.length - 1) + base.length;
//Ensure newPath is at least as long as og_Path
if (newPath.length < og_Path.length) {
while (newPath.length < og_Path.length) {
newPath += base.charAt(base.length - 1);
}
} else if (og_Path.length < newPath.length) {
//Ensure og_Path is at least 3 characters long
newPath = newPath.substring(0, og_Path.length);
}
Context.PatchFile(fillPath, fillPath, og_Path, newPath);
var appInfoPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\PEAK_Data\\app.info";
Context.PatchFile(appInfoPath, appInfoPath, og_Path, newPath);
Context.EditRegKeyNoBackup("HKEY_CURRENT_USER", "SOFTWARE\\LandCrab\\" + newPath, "FULLSCREEN_MODE_h3940033702", 1, Nucleus.RegType.DWord);
Context.EditRegKeyNoBackup("HKEY_CURRENT_USER", "SOFTWARE\\LandCrab\\" + newPath, "Screenmanager Fullscreen mode_h3630240806", 3, Nucleus.RegType.DWord);
Context.EditRegKeyNoBackup("HKEY_CURRENT_USER", "SOFTWARE\\LandCrab\\" + newPath, "Screenmanager Resolution Height_h2627697771", Context.Height, Nucleus.RegType.DWord);
Context.EditRegKeyNoBackup("HKEY_CURRENT_USER", "SOFTWARE\\LandCrab\\" + newPath, "Screenmanager Resolution Width_h182942802", Context.Width, Nucleus.RegType.DWord);
Context.EditRegKeyNoBackup("HKEY_CURRENT_USER", "SOFTWARE\\LandCrab\\" + newPath, "Screenmanager Window Position X_h4088080503", Context.PosX, Nucleus.RegType.DWord);
Context.EditRegKeyNoBackup("HKEY_CURRENT_USER", "SOFTWARE\\LandCrab\\" + newPath, "Screenmanager Window Position Y_h4088080502", Context.PosY, Nucleus.RegType.DWord);
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);
ProtoInput.StartFocusMessageLoop(player.ProtoInputInstanceHandle, 0, true, true, false, false, false);
System.Threading.Thread.Sleep(1000);
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.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);
}
};
};