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

Hollow Knight · handler “Hollow Knight Multiplayer Mod”

Version 2

Release notes

Update for new coop mod.

Released
Size
13.1 MB
Downloads
1,071
Check
Verified
SHA-256
eb15c01c9cd43acdc558f8e1c4123a418eddeef2cd437c2a296d5282f62591ef
Download v2 (.nc)All versions

Files 9

PathSize
handler.js6.6 KB
HollowKnight/P2/Assembly-CSharp.dll14.2 MB
HollowKnight/P2/Assembly-CSharp.xml112 KB
HollowKnight/P3/Assembly-CSharp.dll14.2 MB
HollowKnight/P3/Assembly-CSharp.xml112 KB
HollowKnight/P4/Assembly-CSharp.dll14.2 MB
HollowKnight/P4/Assembly-CSharp.xml112 KB
HollowKnight/P5/Assembly-CSharp.dll14.2 MB
HollowKnight/P5/Assembly-CSharp.xml112 KB

handler.js

Plain text
Hub.Handler.Version = 2; // Released at https://hub.splitscreen.me/ on Fri Mar 26 2021 22:15:17 GMT+0000 (UTC).
Hub.Handler.Id = "sWgnoTqjmk8M49QML";
Hub.Maintainer.Name = "Talos91";
Hub.Maintainer.Id = "eeL7HAz8zJovChWw4";

var answers1 = ["Yes", "No"];
Game.AddOption("Letterboxing/Pillarboxing fix?", "Removes the black bars in splitscreen.", "Pillar", answers1);

Game.DirSymlinkExclusions = ["hollow_knight_Data\\Plugins", "hollow_knight_Data\\Managed\\Mods\\Disabled"];
Game.FileSymlinkExclusions = [
  "steam_api.dll",
  "steam_appid.txt",
  "MultiplayerClient.dll",
  "MultiplayerServer.dll",
  "Assembly-CSharp.dll",
  "Assembly-CSharp.xml",
  "dinput8.dll",
  "xinput1_3.dll",
  "xinput1_4.dll"
];
Game.FileSymlinkCopyInstead = ["ModCommon.dll", "HKMP.dll", "CustomKnight.dll"];
Game.GameName = "Hollow Knight";
Game.HandlerInterval = 100;
Game.SymlinkExe = false;
Game.SymlinkGame = true;
Game.SupportsKeyboard = true;
Game.ExecutableName = "hollow_knight.exe";
Game.SteamID = "367520";
Game.GUID = "Hollow Knight";
Game.MaxPlayers = 5;
Game.MaxPlayersOneMonitor = 5;
Game.UseGoldberg = true;
Game.LauncherTitle = "";
Game.Hook.ForceFocus = true;
Game.Hook.ForceFocusWindowName = "Hollow Knight";
Game.FakeFocus = true;
Game.Hook.DInputEnabled = false;
Game.UseDInputBlocker = true;
Game.Hook.XInputEnabled = true;
Game.Hook.XInputReroute = false;
Game.XInputPlusDll = ["xinput1_3.dll", "xinput1_4.dll"];
Game.Hook.CustomDllEnabled = false;
Game.BlockRawInput = false;
Game.UserProfileSavePath = "AppData\\LocalLow\\Team Cherry\\Hollow Knight";
Game.Description =
  "IMPORTANT: This script only works with the Hollow Knight Multiplayer mod by Extremelyd1, make sure you install the Mod Common and the HKMP.dll mods using the Hollow Knight Mod Installer/Mod Manager by Gradow in your main game files first. Use a different save slot per instance. To connect the instances press start in the first instance and write the port number under Host (e.g. 26950) then click start to start the server, only start a server in one instance, to connect the instances to the server under join write 127.0.0.1, then the same port number as the server, write your nickname and click connect using the mouse cursor, do the same in the other instances, alt-tab between instances to use the keyboard.";
Game.KeepSymLinkOnExit = false;
Game.PauseBetweenStarts = 40;

Game.Play = function() {
  var Args = (Context.Args = " -screen-fullscreen 0 -popupwindow " + " -screen-width " + Context.Width + " -screen-height " + Context.Height);

  Context.StartArguments = Args;

  Context.EditRegKey("HKEY_CURRENT_USER", "SOFTWARE\\Team Cherry\\Hollow Knight", "Screenmanager Is Fullscreen mode_h3981298716", 0, Nucleus.RegType.DWord);

  Context.EditRegKey("HKEY_CURRENT_USER", "SOFTWARE\\Team Cherry\\Hollow Knight", "Screenmanager Resolution Height_h2627697771", Context.Height, Nucleus.RegType.DWord);

  Context.EditRegKey("HKEY_CURRENT_USER", "SOFTWARE\\Team Cherry\\Hollow Knight", "Screenmanager Resolution Width_h182942802", Context.Width, Nucleus.RegType.DWord);

  Context.EditRegKey("HKEY_CURRENT_USER", "SOFTWARE\\Team Cherry\\Hollow Knight", "NativeInput_h1840871570", 1, Nucleus.RegType.DWord);

  var filePath = (Context.filePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\hollow_knight_Data\\Managed\\Mods\\Disabled");
  System.IO.Directory.CreateDirectory(filePath);

  if (Context.PlayerID == 0) {
    System.IO.File.Copy(
      System.IO.Path.Combine(Context.RootInstallFolder, "hollow_knight_Data\\Managed\\Assembly-CSharp.dll"),
      System.IO.Path.Combine(Context.RootFolder, "hollow_knight_Data\\Managed\\Assembly-CSharp.dll"),
      true
    );
  }

  if (Context.PlayerID == 1) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\hollow_knight_Data\\Managed\\Assembly-CSharp.dll");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "P2\\Assembly-CSharp.dll");
    System.IO.File.Copy(savePkgOrigin, savePath, true);

    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\hollow_knight_Data\\Managed\\Assembly-CSharp.xml");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "P2\\Assembly-CSharp.xml");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  if (Context.PlayerID == 2) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\hollow_knight_Data\\Managed\\Assembly-CSharp.dll");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "P3\\Assembly-CSharp.dll");
    System.IO.File.Copy(savePkgOrigin, savePath, true);

    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\hollow_knight_Data\\Managed\\Assembly-CSharp.xml");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "P3\\Assembly-CSharp.xml");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  if (Context.PlayerID == 3) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\hollow_knight_Data\\Managed\\Assembly-CSharp.dll");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "P4\\Assembly-CSharp.dll");
    System.IO.File.Copy(savePkgOrigin, savePath, true);

    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\hollow_knight_Data\\Managed\\Assembly-CSharp.xml");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "P4\\Assembly-CSharp.xml");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  if (Context.PlayerID == 4) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\hollow_knight_Data\\Managed\\Assembly-CSharp.dll");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "P5\\Assembly-CSharp.dll");
    System.IO.File.Copy(savePkgOrigin, savePath, true);

    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\hollow_knight_Data\\Managed\\Assembly-CSharp.xml");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "P5\\Assembly-CSharp.xml");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  var pillar = Context.Options["Pillar"];

  if (pillar == "Yes") {
    //remove pillar boxing
    Context.PatchFileFindAll(
      System.IO.Path.Combine(Context.RootFolder, "hollow_knight_Data\\Managed\\Assembly-CSharp.dll"),
      System.IO.Path.Combine(Context.RootFolder, "hollow_knight_Data\\Managed\\Assembly-CSharp.dll"),
      [0x39, 0x8e, 0xe3, 0x3f],
      Context.ConvertToBytes(Context.AspectRatioDecimal)
    );
  }

  if (pillar == "No") {
  }
};