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

Resident Evil 5 · handler “Resident Evil 5”

Version 8

Release notes

update to R5.

Released
Size
2.6 KB
Downloads
1,337
Check
Verified
SHA-256
bfb0b00467d0bb030cb8aeb9a53ef4bb850426bfa6246a90d0fe8a6c5fec471c
Download v8 (.nc)All versions

Files 1

PathSize
handler.js8.9 KB

handler.js

Plain text
Hub.Handler.Version = 8; // Released at https://hub.splitscreen.me/ on Fri Dec 25 2020 17:26:55 GMT+0000 (UTC).
Hub.Handler.Id = "q926yWzpZZNiv7Cck";
Hub.Maintainer.Name = "Talos91";
Hub.Maintainer.Id = "eeL7HAz8zJovChWw4";

var answers1 = ["No", "Yes"];
var answers2 = ["No", "Yes"];
var answers3 = ["No", "Yes"];
Game.AddOption("Do you have Rick's Online Fixes mod installed?", "Only select yes if you do.", "OF", answers1);
Game.AddOption("Disable Multi-Keyboard/Mice?", "Only select yes if you are using only gamepads and want kb input.", "MKB", answers2);
Game.AddOption("Use Flawless Widescreen?", "Select yes if you want to fix the hud/menus in ultra wide custom resolutions.", "FW", answers3);

Game.KillMutex = ["sBioMain"];
Game.FileSymlinkExclusions = ["steam_api.dll", "steam_appid.txt", "steam_interfaces.txt", "XInput1_3.dll", "re5dx9.exe", "Launcher.exe"];
Game.FileSymlinkCopyInstead = ["maluc.dll"];
Game.NeedsSteamEmulation = false;
Game.UseGoldberg = true;
Game.GoldbergExperimental = true;
Game.GoldbergNoLocalSave = true;
Game.UseNucleusEnvironment = true;
Game.HandlerInterval = 100;
Game.SymlinkExe = false;
Game.SymlinkGame = true;
Game.SymlinkFolders = true;
Game.SupportsKeyboard = false;
Game.ExecutableName = "re5dx9.exe";
Game.SteamID = "21690";
Game.GUID = "Resident Evil 5";
Game.GameName = "Resident Evil 5";
Game.MaxPlayers = 4;
Game.MaxPlayersOneMonitor = 4;
Game.BinariesFolder = "";
Game.LauncherTitle = "";
Game.LauncherExe = "Launcher.exe";
Game.LauncherExeIgnoreFileCheck = true;
Game.HideTaskbar = false;
Game.Hook.ForceFocus = true;
Game.Hook.ForceFocusWindowName = "RESIDENT EVIL 5";
Game.HasDynamicWindowTitle = true;
Game.Hook.DInputEnabled = false;
Game.Hook.DInputForceDisable = true;
Game.Hook.XInputEnabled = true;
Game.Hook.XInputReroute = false;
Game.XInputPlusDll = ["xinput1_3.dll"];
Game.XInputPlusNoIni = true;
Game.Hook.CustomDllEnabled = false;
Game.PreventWindowDeactivation = true;
Game.HookFocus = true;
Game.UserProfileConfigPath = "Documents\\CAPCOM\\RESIDENT EVIL 5";
Game.UserProfileSavePath = "AppData\\Roaming\\Goldberg SteamEmu Saves\\21690\\remote";
Game.PlayerSteamIDs = ["76561198134585131", "76561198131394153", "76561198011792067", "76561198043762785"];
Game.Description =
  "If you use keyboards and mice after the instances open press the END key to lock the input for all instances to have their own cursor. Press the END key again to unlock the input. You can also use CTRL+Q to close Nucleus and all its instances. Enable Flawless Widescreen in the Nucleus UI options if you want to fix the stretching when using ultra wide custom resolutions. For Duo No Mercy F1 key function with the online fixes patch the host player needs keyboard input. If all players are using controllers then select the UI option to disable the multikeyboard/mice support to have keyboard input in the gamepad instances.";
Game.GamePlayBeforeGameSetup = true;
Game.PauseBetweenStarts = 25;

Game.SupportsMultipleKeyboardsAndMice = true;

Game.HookSetCursorPos = true;
Game.HookGetCursorPos = true;
Game.HookGetKeyState = false;
Game.HookGetAsyncKeyState = false;
Game.HookGetKeyboardState = false;
Game.HookFilterRawInput = true;
Game.HookFilterMouseMessages = false;
Game.HookUseLegacyInput = false;
Game.HookDontUpdateLegacyInMouseMsg = false;
Game.HookMouseVisibility = false;

Game.SendNormalMouseInput = true;
Game.SendNormalKeyboardInput = true;
Game.SendScrollWheel = true;
Game.ForwardRawKeyboardInput = false;
Game.ForwardRawMouseInput = false;
Game.HookReRegisterRawInput = false;
Game.HookReRegisterRawInputMouse = false;
Game.HookReRegisterRawInputKeyboard = false;
Game.DrawFakeMouseCursor = true;
Game.LockInputAtStart = false;
Game.LockInputToggleKey = 0x23;

