A Hat in Time · handler “A Hat in Time”
Version 3
Release notes
ProtoInput update
- Released
- Size
- 2.6 KB
- Downloads
- 429
- Check
- Verified
- SHA-256
- 75daa611e731606c03e0b40f350d051f93746e30baab5d300f91b05332d45496
Files 1
| Path | Size |
|---|---|
| handler.js | 8.5 KB |
handler.js
Plain textHub.Handler.Version = 3; // Released at https://hub.splitscreen.me/ on Sat Jan 29 2022 06:20:19 GMT+0000 (Coordinated Universal Time).
Hub.Handler.Id = "srBcT7kc54AWvKo2p";
Hub.Maintainer.Name = "Talos91";
Hub.Maintainer.Id = "eeL7HAz8zJovChWw4";
var answers1 = ["Yes", "No"];
Game.AddOption("Will you use the game's native splitscreen?", "If yes only launch two horizontal instances, you need 3 or 4 gamepads.", "Native", answers1);
Game.ExecutableContext = ["libvorbis_64.dll"];
Game.DirSymlinkExclusions = ["Binaries\\Win64", "Binaries\\Win32", "HatinTimeGame\\Config"];
Game.FileSymlinkExclusions = ["steam_api64.dll", "steam_api.dll", "steam_appid.txt", "dinput8.dll", "xinput1_3.dll"];
Game.FileSymlinkCopyInstead = ["HatinTimeEngine.ini", "HatinTimeGame.ini", "HatinTimeInput.ini", "HatinTimeOnline.ini", "HatinTimeSystemSettings.ini", "HatinTimeUI.ini"];
Game.GameName = "A Hat in Time";
Game.HandlerInterval = 100;
Game.SymlinkExe = false;
Game.SymlinkGame = true;
Game.SymlinkFolders = true;
Game.ExecutableName = "HatinTimeGame.exe";
Game.SteamID = "253230";
Game.GUID = "A Hat in Time";
Game.MaxPlayers = 16;
Game.MaxPlayersOneMonitor = 16;
Game.BinariesFolder = "Binaries\\Win64";
Game.NeedsSteamEmulation = false;
Game.UseGoldberg = true;
Game.LauncherTitle = "";
Game.Hook.ForceFocus = false;
Game.Hook.ForceFocusWindowName = "A Hat in Time";
Game.ResetWindows = true;
Game.Hook.DInputEnabled = false;
Game.UseDInputBlocker = true;
Game.Hook.XInputEnabled = true;
Game.Hook.XInputReroute = false;
Game.XInputPlusDll = ["xinput1_3.dll"];
Game.Hook.CustomDllEnabled = false;
Game.Description =
"If you select yes to use the game's native splitscreen in the Player Options UI you can play with 3 or 4 players in only two instances of the game for better performance, the first two gamepads will control the first instance and the other two gamepads the second, press start in-game to add a local player in each instance, if you want to have only one player per instance select No in the UI option. Use a different save slot per instance. To connect the instances enable online mode in the game and write the same lobby name in all. When an instance opens press a button in your respective gamepad and get past the title screen.";
Game.KeepSymLinkOnExit = true;
Game.PauseBetweenProcessGrab = 12;
Game.PauseBetweenStarts = 40;
//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.SetWindowPosHook = true;
Game.ProtoInput.SetWindowStyleHook = false;
Game.ProtoInput.RawInputFilter = true;
Game.ProtoInput.MouseMoveFilter = false;
Game.ProtoInput.MouseActivateFilter = true;
Game.ProtoInput.WindowActivateFilter = true;
Game.ProtoInput.WindowActvateAppFilter = true;
Game.ProtoInput.MouseWheelFilter = true;
Game.ProtoInput.MouseButtonFilter = true;
Game.ProtoInput.KeyboardButtonFilter = true;
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 Args = (Context.Args = "-windowed -AlwaysFocus -nosplash -skipintro " + " -ResX= " + Context.Width + " -ResY= " + Context.Height);
Context.StartArguments = Args;
var videoconfig = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\HatinTimeGame\\Config\\HatinTimeSystemSettings.ini");
Context.ModifySaveFile(videoconfig, videoconfig, Nucleus.SaveType.INI, [
new Nucleus.IniSaveInfo("SystemSettings", "ResX", Context.Width),
new Nucleus.IniSaveInfo("SystemSettings", "ResY", Context.Height),
new Nucleus.IniSaveInfo("SystemSettings", "Fullscreen", "False"),
new Nucleus.IniSaveInfo("SystemSettings", "Borderless", "False")
]);
var filePath = (Context.filePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Binaries\\Win64\\steam_settings\\mods");
System.IO.Directory.CreateDirectory(filePath);
var interfaces = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Binaries\\Win64\\steam_interfaces.txt";
var lines = [
"SteamClient017",
"SteamClient020",
"SteamGameServer014",
"SteamGameServerStats001",
"SteamUser021",
"SteamFriends017",
"SteamUtils010",
"SteamMatchMaking009",
"SteamMatchMakingServers002",
"STEAMUSERSTATS_INTERFACE_VERSION012",
"STEAMAPPS_INTERFACE_VERSION008",
"SteamNetworking006",
"STEAMREMOTESTORAGE_INTERFACE_VERSION016",
"STEAMSCREENSHOTS_INTERFACE_VERSION003",
"STEAMHTTP_INTERFACE_VERSION003",
"STEAMUGC_INTERFACE_VERSION015",
"STEAMAPPLIST_INTERFACE_VERSION001",
"STEAMMUSIC_INTERFACE_VERSION001",
"STEAMMUSICREMOTE_INTERFACE_VERSION001",
"STEAMHTMLSURFACE_INTERFACE_VERSION_005",
"STEAMINVENTORY_INTERFACE_V003",
"SteamController008",
"STEAMVIDEO_INTERFACE_V002"
];
Context.WriteTextFile(interfaces, lines);
if (Context.NumControllers < 5) {
Game.Hook.XInputReroute = false;
} else {
Game.Hook.CustomDllEnabled = true;
}
var native = Context.Options["Native"];
if (native == "Yes") {
if (Context.PlayerID == 0) {
var savePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Binaries\\Win64\\XinputPlus.ini";
Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [
new Nucleus.IniSaveInfo("ControllerNumber", "Controller1", "1"),
new Nucleus.IniSaveInfo("ControllerNumber", "Controller2", "2"),
new Nucleus.IniSaveInfo("ControllerNumber", "Controller3", "0"),
new Nucleus.IniSaveInfo("ControllerNumber", "Controller4", "0")
]);
}
if (Context.PlayerID == 1) {
var savePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Binaries\\Win64\\XinputPlus.ini";
Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [
new Nucleus.IniSaveInfo("ControllerNumber", "Controller1", "3"),
new Nucleus.IniSaveInfo("ControllerNumber", "Controller2", "4"),
new Nucleus.IniSaveInfo("ControllerNumber", "Controller3", "0"),
new Nucleus.IniSaveInfo("ControllerNumber", "Controller4", "0")
]);
}
}
if (native == "No") {
}
};