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 8

Release notes

updated modding api for instance 2 and up.

Released
Size
4.8 MB
Downloads
18,728
Check
Verified
SHA-256
028efab17700d26d0a5d5fed19a12d4d63a31824dd30716eb868a5ae8480a9b0
Download v8 (.nc)All versions

Files 5

PathSize
handler.js6.3 KB
HollowKnight/P2/Assembly-CSharp.dll3.7 MB
HollowKnight/P3/Assembly-CSharp.dll3.7 MB
HollowKnight/P4/Assembly-CSharp.dll3.7 MB
HollowKnight/P5/Assembly-CSharp.dll3.7 MB

handler.js

Plain text
Hub.Handler.Version = 8; // Released at https://hub.splitscreen.me/ on Fri Nov 04 2022 01:50:21 GMT+0000 (Coordinated Universal Time).
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 split-screen.", "Pillar", answers1);

Game.ExecutableContext = ["hollow_knight_Data"];
Game.DirSymlinkExclusions = ["hollow_knight_Data\\Plugins\\x86_64", "hollow_knight_Data\\Managed\\Mods\\Disabled", "hollow_knight_Data\\Managed\\Mods\\HKMP"];
Game.FileSymlinkExclusions = ["steam_appid.txt", "Assembly-CSharp.dll", "Assembly-CSharp.xml", "MMHOOK_Assembly-CSharp.dll", "dinput8.dll", "xinput1_3.dll", "xinput1_4.dll"];
Game.FileSymlinkCopyInstead = ["steam_api64.dll", "Config.ini", "authorized.json", "banned.json", "HKMP.dll", "HKMP.xml", "whitelist.json"];
Game.GameName = "Hollow Knight";
Game.HandlerInterval = 100;
Game.SymlinkExe = false;
Game.SymlinkGame = true;
Game.SymlinkFolders = true;
Game.ExecutableName = "hollow_knight.exe";
Game.SteamID = "367520";
Game.GUID = "Hollow Knight";
Game.MaxPlayers = 5;
Game.MaxPlayersOneMonitor = 5;
Game.UseGoldberg = false;
Game.CreateSteamAppIdByExe = true;
Game.LauncherTitle = "";
Game.Hook.ForceFocus = true;
Game.Hook.ForceFocusWindowName = "Hollow Knight";
Game.FakeFocus = true;
Game.FakeFocusInterval = 30000;
Game.SendFakeFocusMsg = true;
Game.ResetWindows = 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.SupportsKeyboard = true;
Game.BlockRawInput = false;
Game.UserProfileSavePath = "AppData\\LocalLow\\Team Cherry\\Hollow Knight";
Game.Description =
  "IMPORTANT: This handler only works with the Hollow Knight Multiplayer mod by Extremelyd1, make sure you install the the HKMP.dll mod using the Scarab Mod Installer 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 in the Port field right above connect (e.g. 26950) then click start hosting to start the server, only start a server in one instance, to connect all instances to the same server write localhost in the IP field, 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. Disable Steam Input for this game or the gamepads will not restrict correctly.";
Game.KeepSymLinkOnExit = false;
Game.PromptBetweenInstances = true;
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);

  System.IO.File.Copy(
    System.IO.Path.Combine(Context.RootInstallFolder, "hollow_knight_Data\\Managed\\Assembly-CSharp.xml"),
    System.IO.Path.Combine(Context.RootFolder, "hollow_knight_Data\\Managed\\Assembly-CSharp.xml"),
    true
  );

  System.IO.File.Copy(
    System.IO.Path.Combine(Context.RootInstallFolder, "hollow_knight_Data\\Managed\\MMHOOK_Assembly-CSharp.dll"),
    System.IO.Path.Combine(Context.RootFolder, "hollow_knight_Data\\Managed\\MMHOOK_Assembly-CSharp.dll"),
    true
  );

  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);
  }

  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);
  }

  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);
  }

  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 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") {
  }
};