Game.Play = function() {
  var VideoConfig = Context.EnvironmentPlayer + Context.UserProfileConfigPath + "\\config.ini";
  Context.ModifySaveFile(VideoConfig, VideoConfig, Nucleus.SaveType.INI, [
    new Nucleus.IniSaveInfo("DISPLAY", "FullScreen", "OFF"),
    new Nucleus.IniSaveInfo("Window", "MainX", Context.Width),
    new Nucleus.IniSaveInfo("Window", "MainY", Context.Height),
    new Nucleus.IniSaveInfo("DISPLAY", "AdjustAspect", "ON"),
    new Nucleus.IniSaveInfo("DISPLAY", "resolution", Context.Width + "x" + Context.Height)
  ]);

  var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\XInputPlus.ini");
  var savePkgOrigin = System.IO.Path.Combine(Context.NucleusFolder, "utils\\XInputPlus\\XInputPlus.ini");
  System.IO.File.Copy(savePkgOrigin, savePath, true);

  var savePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\XInputPlus.ini";
  Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [new Nucleus.IniSaveInfo("KeyAssign", "RSB", "LSB|RSB")]);

  var interfaces = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\steam_interfaces.txt";
  var lines = [
    "SteamClient015",
    "SteamGameServer012",
    "SteamGameServerStats001",
    "SteamUser017",
    "SteamFriends014",
    "SteamUtils007",
    "SteamMatchMaking009",
    "SteamMatchMakingServers002",
    "STEAMUSERSTATS_INTERFACE_VERSION011",
    "STEAMAPPS_INTERFACE_VERSION006",
    "SteamNetworking005",
    "STEAMREMOTESTORAGE_INTERFACE_VERSION012",
    "STEAMSCREENSHOTS_INTERFACE_VERSION002",
    "STEAMHTTP_INTERFACE_VERSION002",
    "STEAMUNIFIEDMESSAGES_INTERFACE_VERSION001",
    "STEAMUGC_INTERFACE_VERSION002",
    "STEAMAPPLIST_INTERFACE_VERSION001",
    "STEAMMUSIC_INTERFACE_VERSION001",
    "STEAMMUSICREMOTE_INTERFACE_VERSION001",
    "STEAMCONTROLLER_INTERFACE_VERSION"
  ];

  Context.WriteTextFile(interfaces, lines);

  var filePath = (Context.filePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\steam_settings");
  System.IO.Directory.CreateDirectory(filePath);

  var appid = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\steam_settings\\steam_appid.txt";
  var lines = ["21690"];

  Context.WriteTextFile(appid, lines);

  if (Context.IsKeyboardPlayer) {
    var savePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\XinputPlus.ini";
    Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [
      new Nucleus.IniSaveInfo("ControllerNumber", "Controller1", "0"),
      new Nucleus.IniSaveInfo("ControllerNumber", "Controller2", "0"),
      new Nucleus.IniSaveInfo("ControllerNumber", "Controller3", "0"),
      new Nucleus.IniSaveInfo("ControllerNumber", "Controller4", "0")
    ]);
  } else {
    var savePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\XInputPlus.ini";
    Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [
      new Nucleus.IniSaveInfo("ControllerNumber", "Controller1", Context.PlayerID + 1),
      new Nucleus.IniSaveInfo("ControllerNumber", "Controller2", Context.PlayerID + 1),
      new Nucleus.IniSaveInfo("ControllerNumber", "Controller3", Context.PlayerID + 1),
      new Nucleus.IniSaveInfo("ControllerNumber", "Controller4", Context.PlayerID + 1)
    ]);
  }

  var of = Context.Options["OF"];
  var mkb = Context.Options["MKB"];
  var fw = Context.Options["FW"];

  if (of == "Yes") {
    System.IO.File.Copy(System.IO.Path.Combine(Context.RootInstallFolder, "re5dx9.exe"), System.IO.Path.Combine(Context.RootFolder, "re5dx9.exe"), true);

    Context.PatchFile(
      System.IO.Path.Combine(Context.RootInstallFolder, "Launcher.exe"),
      System.IO.Path.Combine(Context.RootFolder, "Launcher.exe"),
      [0x85, 0xc0, 0x74, 0x17],
      [0x85, 0xc0, 0xeb, 0x17]
    );

    Context.PatchFile(
      System.IO.Path.Combine(Context.RootFolder, "Launcher.exe"),
      System.IO.Path.Combine(Context.RootFolder, "Launcher.exe"),
      [0x74, 0x17, 0x6a, 0x40, 0xba, 0x30, 0x22, 0x40, 0x00, 0xb9, 0x30],
      [0xeb, 0x17, 0x6a, 0x40, 0xba, 0x30, 0x22, 0x40, 0x00, 0xb9, 0x30]
    );
  }

  if (of == "No") {
    System.IO.File.Copy(System.IO.Path.Combine(Context.RootInstallFolder, "Launcher.exe"), System.IO.Path.Combine(Context.RootFolder, "Launcher.exe"), true);

    if (Context.AspectRatioDecimal > 1.8) {
      //ultra wide cutscene crash fix
      Context.PatchFileFindAll(
        System.IO.Path.Combine(Context.RootInstallFolder, "re5dx9.exe"),
        System.IO.Path.Combine(Context.RootFolder, "re5dx9.exe"),
        [0x00, 0x00, 0x10, 0x3f],
        [0x00, 0x00, 0x40, 0x3e]
      );
    } else if (Context.AspectRatioDecimal < 1.2) {
      System.IO.File.Copy(System.IO.Path.Combine(Context.RootInstallFolder, "re5dx9.exe"), System.IO.Path.Combine(Context.RootFolder, "re5dx9.exe"), true);
    } else {
      System.IO.File.Copy(System.IO.Path.Combine(Context.RootInstallFolder, "re5dx9.exe"), System.IO.Path.Combine(Context.RootFolder, "re5dx9.exe"), true);
    }
  }

  if (mkb == "Yes") {
    Game.SupportsMultipleKeyboardsAndMice = false;
  }

  if (mkb == "No") {
  }

  if (fw == "Yes") {
    Game.FlawlessWidescreen = "ResidentEvil5";
  }

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