Garry's Mod · handler “GarrysMod”
Version 1
Release notes
First Release
- Released
- Size
- 2.1 KB
- Downloads
- 345
- Check
- Verified
- SHA-256
- 8682bdff42a97b7995f327bab1cb4c067381d71785877ef160fc124b71b74a70
Files 2
| Path | Size |
|---|---|
| GarrysMod/joystick.cfg | 851 B |
| handler.js | 3.2 KB |
handler.js
Plain textHub.Handler.Version = 1; // Released at https://hub.splitscreen.me/ on Sat Mar 07 2020 05:07:25 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.SendNormalMouseInput = true;
Game.SendNormalKeyboardInput = true;
Game.SendScrollWheel = true;
Game.HookSetCursorPos = true;
Game.HookGetCursorPos = true;
Game.HookGetKeyState = true;
Game.HookGetAsyncKeyState = true;
Game.HookGetKeyboardState = true;
Game.HookDontUpdateLegacyInMouseMsg = true;
Game.HookUseLegacyInput = false;
Game.HookFilterRawInput = true;
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 (Player.IsKeyboardPlayer) {
lines.push("joystick 0");
lines.push("exec undo360controller.cfg");
} else {
lines.push("exec 360controller.cfg");
}
Context.WriteTextFile(autoExec, lines);
};