Resident Evil 5 · handler “Resident Evil 5”
Version 12
Release notes
fix update
- Released
- Size
- 20 KB
- Downloads
- 20,738
- Check
- Verified
- SHA-256
- e2801999d903e2aaf9b85d94959d9e38536b0f1ed08a2adae0c639b1e7fd57b2
Files 3
| Path | Size |
|---|---|
| handler.js | 16 KB |
| ResidentEvil5/RE5Fix.ini | 1.2 KB |
| ResidentEvil5/xinput1_3.dll | 32 KB |
handler.js
Plain textHub.Handler.Version = 12; // Released at https://hub.splitscreen.me/ on Wed May 04 2022 17:32:07 GMT+0000 (Coordinated Universal Time).
Hub.Handler.Id = "q926yWzpZZNiv7Cck";
Hub.Maintainer.Name = "Talos91";
Hub.Maintainer.Id = "eeL7HAz8zJovChWw4";
var answers1 = ["No", "Yes"];
var answers2 = ["Default", "5", "10", "15", "20", "25", "30", "35", "40", "45", "50", "60"];
var answers3 = ["No", "Yes"];
Game.AddOption("Use Lyall RE5Fix?", "Fixes the zoomed in hud/menus in ultra wide and other custom resolutions. Read the handler notes before using.", "Fix", answers1);
Game.AddOption("Increase FOV.", "Select the desired FOV increase+. Only applies if you select yes to use the Lyall RE5Fix, experimental.", "Fov", answers2);
Game.AddOption("Remove Colour Filter?", "Disables the game's green/yellow colour filter. Only applies if you select yes to use the Lyall RE5Fix.", "Filter", answers3);
Game.ExecutableContext = ["nativePC_MT"];
Game.KillMutex = ["sBioMain"];
Game.DirSymlinkExclusions = ["plugins"];
Game.FileSymlinkExclusions = ["steam_api.dll", "steam_appid.txt", "steam_interfaces.txt", "local_save.txt", "xinput1_3.dll", "RE5Fix.dll", "RE5Fix.ini", "re5dx9.exe", "Launcher.exe"];
Game.FileSymlinkCopyInstead = ["QOL.dll", "dinput8.dll", "maluc.dll"];
Game.UseNucleusEnvironment = true;
Game.NeedsSteamEmulation = false;
Game.UseGoldberg = true;
Game.GoldbergExperimental = true;
Game.GoldbergNoLocalSave = true;
Game.HandlerInterval = 100;
Game.SymlinkExe = false;
Game.SymlinkGame = true;
Game.SymlinkFolders = true;
Game.ExecutableName = "re5dx9.exe";
Game.SteamID = "21690";
Game.GUID = "Resident Evil 5";
Game.GameName = "Resident Evil 5";
Game.MaxPlayers = 4;
Game.MaxPlayersOneMonitor = 4;
Game.LauncherTitle = "";
Game.LauncherExe = "Launcher.exe";
Game.LauncherExeIgnoreFileCheck = true;
Game.HideTaskbar = false;
Game.Hook.ForceFocus = true;
Game.Hook.ForceFocusWindowName = "RESIDENT EVIL 5";
Game.Hook.DInputEnabled = false;
Game.Hook.XInputEnabled = true;
Game.Hook.XInputReroute = false;
Game.Hook.CustomDllEnabled = false;
Game.XInputPlusDll = ["xinput1_3.dll"];
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 all the instances have launched, resized and positioned correctly, press the END key once to lock the input for all instances to have their own cursor. You need to left click each mouse to make the emulated cursors appear after locking the input. Press the END key again to unlock the input whe you finish playing. You can also use CTRL+Q to close Nucleus and all its instances when the input is unlocked. If you want the instances to resize correctly and fix stretching you need to create custom resolutions in your AMD/Nvidia/Intel panel (For example for a 1920x1080 monitor add: 960x1080, 960x540, 1920x540 etc.) so the game can see and use them.";
Game.PauseBetweenProcessGrab = 2;
Game.PauseBetweenStarts = 25;
//USS deprecated options:
Game.HookSetCursorPos = false;
Game.HookGetCursorPos = false;
Game.HookGetKeyState = false;
Game.HookGetAsyncKeyState = false;
Game.HookGetKeyboardState = false;
Game.HookFilterRawInput = false;
Game.HookFilterMouseMessages = false;
Game.HookUseLegacyInput = false;
Game.HookDontUpdateLegacyInMouseMsg = false;
Game.HookMouseVisibility = false;
Game.SendNormalMouseInput = false;
Game.SendNormalKeyboardInput = false;
Game.SendScrollWheel = false;
Game.ForwardRawKeyboardInput = false;
Game.ForwardRawMouseInput = false;
Game.HookReRegisterRawInput = false;
Game.HookReRegisterRawInputMouse = false;
Game.HookReRegisterRawInputKeyboard = false;
Game.DrawFakeMouseCursor = false;
//ProtoInput:
Game.SupportsMultipleKeyboardsAndMice = true;
Game.ProtoInput.InjectStartup = false;
Game.ProtoInput.InjectRuntime_RemoteLoadMethod = false;
Game.ProtoInput.InjectRuntime_EasyHookMethod = true;
Game.ProtoInput.InjectRuntime_EasyHookStealthMethod = false;
Game.LockInputAtStart = false;
Game.LockInputSuspendsExplorer = true;
Game.ProtoInput.FreezeExternalInputWhenInputNotLocked = false;
Game.LockInputToggleKey = 0x23;
Game.ProtoInput.RenameHandlesHook = false;
Game.ProtoInput.RenameHandles = [];
Game.ProtoInput.RenameNamedPipes = [];
Game.ProtoInput.RegisterRawInputHook = true;
Game.ProtoInput.GetRawInputDataHook = false;
Game.ProtoInput.MessageFilterHook = true;
Game.ProtoInput.GetCursorPosHook = false;
Game.ProtoInput.SetCursorPosHook = false;
Game.ProtoInput.GetKeyStateHook = false;
Game.ProtoInput.GetAsyncKeyStateHook = false;
Game.ProtoInput.GetKeyboardStateHook = false;
Game.ProtoInput.CursorVisibilityHook = false;
Game.ProtoInput.ClipCursorHook = true;
Game.ProtoInput.FocusHooks = false;
Game.ProtoInput.DrawFakeCursor = false;
Game.ProtoInput.ClipCursorHookCreatesFakeClip = true;
Game.ProtoInput.AllowFakeCursorOutOfBounds = false;
Game.ProtoInput.ExtendFakeCursorBounds = false;
Game.ProtoInput.RawInputFilter = false;
Game.ProtoInput.MouseMoveFilter = false;
Game.ProtoInput.MouseActivateFilter = false;
Game.ProtoInput.WindowActivateFilter = false;
Game.ProtoInput.WindowActvateAppFilter = false;
Game.ProtoInput.MouseWheelFilter = false;
Game.ProtoInput.MouseButtonFilter = false;
Game.ProtoInput.KeyboardButtonFilter = false;
Game.ProtoInput.SendMouseWheelMessages = true;
Game.ProtoInput.SendMouseButtonMessages = true;
Game.ProtoInput.SendMouseMovementMessages = true;
Game.ProtoInput.SendKeyboardButtonMessages = true;
Game.ProtoInput.XinputHook = false;
Game.ProtoInput.UseOpenXinput = false;
Game.ProtoInput.UseDinputRedirection = false;
Game.ProtoInput.DinputDeviceHook = false;
Game.ProtoInput.DinputHookAlsoHooksGetDeviceState = false;
Game.ProtoInput.EnableFocusMessageLoop = false;
//Game.ProtoInput.FocusLoopIntervalMilliseconds = 40000;
//Game.ProtoInput.FocusLoop_WM_ACTIVATE = true;
//Game.ProtoInput.FocusLoop_WM_ACTIVATEAPP = true;
//Game.ProtoInput.FocusLoop_WM_NCACTIVATE = true;
//Game.ProtoInput.FocusLoop_WM_SETFOCUS = true;
//Game.ProtoInput.FocusLoop_WM_MOUSEACTIVATE = true;
Game.ProtoInput.BlockedMessages = [0x0008]; // Blocks WM_KILLFOCUS
Game.Play = function() {
var VideoConfig = Context.EnvironmentPlayer + Context.UserProfileConfigPath + "\\config.ini";
Context.ModifySaveFile(VideoConfig, VideoConfig, Nucleus.SaveType.INI, [
new Nucleus.IniSaveInfo("DISPLAY", "Resolution", Context.Width + "x" + Context.Height),
new Nucleus.IniSaveInfo("DISPLAY", "FullScreen", "OFF"),
new Nucleus.IniSaveInfo("DISPLAY", "AdjustAspect", "ON")
]);
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);
var nolay = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\steam_settings\\disable_overlay.txt";
var lines = [""];
Context.WriteTextFile(nolay, lines);
if (System.IO.File.Exists(Context.OrigRootFolder + "\\plugins\\QOL.dll")) {
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]
);
} else {
System.IO.File.Copy(System.IO.Path.Combine(Context.RootInstallFolder, "Launcher.exe"), System.IO.Path.Combine(Context.RootFolder, "Launcher.exe"), true);
System.IO.File.Copy(System.IO.Path.Combine(Context.RootInstallFolder, "re5dx9.exe"), System.IO.Path.Combine(Context.RootFolder, "re5dx9.exe"), true);
}
var fix = Context.Options["Fix"];
var fov = Context.Options["Fov"];
var filter = Context.Options["Filter"];
if (fix == "Yes") {
if (System.IO.File.Exists(Context.OrigRootFolder + "\\plugins\\QOL.dll")) {
var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\plugins\\RE5Fix.dll");
var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "xinput1_3.dll");
System.IO.File.Copy(savePkgOrigin, savePath, true);
var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\RE5Fix.ini");
var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "RE5Fix.ini");
System.IO.File.Copy(savePkgOrigin, savePath, true);
var VideoConfig = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\RE5Fix.ini");
Context.ModifySaveFile(VideoConfig, VideoConfig, Nucleus.SaveType.INI, [
new Nucleus.IniSaveInfo("Custom Resolution", "Width", Context.Width),
new Nucleus.IniSaveInfo("Custom Resolution", "Height", Context.Height)
]);
} else {
var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\dinput8.dll");
var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "xinput1_3.dll");
System.IO.File.Copy(savePkgOrigin, savePath, true);
var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\RE5Fix.ini");
var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "RE5Fix.ini");
System.IO.File.Copy(savePkgOrigin, savePath, true);
var VideoConfig = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\RE5Fix.ini");
Context.ModifySaveFile(VideoConfig, VideoConfig, Nucleus.SaveType.INI, [
new Nucleus.IniSaveInfo("Custom Resolution", "Width", Context.Width),
new Nucleus.IniSaveInfo("Custom Resolution", "Height", Context.Height)
]);
}
}
if (fix == "No") {
}
if (fov == "Default") {
} else {
var VideoConfig = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\RE5Fix.ini");
Context.ModifySaveFile(VideoConfig, VideoConfig, Nucleus.SaveType.INI, [new Nucleus.IniSaveInfo("Increase FOV", "Enabled", true), new Nucleus.IniSaveInfo("Increase FOV", "Value", fov)]);
}
if (filter == "Yes") {
var VideoConfig = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\RE5Fix.ini");
Context.ModifySaveFile(VideoConfig, VideoConfig, Nucleus.SaveType.INI, [new Nucleus.IniSaveInfo("Remove Colour Filter", "Enabled", true)]);
}
if (filter == "No") {
}
if (Context.HasKeyboardPlayer == true) {
Game.ProtoInput.RegisterRawInputHook = true;
} else {
Game.ProtoInput.RegisterRawInputHook = false;
}
Game.ProtoInput.OnInputLocked = function() {
for (var i = 0; i < PlayerList.Count; i++) {
var player = PlayerList[i];
ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.GetCursorPosHookID);
ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.SetCursorPosHookID);
ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.GetKeyStateHookID);
ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.GetAsyncKeyStateHookID);
ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.GetKeyboardStateHookID);
ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.CursorVisibilityStateHookID);
ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.GetRawInputDataHookID);
ProtoInput.EnableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.RawInputFilterID);
//Avoid the mouse move filter unless absolutely necessary as it can massively affect performance if the game gets primary input from mouse move messages
//ProtoInput.EnableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.MouseMoveFilterID);
ProtoInput.EnableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.MouseActivateFilterID);
ProtoInput.EnableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.WindowActivateFilterID);
ProtoInput.EnableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.WindowActivateAppFilterID);
ProtoInput.EnableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.MouseWheelFilterID);
ProtoInput.EnableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.MouseButtonFilterID);
ProtoInput.EnableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.KeyboardButtonFilterID);
ProtoInput.SetDrawFakeCursor(player.ProtoInputInstanceHandle, true);
ProtoInput.StopFocusMessageLoop(player.ProtoInputInstanceHandle);
}
};
Game.ProtoInput.OnInputUnlocked = function() {
for (var i = 0; i < PlayerList.Count; i++) {
var player = PlayerList[i];
ProtoInput.UninstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.GetCursorPosHookID);
ProtoInput.UninstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.SetCursorPosHookID);
ProtoInput.UninstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.GetKeyStateHookID);
ProtoInput.UninstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.GetAsyncKeyStateHookID);
ProtoInput.UninstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.GetKeyboardStateHookID);
ProtoInput.UninstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.CursorVisibilityStateHookID);
ProtoInput.UninstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.GetRawInputDataHookID);
ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.FocusHooksHookID);
ProtoInput.DisableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.RawInputFilterID);
ProtoInput.DisableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.MouseMoveFilterID);
ProtoInput.DisableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.MouseActivateFilterID);
ProtoInput.DisableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.WindowActivateFilterID);
ProtoInput.DisableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.WindowActivateAppFilterID);
ProtoInput.DisableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.MouseWheelFilterID);
ProtoInput.DisableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.MouseButtonFilterID);
ProtoInput.DisableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.KeyboardButtonFilterID);
ProtoInput.SetDrawFakeCursor(player.ProtoInputInstanceHandle, false);
ProtoInput.StartFocusMessageLoop(player.ProtoInputInstanceHandle, 5000, true, true, false, false, false);
}
};
};