Sven Co-op · handler “SvenCoop”
Version 1
Release notes
First Release
- Released
- Size
- 1.5 MB
- Downloads
- 927
- Check
- Verified
- SHA-256
- c1094c998d2ea9add116fda628c592c2e8ff5b79d65d6f3278ebc89b9c8fb1a2
Files 39
| Path | Size |
|---|---|
| handler.js | 10 KB |
| SvenCoop/-sp_campaign_portal.jpg | 52 KB |
| SvenCoop/360controller.cfg | 1.8 KB |
| SvenCoop/blackmesaepf.jpg | 21 KB |
| SvenCoop/bm_sts.jpg | 108 KB |
| SvenCoop/crystal.jpg | 83 KB |
| SvenCoop/ctf_warforts.jpg | 43 KB |
| SvenCoop/deadsimpleneo2.jpg | 17 KB |
| SvenCoop/desertcircle.jpg | 10 KB |
| SvenCoop/fortified1.jpg | 12 KB |
| SvenCoop/hplanet.jpg | 67 KB |
| SvenCoop/incoming.jpg | 55 KB |
| SvenCoop/infested.jpg | 40 KB |
| SvenCoop/intruder.jpg | 18 KB |
| SvenCoop/judgement.jpg | 70 KB |
| SvenCoop/last4.jpg | 58 KB |
| SvenCoop/mommamesa.jpg | 64 KB |
| SvenCoop/osprey.jpg | 87 KB |
| SvenCoop/polar_rescue.jpg | 35 KB |
| SvenCoop/quarter.jpg | 29 KB |
| SvenCoop/robination.jpg | 47 KB |
| SvenCoop/sandstone.jpg | 65 KB |
| SvenCoop/sc_another.jpg | 49 KB |
| SvenCoop/sc_doc.jpg | 77 KB |
| SvenCoop/sc_mazing.jpg | 40 KB |
| SvenCoop/sc_persia.jpg | 52 KB |
| SvenCoop/sc_psyko.jpg | 22 KB |
| SvenCoop/sc_tetris1.jpg | 86 KB |
| SvenCoop/stadium4.jpg | 75 KB |
| SvenCoop/suspension.jpg | 52 KB |
| SvenCoop/svencoop1.jpg | 45 KB |
| SvenCoop/tf_original.jpg | 23 KB |
| SvenCoop/they_hunger_ep1.jpg | 42 KB |
| SvenCoop/they_hunger_ep2.jpg | 44 KB |
| SvenCoop/they_hunger_ep3.jpg | 42 KB |
| SvenCoop/th_escape.jpg | 42 KB |
| SvenCoop/toadsnatch.jpg | 21 KB |
| SvenCoop/toonrun.jpg | 41 KB |
| SvenCoop/yabma.jpg | 59 KB |
handler.js
Plain textHub.Handler.Version = 1; // Released at https://hub.splitscreen.me/ on Sun Mar 08 2020 02:35:04 GMT+0000 (UTC).
Hub.Handler.Id = "wQeHLrPwbvRLAtNk9";
Hub.Maintainer.Name = "Talos91";
Hub.Maintainer.Id = "eeL7HAz8zJovChWw4";
var listMaps = [
// Sven COOP campaigns
{ Name: "-sp_campaign_portal", Details: "HL1 Campaigns", Console: "-sp_campaign_portal", ImageUrl: "-sp_campaign_portal.jpg" },
{ Name: "blackmesaepf", Details: "blackmesaepf", Console: "blackmesaepfl", ImageUrl: "blackmesaepf.jpg" },
{ Name: "bm_sts", Details: "bm_sts", Console: "bm_sts", ImageUrl: "bm_sts.jpg" },
{ Name: "crystal", Details: "crystal", Console: "crystal", ImageUrl: "crystal.jpg" },
{ Name: "crystal", Details: "crystal2", Console: "crystal2", ImageUrl: "crystal.jpg" },
{ Name: "ctf_warforts", Details: "ctf_warforts", Console: "ctf_warforts", ImageUrl: "ctf_warforts.jpg" },
{ Name: "deadsimpleneo2", Details: "deadsimpleneo2", Console: "deadsimpleneo2", ImageUrl: "deadsimpleneo2.jpg" },
{ Name: "desertcircle", Details: "desertcircle", Console: "desertcircle", ImageUrl: "desertcircle.jpg" },
{ Name: "fortified1", Details: "fortified1", Console: "fortified1", ImageUrl: "fortified1.jpg" },
{ Name: "hplanet", Details: "hplanet", Console: "hplanet", ImageUrl: "hplanet.jpg" },
{ Name: "incoming", Details: "incoming", Console: "incoming", ImageUrl: "incoming.jpg" },
{ Name: "infested", Details: "infested", Console: "infested", ImageUrl: "infested.jpg" },
{ Name: "infested", Details: "infested2", Console: "infested2", ImageUrl: "infested.jpg" },
{ Name: "intruder", Details: "intruder", Console: "intruder", ImageUrl: "intruder.jpg" },
{ Name: "judgement", Details: "judgement", Console: "judgement", ImageUrl: "judgement.jpg" },
{ Name: "last", Details: "last", Console: "last", ImageUrl: "last4.jpg" },
{ Name: "last", Details: "last2", Console: "last2", ImageUrl: "last4.jpg" },
{ Name: "last", Details: "last3", Console: "last3", ImageUrl: "last4.jpg" },
{ Name: "last", Details: "last4", Console: "last4", ImageUrl: "last4.jpg" },
{ Name: "mommamesa", Details: "mommamesa", Console: "mommamesa", ImageUrl: "mommamesa.jpg" },
{ Name: "osprey", Details: "osprey", Console: "osprey", ImageUrl: "osprey.jpg" },
{ Name: "polar_rescue", Details: "polar_rescue", Console: "polar_rescue", ImageUrl: "polar_rescue.jpg" },
{ Name: "quarter", Details: "quarter", Console: "quarter", ImageUrl: "quarter.jpg" },
{ Name: "sandstone", Details: "sandstone", Console: "sandstone", ImageUrl: "sandstone.jpg" },
{ Name: "sc_another", Details: "sc_another", Console: "sc_another", ImageUrl: "sc_another.jpg" },
{ Name: "sc_doc", Details: "sc_doc", Console: "sc_doc", ImageUrl: "sc_doc.jpg" },
{ Name: "sc_mazing", Details: "sc_mazing", Console: "sc_mazing", ImageUrl: "sc_mazing.jpg" },
{ Name: "sc_persia", Details: "sc_persia", Console: "sc_persia", ImageUrl: "sc_persia.jpg" },
{ Name: "sc_psyko", Details: "sc_psyko", Console: "sc_psyko", ImageUrl: "sc_psyko.jpg" },
{ Name: "sc_robination", Details: "sc_robination", Console: "sc_robination", ImageUrl: "robination.jpg" },
{ Name: "sc_robination", Details: "sc_robination_revised", Console: "sc_robination_revised", ImageUrl: "robination.jpg" },
{ Name: "sc_tetris", Details: "sc_tetris1", Console: "sc_tetris1", ImageUrl: "sc_tetris1.jpg" },
{ Name: "sc_tetris", Details: "sc_tetris2", Console: "sc_tetris2", ImageUrl: "sc_tetris1.jpg" },
{ Name: "sc_tetris", Details: "sc_tetris3", Console: "sc_tetris3", ImageUrl: "sc_tetris1.jpg" },
{ Name: "sc_tetris", Details: "sc_tetris4", Console: "sc_tetris4", ImageUrl: "sc_tetris1.jpg" },
{ Name: "sc_tetris", Details: "sc_tetris5", Console: "sc_tetris5", ImageUrl: "sc_tetris1.jpg" },
{ Name: "sc_tetris", Details: "sc_tetris6", Console: "sc_tetris6", ImageUrl: "sc_tetris1.jpg" },
{ Name: "stadium4", Details: "stadium4", Console: "stadium4", ImageUrl: "stadium4.jpg" },
{ Name: "suspension", Details: "suspension", Console: "suspension", ImageUrl: "suspension.jpg" },
{ Name: "svencoop", Details: "svencoop1", Console: "svencoop1", ImageUrl: "svencoop1.jpg" },
{ Name: "svencoop", Details: "svencoop2", Console: "svencoop2", ImageUrl: "svencoop1.jpg" },
{ Name: "tf_original", Details: "tf_original", Console: "tf_original", ImageUrl: "tf_original.jpg" },
{ Name: "th_escape", Details: "th_escape", Console: "th_escape", ImageUrl: "th_escape.jpg" },
{ Name: "they_hunger_ep1", Details: "th_ep1_00", Console: "th_ep1_00", ImageUrl: "they_hunger_ep1.jpg" },
{ Name: "they_hunger_ep1", Details: "th_ep1_01", Console: "th_ep1_01", ImageUrl: "they_hunger_ep1.jpg" },
{ Name: "they_hunger_ep1", Details: "th_ep1_02", Console: "th_ep1_02", ImageUrl: "they_hunger_ep1.jpg" },
{ Name: "they_hunger_ep1", Details: "th_ep1_03", Console: "th_ep1_03", ImageUrl: "they_hunger_ep1.jpg" },
{ Name: "they_hunger_ep1", Details: "th_ep1_04", Console: "th_ep1_04", ImageUrl: "they_hunger_ep1.jpg" },
{ Name: "they_hunger_ep1", Details: "th_ep1_05", Console: "th_ep1_05", ImageUrl: "they_hunger_ep1.jpg" },
{ Name: "they_hunger_ep2", Details: "th_ep2_00", Console: "th_ep2_00", ImageUrl: "they_hunger_ep2.jpg" },
{ Name: "they_hunger_ep2", Details: "th_ep2_01", Console: "th_ep2_01", ImageUrl: "they_hunger_ep2.jpg" },
{ Name: "they_hunger_ep2", Details: "th_ep2_02", Console: "th_ep2_02", ImageUrl: "they_hunger_ep2.jpg" },
{ Name: "they_hunger_ep2", Details: "th_ep2_03", Console: "th_ep2_03", ImageUrl: "they_hunger_ep2.jpg" },
{ Name: "they_hunger_ep2", Details: "th_ep2_04", Console: "th_ep2_04", ImageUrl: "they_hunger_ep2.jpg" },
{ Name: "they_hunger_ep3", Details: "th_ep3_00", Console: "th_ep3_00", ImageUrl: "they_hunger_ep3.jpg" },
{ Name: "they_hunger_ep3", Details: "th_ep3_01", Console: "th_ep3_01", ImageUrl: "they_hunger_ep3.jpg" },
{ Name: "they_hunger_ep3", Details: "th_ep3_02", Console: "th_ep3_02", ImageUrl: "they_hunger_ep3.jpg" },
{ Name: "they_hunger_ep3", Details: "th_ep3_03", Console: "th_ep3_03", ImageUrl: "they_hunger_ep3.jpg" },
{ Name: "they_hunger_ep3", Details: "th_ep3_04", Console: "th_ep3_04", ImageUrl: "they_hunger_ep3.jpg" },
{ Name: "they_hunger_ep3", Details: "th_ep3_05", Console: "th_ep3_05", ImageUrl: "they_hunger_ep3.jpg" },
{ Name: "they_hunger_ep3", Details: "th_ep3_06", Console: "th_ep3_06", ImageUrl: "they_hunger_ep3.jpg" },
{ Name: "they_hunger_ep3", Details: "th_ep3_07", Console: "th_ep3_07", ImageUrl: "they_hunger_ep3.jpg" },
{ Name: "toadsnatch", Details: "toadsnatch", Console: "toadsnatch", ImageUrl: "toadsnatch.jpg" },
{ Name: "toonrun", Details: "toonrun1", Console: "toonrun1", ImageUrl: "toonrun.jpg" },
{ Name: "toonrun", Details: "toonrun2", Console: "toonrun2", ImageUrl: "toonrun.jpg" },
{ Name: "toonrun", Details: "toonrun3", Console: "toonrun3", ImageUrl: "toonrun.jpg" },
{ Name: "yabma", Details: "yabma", Console: "yabma", ImageUrl: "yabma.jpg" }
];
// This doesn't work yet
// List of all the game modes
var listGameModes = ["survival", "classic"];
// List all our game options before trying to write code that uses them
Game.AddOption("Map", "The map the game will use", "MapID", listMaps);
Game.AddOption("Game Mode", "The game mode", "GameMode", listGameModes);
var MapStep = Game.ShowOptionAsStep("MapID", true, "Choose a Campaign");
// This doesn't work yet
//var CustomMapStep = Game.ShowOptionAsStep("CustomMap", false);
//CustomMapStep.UpdateRequired = function () {
// CustomMapStep.Required = (Context.Options["MapID"].Value.Console == "custom");
//};
Game.FileSymlinkExclusions = ["autoexec.cfg"];
Game.FileSymlinkCopyInstead = ["config.cfg", "controller-xb360.cfg"];
Game.KillMutex = ["SvenCoopLauncherMutex"];
Game.NeedsSteamEmulation = false;
Game.UseGoldberg = true;
Game.HandlerInterval = 100;
Game.SymlinkExe = false;
Game.SymlinkGame = true;
Game.SupportsKeyboard = true;
Game.KeyboardPlayerFirst = false;
Game.ExecutableName = "svencoop.exe";
Game.SteamID = "225840";
Game.GUID = "Sven Coop";
Game.GameName = "Sven Coop";
Game.MaxPlayers = 4;
Game.MaxPlayersOneMonitor = 4;
Game.BinariesFolder = "";
Game.LauncherTitle = "";
Game.SupportsPositioning = true;
Game.ForceFinishOnPlay = true;
Game.HideTaskbar = false;
Game.HideCursor = false;
Game.Hook.ForceFocus = false;
Game.Hook.ForceFocusWindowName = "Sven Co-op";
Game.FakeFocus = true;
Game.FakeFocusInterval = 20000;
Game.HookFocus = true;
Game.ResetWindows = true;
Game.Hook.DInputForceDisable = true;
Game.Hook.DInputEnabled = false;
Game.Hook.XInputEnabled = true;
Game.Hook.XInputReroute = false;
Game.XInputPlusDll = ["xinput1_4.dll"];
Game.Hook.CustomDllEnabled = false;
Game.PromptBetweenInstances = true;
Game.Description =
"If the buttons in your gamepad do not do anything, open the console with the key under Escape and write: exec controller-xb360.cfg and press enter. Press that key in all instances by alt-tabbing.";
Game.PauseBetweenStarts = 25;
Game.Play = function() {
var Args = (Context.Args = " -windowed -noborder " + " -w " + Context.Width + " -h " + Context.Height);
Context.StartArguments = Args;
var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\svencoop\\360controller.cfg");
var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "360controller.cfg");
System.IO.File.Copy(savePkgOrigin, savePath, true);
var autoExec = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\svencoop\\autoexec.cfg";
var lines = ["sv_lan 1", "sv_aim 1", "maxplayers 8"];
if (Context.PlayerID == 0) {
var map = Context.Options["MapID"].Console;
if (map != "") {
lines.push("map " + map);
}
} else {
lines.push("connect " + Context.User.GetLocalIP());
}
if (Context.IsKeyboardPlayer) {
lines.push("exec undocontroller-xb360.cfg");
} else {
lines.push("exec controller-xb360.cfg");
}
Context.WriteTextFile(autoExec, lines);
if (Context.IsKeyboardPlayer) {
var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\svencoop\\config.cfg";
var dict = ['147|joystick "0" '];
Context.ReplaceLinesInTextFile(txtPath, dict);
}
};