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 3

Release notes

argument fix

Released
Size
1.5 KB
Downloads
19
Check
Verified
SHA-256
f363d5352622e265b37b5c13790d6d5d39168d6f942a8d30a4f2fe77b58e62a0
Download v3 (.nc)All versions

Files 1

PathSize
handler.js3.6 KB

handler.js

Plain text
Hub.Handler.Version = 3; // Released at https://hub.splitscreen.me/ on Sun Jul 11 2021 05:20:53 GMT+0000 (UTC).
Hub.Handler.Id = "wQeHLrPwbvRLAtNk9";
Hub.Maintainer.Name = "Talos91";
Hub.Maintainer.Id = "eeL7HAz8zJovChWw4";

Game.ExecutableContext = ["svencoop"];
Game.KillMutex = ["SvenCoopLauncherMutex", "ValvePlatformUIMutex", "ValvePlatformWaitMutex"];
Game.FileSymlinkExclusions = ["autoexec.cfg"];
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);
};