Homefront · handler “Homefront”
Version 1 (current)
Release notes
release
- Released
- Size
- 8.5 KB
- Downloads
- 332
- Check
- Verified
- SHA-256
- f00ebb603739e8bb66eb1202e899d757d1de663877588d624507978beb3a7e5e
Files 2
| Path | Size |
|---|---|
| homefront/profile.bin | 5.5 KB |
| handler.js | 14 KB |
handler.js
Plain textHub.Handler.Version = 1; // Released at https://hub.splitscreen.me/ on Sun Dec 17 2023 22:33:40 GMT+0000 (Coordinated Universal Time).
Hub.Handler.Id = "sgfZjbeTYye5qtLkX";
Hub.Maintainer.Name = "birden";
Hub.Maintainer.Id = "rRycxSn253ZCjQy5C";
var answers1 = ["no", "yes"];
Game.AddOption("Unlock everything in the multiplayer? (max level all achievements)", "guns, vehicles etc ", "unlockall", answers1);
Game.KillMutex = ["FrontlinesGame_SingleInstanceMutex"];
Game.FileSymlinkCopyInstead = [
"vorbisfile.dll",
"vorbis.dll",
"PhysXExtensions.dll",
"NxCooking.dll",
"ogg.dll",
"FrontlinesGE.dll",
"DefaultEngine.ini",
"DefaultInput.ini",
"DefaultInput_deu.ini",
"DefaultInput_fra.ini",
"GlobalBanlist.ini",
"LocalBanlist.ini",
"BaseEngine.ini",
"BaseInput.ini",
"BaseInput_deu.ini",
"BaseInput_fra.ini"
];
Game.GameName = "Homefront";
Game.HandlerInterval = 100;
Game.SymlinkExe = false;
Game.SymlinkGame = true;
Game.SymlinkFolders = false;
Game.ExecutableName = "HOMEFRONT.exe";
Game.SteamID = "55100";
Game.GUID = "Homefront";
Game.MaxPlayers = 32;
Game.MaxPlayersOneMonitor = 32;
Game.BinariesFolder = "Binaries";
Game.SupportsPositioning = true;
Game.LauncherTitle = "";
Game.Hook.ForceFocus = true;
Game.Hook.ForceFocusWindowName = "HOMEFRONT";
Game.Hook.DInputEnabled = false;
Game.Hook.XInputEnabled = false;
Game.Hook.XInputReroute = false;
Game.XInputPlusDll = [];
Game.Hook.CustomDllEnabled = false;
Game.Description =
"IMPORTANT: when you start/join a game dont leave, you wont be able to start/join it again. So make sure to do what you want before starting/joining a game, you can change/edit some stuff(loadouts,bindings etc) between maps.\n\nSome parts of the menus only work with mouse.\n\nWith the first instance, Go into mutiplayer, create a lobby, set it to online and start the match. After doing so, accept the prompt and join in the server and do the same to all the next ones.\n\nAfter 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. You can also use CTRL+Q to close Nucleus and all its instances when the input is unlocked. Add custom resolutions in your AMD/Nvidia/Intel panel (For example for a 1920x1080 monitor add: 960x1080, 960x540, 1920x540 etc.) so the game can see them and use them.";
Game.PauseBetweenProcessGrab = 5;
Game.PauseBetweenStarts = 10;
Game.HideTaskbar = true;
Game.UseGoldberg = true;
Game.GoldbergExperimentalSteamClient = true;
Game.GoldbergNoLocalSave = true;
Game.SetWindowHookStart = true;
Game.ResetWindows = true;
Game.PromptAfterFirstInstance = true;
Game.UseNucleusEnvironment = true;
Game.UserProfileSavePath = "AppData\\Roaming\\Goldberg SteamEmu Saves\\55100";
Game.UserProfileConfigPath = "Documents\\My Games\\HOMEFRONT\\GCGame\\Config";
//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 = true;
Game.LockInputToggleKey = 0x23;
Game.ProtoInput.RenameHandlesHook = false;
Game.ProtoInput.RenameHandles = [];
Game.ProtoInput.RenameNamedPipes = [];
Game.ProtoInput.RegisterRawInputHook = false;
Game.ProtoInput.GetRawInputDataHook = false;
Game.ProtoInput.MessageFilterHook = false;
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 = true;
Game.ProtoInput.DrawFakeCursor = false;
Game.ProtoInput.ClipCursorHookCreatesFakeClip = true;
Game.ProtoInput.SetWindowPosHook = true;
Game.ProtoInput.SetWindowStyleHook = 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 = true;
Game.ProtoInput.FocusLoopIntervalMilliseconds = 10000;
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
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);
//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);
}
};
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.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);
}
};
Game.Play = function() {
var savePath = Context.EnvironmentPlayer + Context.UserProfileConfigPath + "\\GCEngine.ini";
Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [
new Nucleus.IniSaveInfo("SystemSettings", "Fullscreen", 0),
new Nucleus.IniSaveInfo("SystemSettings", "ResX", Context.Width),
new Nucleus.IniSaveInfo("SystemSettings", "ResY", Context.Height),
new Nucleus.IniSaveInfo("SystemSettings", "ScreenAspectRatio", Context.AspectRatioDecimal)
]);
var UNLOCKALL = Context.Options["unlockall"];
if (UNLOCKALL == "yes") {
if (!System.IO.Directory.Exists(Context.EnvironmentRoot + Context.Nickname + "\\AppData\\Roaming\\Goldberg SteamEmu Saves\\55100\\remote")) {
System.IO.Directory.CreateDirectory(Context.EnvironmentRoot + Context.Nickname + "\\AppData\\Roaming\\Goldberg SteamEmu Saves");
System.IO.Directory.CreateDirectory(Context.EnvironmentRoot + Context.Nickname + "\\AppData\\Roaming\\Goldberg SteamEmu Saves\\55100");
System.IO.Directory.CreateDirectory(Context.EnvironmentRoot + Context.Nickname + "\\AppData\\Roaming\\Goldberg SteamEmu Saves\\55100\\remote");
}
var savePath = Context.EnvironmentRoot + Context.Nickname + "\\AppData\\Roaming\\Goldberg SteamEmu Saves\\55100\\remote\\profile.bin";
var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "profile.bin");
System.IO.File.Copy(savePkgOrigin, savePath, true);
}
if (Player.IsKeyboardPlayer) {
Context.StartArguments = "-windowed -AlwaysFocus -nosplash -nomoviestartup -nostartupmovies -NoController -resx=" + Context.Width + " -resy= " + Context.Height;
Context.Hook.ForceFocus = "False";
} else {
Context.StartArguments = "-windowed -AlwaysFocus -nosplash -nomoviestartup -nostartupmovies -nomouse -resx= " + Context.Width + " -resy= " + Context.Height;
}
if (!System.IO.Directory.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\binaries\\steam_settings")) {
var filePath = (Context.filePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\binaries\\steam_settings");
System.IO.Directory.CreateDirectory(filePath);
}
var timese = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\binaries\\disable_lan_only.txt";
var lines = [];
Context.WriteTextFile(timese, lines);
var autoExec = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\binaries\\steam_settings\\DLC.txt";
var lines = [
"55208=Homefront - Steam Exclusive",
"55207=Homefront - Camo Skin Pack",
"55206=Homefront - Multiplayer Advance Unlock Pack",
"55205=Homefront - Exclusive Multiplayer Shotgun DLC",
"55204=Homefront - The Rock Map Pack",
"55203=Homefront Fire Sale Map Pack DLC"
];
Context.WriteTextFile(autoExec, lines);
var autoExec = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\binaries\\steam_interfaces.txt";
var lines = [
"SteamClient015",
"SteamGameServer012",
"SteamGameServerStats001",
"SteamUser017",
"SteamFriends014",
"SteamUtils007",
"SteamMatchMaking009",
"SteamMatchMakingServers002",
"STEAMUSERSTATS_INTERFACE_VERSION011",
"STEAMAPPS_INTERFACE_VERSION006",
"SteamNetworking005",
"STEAMREMOTESTORAGE_INTERFACE_VERSION012",
"STEAMSCREENSHOTS_INTERFACE_VERSION002",
"STEAMHTTP_INTERFACE_VERSION002",
"STEAMUNIFIEDMESSAGES_INTERFACE_VERSION001",
"STEAMUGC_INTERFACE_VERSION002",
"STEAMAPPLIST_INTERFACE_VERSION001",
"STEAMMUSIC_INTERFACE_VERSION001",
"STEAMMUSICREMOTE_INTERFACE_VERSION001",
"STEAMCONTROLLER_INTERFACE_VERSION"
];
Context.WriteTextFile(autoExec, lines);
var numPlayers = 0;
for (var i = 0; i < PlayerList.Count; i++) {
var player = PlayerList[i];
if (player.IsXInput && player.ScreenIndex !== -1) {
numPlayers++;
}
player.ProtoController1 = Context.GamepadId;
player.ProtoController2 = Context.GamepadId;
player.ProtoController3 = Context.GamepadId;
player.ProtoController4 = Context.GamepadId;
player.ProtoController5 = Context.GamepadId;
player.ProtoController6 = Context.GamepadId;
player.ProtoController7 = Context.GamepadId;
player.ProtoController8 = Context.GamepadId;
player.ProtoController9 = Context.GamepadId;
}
};