Garry's Mod · handler “GarrysMod”
Version 2
Release notes
crash fix
- Released
- Size
- 2.2 KB
- Downloads
- 7,667
- Check
- Verified
- SHA-256
- 086fbec02dbc981c37b3afa3dfab2f2fdadf1372fc2c6ccc2aa9161246b0eb68
Files 2
| Path | Size |
|---|---|
| GarrysMod/joystick.cfg | 851 B |
| handler.js | 3.5 KB |
handler.js
Plain textHub.Handler.Version = 2; // Released at https://hub.splitscreen.me/ on Thu Apr 30 2020 03:25:13 GMT+0000 (UTC).
Hub.Handler.Id = "8xXSm3nNaLaZNiz3w";
Hub.Maintainer.Name = "Talos91";
Hub.Maintainer.Id = "eeL7HAz8zJovChWw4";
Game.ExecutableContext = ["garrysmod"];
Game.KillMutex = ["hl2_singleton_mutex"];
Game.DirSymlinkExclusions = ["bin", "garrysmod\\cfg"];
Game.FileSymlinkExclusions = ["joystick.cfg", "autoexec.cfg", "steam_appid.txt", "xinput9_1_0.dll", "xinput1_3.dll"];
Game.HandlerInterval = 100;
Game.SymlinkExe = false;
Game.SymlinkGame = true;
Game.ExecutableName = "hl2.exe";
Game.SteamID = "4000";
Game.GUID = "Garrys Mod";
Game.GameName = "Garry's Mod";
Game.NeedsSteamEmulation = false;
Game.CreateSteamAppIdByExe = true;
Game.LauncherTitle = "";
Game.SaveType = Nucleus.SaveType.CFG;
Game.WorkingFolder = "bin";
Game.SupportsPositioning = true;
Game.MaxPlayersOneMonitor = 16;
Game.MaxPlayers = 128;
Game.Hook.ForceFocus = false;
Game.Hook.ForceFocusWindowName = "Garry's Mod";
Game.Hook.DInputEnabled = false;
Game.Hook.DInputForceDisable = true;
Game.Hook.XInputEnabled = true;
Game.Hook.XInputReroute = false;
Game.Hook.UseAlpha8CustomDll = true;
Game.FakeFocus = true;
Game.HookFocus = true;
Game.PauseBetweenStarts = 30;
Game.Description =
"Use the mouse cursor to start a local server multiplayer game in one instance, the game has no gamepad support on menus. Edit the joystick.cfg file in the script GarrysMod folder if your gamepad is mapped incorrectly. You can use multiple keyboards and mice now too, after the instances open you will get multiple cursors, one mouse will control all cursors, after all joined the same game press the END key for all instances to each have their own cursor. Press the END key again to unlock the input.";
Game.DPIHandling = Nucleus.DPIHandling.InvScaled;
Game.SupportsMultipleKeyboardsAndMice = true;
Game.HookSetCursorPos = true;
Game.HookGetCursorPos = true;
Game.HookGetKeyState = true;
Game.HookGetAsyncKeyState = true;
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 = false;
Game.HookReRegisterRawInputMouse = false;
Game.HookReRegisterRawInputKeyboard = false;
Game.DrawFakeMouseCursor = false;
Game.LockInputAtStart = false;
Game.LockInputToggleKey = 0x23;
Game.Play = function() {
var Args = (Context.Args = " -windowed -AlwaysFocus -insecure +m_rawinput 1 " + " -w " + Context.Width + " -h " + Context.Height);
Context.StartArguments = Args;
var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\garrysmod\\cfg\\joystick.cfg");
var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "joystick.cfg");
System.IO.File.Copy(savePkgOrigin, savePath, true);
var autoExec = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\garrysmod\\cfg\\autoexec.cfg";
var lines = [
"engine_no_focus_sleep 0" // unlimited FPS on all screens
];
if (Context.IsKeyboardPlayer) {
lines.push("joystick 0");
lines.push("exec undo360controller.cfg");
} else {
lines.push("exec 360controller.cfg");
}
Context.WriteTextFile(autoExec, lines);
};