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

Sonic Robo Blast 2 · handler “Sonic Robo Blast 2”

Version 1

Release notes

first Release

Released
Size
1.2 KB
Downloads
992
Check
Verified
SHA-256
6ace83d3263f38579113bdc7b01dbab4cfeaf4ac07bbe8aa33543f5f1b0b06f5
Download v1 (.nc)All versions

Files 1

PathSize
handler.js3.7 KB

handler.js

Plain text
Hub.Handler.Version = 1; // Released at https://hub.splitscreen.me/ on Fri Dec 25 2020 19:58:45 GMT+0000 (UTC).
Hub.Handler.Id = "P7JafGDKCXvCwe9bj";
Hub.Maintainer.Name = "Talos91";
Hub.Maintainer.Id = "eeL7HAz8zJovChWw4";

Game.FileSymlinkCopyInstead = ["config.cfg", "gamedata.dat", "dinput8.dll"];
Game.NeedsSteamEmulation = false;
Game.HandlerInterval = 100;
Game.SymlinkExe = false;
Game.SymlinkGame = true;
Game.SymlinkFolders = true;
Game.SupportsKeyboard = true;
Game.ExecutableName = "srb2win.exe";
Game.SteamID = "";
Game.GUID = "Sonic Robo Blast 2";
Game.GameName = "Sonic Robo Blast 2";
Game.MaxPlayers = 4;
Game.MaxPlayersOneMonitor = 4;
Game.BinariesFolder = "";
Game.LauncherTitle = "";
Game.HideTaskbar = true;
Game.NotTopMost = true;
Game.Hook.ForceFocus = true;
Game.Hook.ForceFocusWindowName = "SRB2";
Game.HasDynamicWindowTitle = true;
Game.Hook.DInputEnabled = false;
Game.UseDInputBlocker = true;
Game.Hook.XInputEnabled = true;
Game.Hook.XInputReroute = false;
Game.Hook.CustomDllEnabled = false;
Game.XInputPlusDll = ["xinput1_4.dll"];
Game.FakeFocus = true;
Game.WindowStyleValues = ["~0xC00000", "~0x40000", "~0x20000000", "~0x20000", "~0x80000", "0x40000000"];
Game.ExtWindowStyleValues = ["~0x00000001", "~0x00000200", "~0x00020000"];
Game.ResetWindows = true;
Game.SetWindowHook = true;
Game.Description =
  "Create a LAN game in one instance and join in the others writing localhost in the specify ipv4 address field, alt-tab between instances to use the keyboard. The game already has native splitscreen for 2 players max but with this script you can play 4+.";
Game.KeepSymLinkOnExit = true;
Game.PauseBetweenStarts = 30;

Game.Play = function() {
  var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\config.cfg";
  var dict = [
    Context.FindLineNumberInTextFile(txtPath, "playmusicifunfocused", Nucleus.SearchType.StartsWith) + '|playmusicifunfocused "Yes" ',
    Context.FindLineNumberInTextFile(txtPath, "playsoundsifunfocused", Nucleus.SearchType.StartsWith) + '|playsoundsifunfocused "Yes" ',
    Context.FindLineNumberInTextFile(txtPath, "fullscreen", Nucleus.SearchType.StartsWith) + '|fullscreen "No" ',
    //Context.FindLineNumberInTextFile(txtPath, "scr_height", Nucleus.SearchType.StartsWith) + '|scr_height "' + Context.Height + '" ',
    //Context.FindLineNumberInTextFile(txtPath, "scr_width", Nucleus.SearchType.StartsWith) + '|scr_height "' + Context.Width + '" ',
    Context.FindLineNumberInTextFile(txtPath, 'use_mouse "On"', Nucleus.SearchType.StartsWith) + '|use_mouse "Off" ',
    Context.FindLineNumberInTextFile(txtPath, "pauseifunfocused", Nucleus.SearchType.StartsWith) + '|pauseifunfocused "No" ',
    Context.FindLineNumberInTextFile(txtPath, "showfocuslost", Nucleus.SearchType.StartsWith) + '|showfocuslost "No" '
  ];
  Context.ReplaceLinesInTextFile(txtPath, dict);

  if (Player.IsKeyboardPlayer) {
    var dict = [
      Context.FindLineNumberInTextFile(txtPath, "playmusicifunfocused", Nucleus.SearchType.StartsWith) + '|playmusicifunfocused "Yes" ',
      Context.FindLineNumberInTextFile(txtPath, "playsoundsifunfocused", Nucleus.SearchType.StartsWith) + '|playsoundsifunfocused "Yes" ',
      Context.FindLineNumberInTextFile(txtPath, "fullscreen", Nucleus.SearchType.StartsWith) + '|fullscreen "No" ',
      Context.FindLineNumberInTextFile(txtPath, 'use_mouse "Off"', Nucleus.SearchType.StartsWith) + '|use_mouse "On" ',
      Context.FindLineNumberInTextFile(txtPath, "pauseifunfocused", Nucleus.SearchType.StartsWith) + '|pauseifunfocused "No" ',
      Context.FindLineNumberInTextFile(txtPath, "showfocuslost", Nucleus.SearchType.StartsWith) + '|showfocuslost "No" '
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);
  }
};