Borderlands: The Pre-Sequel · handler “Borderlands The Pre-Sequel”
Version 6
Release notes
fixes and UI options.
- Released
- Size
- 2.2 KB
- Downloads
- 60
- Check
- Verified
- SHA-256
- 5cccbf090e6f49165d36c8994500fc79aba953a14418787e1f31cd19a5bd8592
Files 1
| Path | Size |
|---|---|
| handler.js | 6.7 KB |
handler.js
Plain textHub.Handler.Version = 6; // Released at https://hub.splitscreen.me/ on Sat Nov 21 2020 02:24:15 GMT+0000 (UTC).
Hub.Handler.Id = "3gM5bRsyfDwExB4Yu";
Hub.Maintainer.Name = "Talos91";
Hub.Maintainer.Id = "eeL7HAz8zJovChWw4";
var answers1 = ["Disabled", "Enable"];
var answers2 = ["Default", "Enable", "Disable"];
Game.AddOption("Keyboard instance fix", "Only use if you're using one kb/m and the kb instance isn't working correctly.", "FIX", answers1);
Game.AddOption("Enable multiple keyboards and mice support?", "Launch then close Nucleus and open it again for the mkb support to enable.", "MKB", answers2);
Game.DirSymlinkExclusions = ["binaries\\win32"];
Game.FileSymlinkExclusions = ["steam_api.dll", "steam_appid.txt", "steam_interfaces.txt", "d3d9.dll"];
Game.GameName = "Borderlands The Pre-Sequel";
Game.HandlerInterval = 100;
Game.SymlinkExe = false;
Game.SymlinkGame = true;
Game.SymlinkFolders = true;
Game.SupportsKeyboard = true;
Game.ExecutableName = "borderlandspresequel.exe";
Game.SteamID = "261640";
Game.GUID = "Borderlands The Pre-Sequel";
Game.MaxPlayers = 4;
Game.MaxPlayersOneMonitor = 4;
Game.BinariesFolder = "binaries\\win32";
Game.NeedsSteamEmulation = false;
Game.UseGoldberg = true;
Game.LauncherTitle = "splashscreen";
Game.Hook.ForceFocus = true;
Game.Hook.ForceFocusWindowName = "Borderlands: The Pre-Sequel (32-bit, DX9)";
Game.UseDirectX9Wrapper = true;
Game.Hook.DInputEnabled = false;
Game.Hook.XInputEnabled = true;
Game.Hook.XInputReroute = false;
Game.XInputPlusDll = ["xinput1_3.dll"];
Game.Hook.CustomDllEnabled = false;
Game.FakeFocus = false;
Game.HookFocus = true;
Game.SetWindowHookStart = false;
Game.ResetWindows = false;
Game.UserProfileSavePath = "Documents\\My Games\\Borderlands The Pre-Sequel\\WillowGame\\SaveData";
Game.UserProfileConfigPath = "Documents\\My Games\\Borderlands The Pre-Sequel\\WillowGame\\Config";
Game.Description =
"Go to network options, network mode and select LAN in each instance, then use the find games option to join the other players. If you launch an instance with the keyboard icon the last instance that opens will always be the keyboard player. If you enable multikeyboard/mice support in the UI options press the END key in your keyboard to unlock the input when you finish playing. You can also use CTRL+Q to close Nucleus and all its instances.";
Game.PauseBetweenStarts = 35;
Game.SupportsMultipleKeyboardsAndMice = false;
Game.HookSetCursorPos = true;
Game.HookGetCursorPos = true;
Game.HookGetKeyState = false;
Game.HookGetAsyncKeyState = false;
Game.HookGetKeyboardState = false;
Game.HookFilterRawInput = true;
Game.HookFilterMouseMessages = false;
Game.HookUseLegacyInput = false;
Game.HookDontUpdateLegacyInMouseMsg = false;
Game.HookMouseVisibility = true;
Game.SendNormalMouseInput = true;
Game.SendNormalKeyboardInput = true;
Game.SendScrollWheel = false;
Game.ForwardRawKeyboardInput = false;
Game.ForwardRawMouseInput = false;
Game.HookReRegisterRawInput = false;
Game.HookReRegisterRawInputMouse = false;
Game.HookReRegisterRawInputKeyboard = false;
Game.DrawFakeMouseCursor = true;
Game.LockInputAtStart = true;
Game.LockInputToggleKey = 0x23;
Game.Play = function() {
var savePath = Context.GetFolder(Nucleus.Folder.Documents) + "\\My Games\\Borderlands The Pre-Sequel\\WillowGame\\Config\\WillowEngine.ini";
Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [
new Nucleus.IniSaveInfo("SystemSettings", "WindowedFullscreen", Context.IsFullscreen),
new Nucleus.IniSaveInfo("SystemSettings", "Fullscreen", true),
new Nucleus.IniSaveInfo("Engine.Engine", "bPauseOnLossOfFocus", false),
new Nucleus.IniSaveInfo("WillowGame.WillowGameEngine", "bPauseLostFocusWindowed", false),
new Nucleus.IniSaveInfo("Engine.Engine", "bMuteAudioWhenNotInFocus", false),
new Nucleus.IniSaveInfo("Engine.Engine", "bPauseOnLossOfFocus", false),
new Nucleus.IniSaveInfo("WillowGame.WillowGameEngine", "bMuteAudioWhenNotInFocus", false)
]);
if (Context.IsKeyboardPlayer) {
Context.StartArguments = "-AlwaysFocus -nosplash -NoController" + " -ResX= " + Context.Width + " -ResY= " + Context.Height;
Context.Hook.BlockMouseEvents = "False";
Context.Hook.BlockKeyboardEvents = "False";
Context.Hook.BlockInputEvents = "False";
Context.Hook.ForceFocus = "False";
} else {
Context.StartArguments = "-AlwaysFocus -nosplash -nomouse" + " -ResX= " + Context.Width + " -ResY= " + Context.Height;
Context.Hook.BlockMouseEvents = "True";
Context.Hook.BlockKeyboardEvents = "True";
Context.Hook.BlockInputEvents = "True";
Context.Hook.ForceFocus = "True";
}
var interfaces = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\binaries\\win32\\steam_interfaces.txt";
var lines = [
"SteamClient012",
"SteamGameServer011",
"SteamGameServerStats001",
"SteamUser016",
"SteamFriends013",
"SteamUtils005",
"SteamMatchMaking009",
"SteamMatchMakingServers002",
"STEAMUSERSTATS_INTERFACE_VERSION011",
"STEAMAPPS_INTERFACE_VERSION005",
"SteamNetworking005",
"STEAMREMOTESTORAGE_INTERFACE_VERSION008",
"STEAMSCREENSHOTS_INTERFACE_VERSION001",
"STEAMHTTP_INTERFACE_VERSION001"
];
Context.WriteTextFile(interfaces, lines);
var fix = Context.Options["FIX"];
var mkb = Context.Options["MKB"];
if (fix == "Disabled") {
}
if (fix == "Enable") {
Game.Hook.CustomDllEnabled = true;
Game.Hook.UseAlpha8CustomDll = true;
Game.HookFocus = false;
}
if (mkb == "Default") {
}
if (mkb == "Enable") {
var NucleusRoot = System.IO.Path.Combine(Game.Folder, "..", "..");
var cfgFilePath = NucleusRoot + "\\scripts\\Borderlands The Pre-Sequel.js";
var multiple = Context.FindLineNumberInTextFile(cfgFilePath, "Game.SupportsMultipleKeyboardsAndMice", Nucleus.SearchType.StartsWith);
var keyboard = Context.FindLineNumberInTextFile(cfgFilePath, "Game.SupportsKeyboard", Nucleus.SearchType.StartsWith);
Context.ReplaceLinesInTextFile(cfgFilePath, [multiple + "|Game.SupportsMultipleKeyboardsAndMice = true; ", keyboard + "|Game.SupportsKeyboard = false; "]);
}
if (mkb == "Disable") {
var NucleusRoot = System.IO.Path.Combine(Game.Folder, "..", "..");
var cfgFilePath = NucleusRoot + "\\scripts\\Borderlands The Pre-Sequel.js";
var multiple = Context.FindLineNumberInTextFile(cfgFilePath, "Game.SupportsMultipleKeyboardsAndMice", Nucleus.SearchType.StartsWith);
var keyboard = Context.FindLineNumberInTextFile(cfgFilePath, "Game.SupportsKeyboard", Nucleus.SearchType.StartsWith);
Context.ReplaceLinesInTextFile(cfgFilePath, [multiple + "|Game.SupportsMultipleKeyboardsAndMice = false; ", keyboard + "|Game.SupportsKeyboard = true; "]);
}
};