Killing Floor · handler “Killing Floor 1”
Version 3
Release notes
No external files needes anymore, settings and mappings save, added Ui option for mkb support.
- Released
- Size
- 2.7 KB
- Downloads
- 82
- Check
- Verified
- SHA-256
- f7514c6f5efcca693e91e2f12f9d7690c483e8de266b0835689bbb01212f7033
Files 1
| Path | Size |
|---|---|
| handler.js | 14 KB |
handler.js
Plain textHub.Handler.Version = 3; // Released at https://hub.splitscreen.me/ on Fri Nov 27 2020 10:52:34 GMT+0000 (UTC).
Hub.Handler.Id = "SMSvixRZPyqpudqdr";
Hub.Maintainer.Name = "Talos91";
Hub.Maintainer.Id = "eeL7HAz8zJovChWw4";
var answers1 = ["Default", "Enable", "Disable"];
Game.AddOption("Enable multiple keyboards and mice support?", "Launch then close Nucleus and open it again for the mkb support to enable.", "MKB", answers1);
Game.DirSymlinkExclusions = ["System"];
Game.FileSymlinkExclusions = ["steam_api.dll", "steam_interfaces.txt", "steam_appid.txt", "User.ini", "KillingFloor.ini"];
Game.NeedsSteamEmulation = false;
Game.UseGoldberg = true;
Game.GoldbergIgnoreSteamAppId = true;
Game.HandlerInterval = 100;
Game.SymlinkExe = false;
Game.SymlinkGame = true;
Game.ExecutableName = "KillingFloor.exe";
Game.ChangeExe = true;
Game.SteamID = "1250";
Game.GUID = "Killing Floor";
Game.GameName = "Killing Floor";
Game.MaxPlayers = 6;
Game.MaxPlayersOneMonitor = 6;
Game.BinariesFolder = "System";
Game.LauncherTitle = "";
Game.HideTaskbar = false;
Game.StartArguments = "-windowed -AlwaysFocus -nosplash -nostartupmovies";
Game.Hook.ForceFocus = true;
Game.Hook.ForceFocusWindowName = "Killing Floor";
Game.HasDynamicWindowTitle = true;
Game.Hook.DInputEnabled = false;
Game.Hook.DInputForceDisable = true;
Game.Hook.XInputEnabled = true;
Game.Hook.XInputReroute = false;
Game.Hook.CustomDllEnabled = false;
Game.XInputPlusDll = ["xinput1_3.dll", "Dinput.dll", "Dinput8.dll"];
Game.HookFocus = true;
Game.ResetWindows = true;
Game.RefreshWindowAfterStart = true;
Game.KeepSymLinkOnExit = true;
Game.ForceSymlink = true;
Game.PromptBetweenInstances = true;
Game.PauseBetweenStarts = 30;
Game.Description =
"So the instances launch and resize correctly make sure to run your main game at least one time before running this. Wait until the first instance starts to open the second one, after you click to open the second instance the first will resize and position correctly. Use the mouse cursor to navigate all instances and map your gamepad in each instance in settings/controls, gamepads are usable until you start a game. Create a LAN listen server in one instance and the others can join clicking in multiplayer-LAN tab. Press the back/select button on your gamepad just once if your character stops after firing. Exit the game via the in-game menus for your mappings to save. If you want to play with multiple keyboards/mice select enable in the Nucleus UI option that appears after clicking >, note that doing this will only let you play with keyboards and mice, not gamepads. If you use keyboards and mice after all the instances open press the END key to lock the input for all instances to have their own cursor. Press the END key again to unlock the input. You can also use CTRL+Q to close Nucleus and all its instances.";
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 = false;
Game.SendNormalMouseInput = true;
Game.SendNormalKeyboardInput = true;
Game.SendScrollWheel = true;
Game.ForwardRawKeyboardInput = false;
Game.ForwardRawMouseInput = false;
Game.HookReRegisterRawInput = true;
Game.HookReRegisterRawInputMouse = true;
Game.HookReRegisterRawInputKeyboard = false;
Game.DrawFakeMouseCursor = true;
Game.LockInputAtStart = false;
Game.LockInputToggleKey = 0x23;
Game.Play = function() {
var interfaces = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\System\\steam_interfaces.txt";
var lines = [
"SteamClient012",
"SteamGameServer011",
"SteamGameServerStats001",
"SteamUser017",
"SteamFriends013",
"SteamUtils006",
"SteamMatchMaking009",
"SteamMatchMakingServers002",
"STEAMUSERSTATS_INTERFACE_VERSION011",
"STEAMAPPS_INTERFACE_VERSION005",
"SteamNetworking005",
"STEAMREMOTESTORAGE_INTERFACE_VERSION011",
"STEAMSCREENSHOTS_INTERFACE_VERSION002",
"STEAMHTTP_INTERFACE_VERSION002",
"STEAMUNIFIEDMESSAGES_INTERFACE_VERSION001"
];
Context.WriteTextFile(interfaces, lines);
var filePath = (Context.filePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\System\\steam_settings");
System.IO.Directory.CreateDirectory(filePath);
var appid = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\System\\steam_settings\\steam_appid.txt";
var lines = ["1250"];
Context.WriteTextFile(appid, lines);
var savePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\System\\XInputPlus.ini";
Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [
new Nucleus.IniSaveInfo("Hold", "Buttons", "BACK"),
new Nucleus.IniSaveInfo("Hold", "ToggleONOFF", true),
new Nucleus.IniSaveInfo("X2DInput", "EnableX2Dinput", true),
new Nucleus.IniSaveInfo("X2DInput", "RS_X", "Z_Axis"),
new Nucleus.IniSaveInfo("X2DInput", "RS_Y", "Z_Rot"),
new Nucleus.IniSaveInfo("X2DInput", "LT", "Button11"),
new Nucleus.IniSaveInfo("X2DInput", "RT", "Button12")
]);
if (Context.PlayerID == 0) {
if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\System\\KillingFloor - Player 1.ini")) {
System.IO.File.Copy(System.IO.Path.Combine(Context.RootInstallFolder, "KillingFloor.ini"), System.IO.Path.Combine(Context.RootFolder, "System\\KillingFloor - Player 1.ini"), true);
System.IO.File.Copy(System.IO.Path.Combine(Context.RootInstallFolder, "User.ini"), System.IO.Path.Combine(Context.RootFolder, "System\\User.ini"), true);
} else {
}
var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\System\\KillingFloor - Player 1.ini");
Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [
new Nucleus.IniSaveInfo("WinDrv.WindowsClient", "WindowedViewportX", Context.Width),
new Nucleus.IniSaveInfo("WinDrv.WindowsClient", "WindowedViewportY", Context.Height),
new Nucleus.IniSaveInfo("WinDrv.WindowsClient", "UseJoystick", true),
new Nucleus.IniSaveInfo("WinDrv.WindowsClient", "CaptureMouse", false),
new Nucleus.IniSaveInfo("WinDrv.WindowsClient", "StartupFullscreen", false)
]);
}
if (Context.PlayerID == 1) {
if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\System\\KillingFloor - Player 2.ini")) {
System.IO.File.Copy(System.IO.Path.Combine(Context.RootInstallFolder, "KillingFloor.ini"), System.IO.Path.Combine(Context.RootFolder, "System\\KillingFloor - Player 2.ini"), true);
System.IO.File.Copy(System.IO.Path.Combine(Context.RootInstallFolder, "User.ini"), System.IO.Path.Combine(Context.RootFolder, "System\\User.ini"), true);
} else {
}
var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\System\\KillingFloor - Player 2.ini");
Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [
new Nucleus.IniSaveInfo("WinDrv.WindowsClient", "WindowedViewportX", Context.Width),
new Nucleus.IniSaveInfo("WinDrv.WindowsClient", "WindowedViewportY", Context.Height),
new Nucleus.IniSaveInfo("WinDrv.WindowsClient", "UseJoystick", true),
new Nucleus.IniSaveInfo("WinDrv.WindowsClient", "CaptureMouse", false),
new Nucleus.IniSaveInfo("WinDrv.WindowsClient", "StartupFullscreen", false)
]);
}
if (Context.PlayerID == 2) {
if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\System\\KillingFloor - Player 3.ini")) {
System.IO.File.Copy(System.IO.Path.Combine(Context.RootInstallFolder, "KillingFloor.ini"), System.IO.Path.Combine(Context.RootFolder, "System\\KillingFloor - Player 3.ini"), true);
System.IO.File.Copy(System.IO.Path.Combine(Context.RootInstallFolder, "User.ini"), System.IO.Path.Combine(Context.RootFolder, "System\\User.ini"), true);
} else {
}
var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\System\\KillingFloor - Player 3.ini");
Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [
new Nucleus.IniSaveInfo("WinDrv.WindowsClient", "WindowedViewportX", Context.Width),
new Nucleus.IniSaveInfo("WinDrv.WindowsClient", "WindowedViewportY", Context.Height),
new Nucleus.IniSaveInfo("WinDrv.WindowsClient", "UseJoystick", true),
new Nucleus.IniSaveInfo("WinDrv.WindowsClient", "CaptureMouse", false),
new Nucleus.IniSaveInfo("WinDrv.WindowsClient", "StartupFullscreen", false)
]);
}
if (Context.PlayerID == 3) {
if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\System\\KillingFloor - Player 4.ini")) {
System.IO.File.Copy(System.IO.Path.Combine(Context.RootInstallFolder, "KillingFloor.ini"), System.IO.Path.Combine(Context.RootFolder, "System\\KillingFloor - Player 4.ini"), true);
System.IO.File.Copy(System.IO.Path.Combine(Context.RootInstallFolder, "User.ini"), System.IO.Path.Combine(Context.RootFolder, "System\\User.ini"), true);
} else {
}
var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\System\\KillingFloor - Player 4.ini");
Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [
new Nucleus.IniSaveInfo("WinDrv.WindowsClient", "WindowedViewportX", Context.Width),
new Nucleus.IniSaveInfo("WinDrv.WindowsClient", "WindowedViewportY", Context.Height),
new Nucleus.IniSaveInfo("WinDrv.WindowsClient", "UseJoystick", true),
new Nucleus.IniSaveInfo("WinDrv.WindowsClient", "CaptureMouse", false),
new Nucleus.IniSaveInfo("WinDrv.WindowsClient", "StartupFullscreen", false)
]);
}
if (Context.PlayerID == 4) {
if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\System\\KillingFloor - Player 5.ini")) {
System.IO.File.Copy(System.IO.Path.Combine(Context.RootInstallFolder, "KillingFloor.ini"), System.IO.Path.Combine(Context.RootFolder, "System\\KillingFloor - Player 5.ini"), true);
System.IO.File.Copy(System.IO.Path.Combine(Context.RootInstallFolder, "User.ini"), System.IO.Path.Combine(Context.RootFolder, "System\\User.ini"), true);
} else {
}
var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\System\\KillingFloor - Player 5.ini");
Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [
new Nucleus.IniSaveInfo("WinDrv.WindowsClient", "WindowedViewportX", Context.Width),
new Nucleus.IniSaveInfo("WinDrv.WindowsClient", "WindowedViewportY", Context.Height),
new Nucleus.IniSaveInfo("WinDrv.WindowsClient", "UseJoystick", true),
new Nucleus.IniSaveInfo("WinDrv.WindowsClient", "CaptureMouse", false),
new Nucleus.IniSaveInfo("WinDrv.WindowsClient", "StartupFullscreen", false)
]);
}
if (Context.PlayerID == 5) {
if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\System\\KillingFloor - Player 6.ini")) {
System.IO.File.Copy(System.IO.Path.Combine(Context.RootInstallFolder, "KillingFloor.ini"), System.IO.Path.Combine(Context.RootFolder, "System\\KillingFloor - Player 6.ini"), true);
System.IO.File.Copy(System.IO.Path.Combine(Context.RootInstallFolder, "User.ini"), System.IO.Path.Combine(Context.RootFolder, "System\\User.ini"), true);
} else {
}
var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\System\\KillingFloor - Player 6.ini");
Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [
new Nucleus.IniSaveInfo("WinDrv.WindowsClient", "WindowedViewportX", Context.Width),
new Nucleus.IniSaveInfo("WinDrv.WindowsClient", "WindowedViewportY", Context.Height),
new Nucleus.IniSaveInfo("WinDrv.WindowsClient", "UseJoystick", true),
new Nucleus.IniSaveInfo("WinDrv.WindowsClient", "CaptureMouse", false),
new Nucleus.IniSaveInfo("WinDrv.WindowsClient", "StartupFullscreen", false)
]);
}
var savePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\System\\User.ini";
Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [
new Nucleus.IniSaveInfo("Engine.Input", "JoyZ", "Axis aTurn SpeedBase=70.0"),
new Nucleus.IniSaveInfo("Engine.Input", "JoyV", "Axis aLookUp SpeedBase=70.0 DeadZone=0.1 Invert=-1"),
new Nucleus.IniSaveInfo("Engine.Input", "JoySlider1", "0")
]);
var mkb = Context.Options["MKB"];
if (mkb == "Default") {
}
if (mkb == "Enable") {
var NucleusRoot = System.IO.Path.Combine(Game.Folder, "..", "..");
var cfgFilePath = NucleusRoot + "\\scripts\\Killing Floor.js";
var multiple = Context.FindLineNumberInTextFile(cfgFilePath, "Game.SupportsMultipleKeyboardsAndMice", Nucleus.SearchType.StartsWith);
var gamepads = Context.FindLineNumberInTextFile(cfgFilePath, "Game.Hook.XInputEnabled", Nucleus.SearchType.StartsWith);
Context.ReplaceLinesInTextFile(cfgFilePath, [multiple + "|Game.SupportsMultipleKeyboardsAndMice = true; ", gamepads + "|Game.Hook.XInputEnabled = false; "]);
}
if (mkb == "Disable") {
var NucleusRoot = System.IO.Path.Combine(Game.Folder, "..", "..");
var cfgFilePath = NucleusRoot + "\\scripts\\Killing Floor.js";
var multiple = Context.FindLineNumberInTextFile(cfgFilePath, "Game.SupportsMultipleKeyboardsAndMice", Nucleus.SearchType.StartsWith);
var gamepads = Context.FindLineNumberInTextFile(cfgFilePath, "Game.Hook.XInputEnabled", Nucleus.SearchType.StartsWith);
Context.ReplaceLinesInTextFile(cfgFilePath, [multiple + "|Game.SupportsMultipleKeyboardsAndMice = false; ", gamepads + "|Game.Hook.XInputEnabled = true; "]);
}
};