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

Alien Swarm: Reactive Drop · handler “AlienSwarmReactiveDrop”

Version 1

Release notes

First release

Released
Size
1.5 KB
Downloads
4
Check
Unverified
SHA-256
35474691c461ae6bc690a29527dcf7c51a581e1754bacb174488be93eb079b3d
Download v1 (.nc)All versions

Files 1

PathSize
handler.js4.0 KB

handler.js

Plain text
Hub.Handler.Version = 1; // Released at https://hub.splitscreen.me/ on Sun Dec 08 2019 03:43:37 GMT+0000 (UTC).
Hub.Handler.Id = "9NzREmD8de8AdnXHF";
Hub.Maintainer.Name = "Talos91";
Hub.Maintainer.Id = "eeL7HAz8zJovChWw4";

Game.KillMutex = ["hl2_singleton_mutex"];
Game.DirSymlinkExclusions = ["reactivedrop\\cfg", "reactivedrop\\bin"];
Game.FileSymlinkExclusions = ["autoexec.cfg", "video.txt", "steam.inf", "config.cfg", "engine.dll", "client.dll", "server.dll", "xinput1_3.dll"];
Game.HandlerInterval = 100;
Game.SymlinkExe = false;
Game.SymlinkGame = true;
Game.SupportsKeyboard = true;
Game.KeyboardPlayerFirst = true;
Game.ExecutableName = "reactivedrop.exe";
Game.SteamID = "563560";
Game.GUID = "Alien Swarm Reactive Drop";
Game.GameName = "Alien Swarm: Reactive Drop";
Game.NeedsSteamEmulation = false;
Game.UseGoldberg = true;
Game.LauncherTitle = "";
Game.SaveType = Nucleus.SaveType.CFG;
Game.WorkingFolder = "bin";
Game.MaxPlayersOneMonitor = 8;
Game.MaxPlayers = 8;
Game.Hook.ForceFocus = false;
Game.Hook.ForceFocusWindowName = "Alien Swarm: Reactive Drop";
Game.Hook.DInputEnabled = false;
Game.Hook.DInputForceDisable = true;
Game.Hook.XInputEnabled = true;
Game.Hook.XInputReroute = false;
Game.Hook.CustomDllEnabled = false;
Game.XInputPlusDll = ["xinput1_3.dll"];
Game.HookFocus = true;
Game.PauseBetweenStarts = 20;
Game.DPIHandling = Nucleus.DPIHandling.InvScaled;

Game.Play = function() {
  var Args = (Context.Args = " -window " + " -AlwaysFocus " + " -novid " + " -w " + Context.Width + " -h " + Context.Height);

  Context.StartArguments = Args;

  var saveSrc = System.IO.Path.Combine(Context.RootInstallFolder, "reactivedrop\\cfg\\video.txt");
  var savePath = System.IO.Path.Combine(Context.RootFolder, "reactivedrop\\cfg\\video.txt");
  Context.ModifySaveFile(saveSrc, savePath, Nucleus.SaveType.CFG, [
    new Nucleus.CfgSaveInfo("VideoConfig", "setting.fullscreen", "0"),
    new Nucleus.CfgSaveInfo("VideoConfig", "setting.defaultres", Math.max(640, Context.Width)),
    new Nucleus.CfgSaveInfo("VideoConfig", "setting.defaultresheight", Math.max(360, Context.Height)),
    new Nucleus.CfgSaveInfo("VideoConfig", "setting.nowindowborder", "0")
  ]);

  //copy config.cfg
  System.IO.File.Copy(System.IO.Path.Combine(Context.RootInstallFolder, "reactivedrop\\cfg\\config.cfg"), System.IO.Path.Combine(Context.RootFolder, "reactivedrop\\cfg\\config.cfg"), true);

  //copy steam.inf
  System.IO.File.Copy(System.IO.Path.Combine(Context.RootInstallFolder, "reactivedrop\\steam.inf"), System.IO.Path.Combine(Context.RootFolder, "reactivedrop\\steam.inf"), true);

  // TODO: how to update these if it comes the case?

  //patch dlls
  //patch engine no sleep
  Context.PatchFile(
    System.IO.Path.Combine(Context.RootInstallFolder, "bin\\engine.dll"),
    System.IO.Path.Combine(Context.RootFolder, "bin\\engine.dll"),
    [0x8b, 0x01, 0x8b, 0x50, 0x3c, 0xff, 0xd2, 0x84, 0xc0, 0x75, 0x1a],
    [0x8b, 0x01, 0x8b, 0x50, 0x3c, 0x90, 0x90]
  );
  //patch select weapon for players in briefing
  Context.PatchFile(
    System.IO.Path.Combine(Context.RootInstallFolder, "reactivedrop\\bin\\client.dll"),
    System.IO.Path.Combine(Context.RootFolder, "reactivedrop\\bin\\client.dll"),
    [0x0f, 0x84, 0xa8, 0x00, 0x00, 0x00, 0x53, 0x8d],
    [0x90, 0x90, 0x90, 0x90, 0x90, 0x90]
  );
  //patch select weapon for players in briefing
  Context.PatchFile(
    System.IO.Path.Combine(Context.RootInstallFolder, "reactivedrop\\bin\\server.dll"),
    System.IO.Path.Combine(Context.RootFolder, "reactivedrop\\bin\\server.dll"),
    [0x74, 0x12, 0x46, 0x83, 0xfe, 0x20],
    [0xeb]
  );

  var autoExec = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\reactivedrop\\cfg\\autoexec.cfg";
  var lines = ["sv_lan 1", "sv_allow_lobby_connect_only 0", "rd_ready_mark_override 1"];

  if (Player.IsKeyboardPlayer) {
    lines.push("joystick 0");
    lines.push("sk_autoaim_mode 1");
    //lines.push("exec undo360controller.cfg");
  }

  Context.WriteTextFile(autoExec, lines);
};