Skip to content
Beta: this is a preview of the new SplitScreen.Me. Data may be reset before launch.

Sven Co-op · handler “SvenCoop”

Version 4

Release notes

No MotD

Released
Size
1.5 KB
Downloads
1,524
Check
Verified
SHA-256
6810c6f45a364a5cb6a6d358d95ce35e5dd8dc2663ed1b7ed46186c1dde6ec33
Download v4 (.nc)All versions

Files 1

PathSize
handler.js3.6 KB

handler.js

Plain text
Hub.Handler.Version = 4; // Released at https://hub.splitscreen.me/ on Wed Jul 14 2021 17:39:40 GMT+0000 (UTC).
Hub.Handler.Id = "wQeHLrPwbvRLAtNk9";
Hub.Maintainer.Name = "dr.oldboi";
Hub.Maintainer.Id = "dPRj3q6kFtT4HvMGg";

Game.ExecutableContext = ["svencoop"];
Game.KillMutex = ["SvenCoopLauncherMutex", "ValvePlatformUIMutex", "ValvePlatformWaitMutex"];
Game.FileSymlinkExclusions = ["autoexec.cfg", "motd.txt"];
Game.FileSymlinkCopyInstead = ["config.cfg", "controller-xb360.cfg"];
Game.NeedsSteamEmulation = false;
Game.UseGoldberg = true;
Game.HandlerInterval = 100;
Game.SymlinkExe = false;
Game.SymlinkGame = true;
Game.SupportsKeyboard = false;
Game.ExecutableName = "svencoop.exe";
Game.SteamID = "225840";
Game.GUID = "Sven Coop";
Game.GameName = "Sven Co-op";
Game.MaxPlayers = 8;
Game.MaxPlayersOneMonitor = 8;
Game.LauncherTitle = "";
Game.HideTaskbar = false;
Game.Hook.ForceFocus = false;
Game.Hook.ForceFocusWindowName = "Sven Co-op";
Game.FakeFocus = true;
Game.FakeFocusInterval = 20000;
Game.SendFakeFocusMsg = true;
Game.HookFocus = true;
Game.ResetWindows = true;
Game.Hook.DInputEnabled = false;
Game.Hook.XInputEnabled = true;
Game.Hook.XInputReroute = false;
Game.XInputPlusDll = ["xinput1_4.dll"];
Game.Hook.CustomDllEnabled = false;
Game.Description =
  "Start a map in the first instance then after you are in-game press the prompt to open the next instance and it will join the same game automatically. If the buttons in your gamepad do not do anything, open the console with the key under Escape and write: exec controller-xb360.cfg then press enter. Press that key in all instances by alt-tabbing.";
Game.PromptBetweenInstances = true;
Game.PauseBetweenStarts = 30;

Game.SupportsMultipleKeyboardsAndMice = true;

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 = false;
Game.LockInputAtStart = false;
Game.LockInputToggleKey = 0x23;

Game.Play = function() {
  var Args = (Context.Args = "-windowed -noborder " + "-w " + Context.Width + " -h " + Context.Height);

  Context.StartArguments = Args;

  var autoExec = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\svencoop\\autoexec.cfg";
  var lines = ["sv_lan 1", "sv_aim 1", "maxplayers 8"];

  if (Context.IsKeyboardPlayer) {
    lines.push("exec undocontroller-xb360.cfg");

    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\svencoop\\config.cfg";
    var dict = [Context.FindLineNumberInTextFile(txtPath, "joystick", Nucleus.SearchType.StartsWith) + '|joystick "0"'];
    Context.ReplaceLinesInTextFile(txtPath, dict);
  } else {
    lines.push("exec controller-xb360.cfg");

    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\svencoop\\config.cfg";
    var dict = [Context.FindLineNumberInTextFile(txtPath, "joystick", Nucleus.SearchType.StartsWith) + '|joystick "1"'];
    Context.ReplaceLinesInTextFile(txtPath, dict);
  }

  if (Context.PlayerID == 0) {
  } else {
    lines.push("connect " + Context.LocalIP);
  }

  Context.WriteTextFile(autoExec, lines);
};