Divinity: Original Sin - Enhanced Edition · handler “DOSEE”
Version 2
Release notes
UI option to select players per instance. 2 scripts not needed anymore.
- Released
- Size
- 1.7 KB
- Downloads
- 548
- Check
- Verified
- SHA-256
- 3a6f87851768e79b2ef309c2b62dffdc7d5ec5e4e1dea9bd819a195afe5c142c
Files 1
| Path | Size |
|---|---|
| handler.js | 5.6 KB |
handler.js
Plain textHub.Handler.Version = 2; // Released at https://hub.splitscreen.me/ on Thu Jul 23 2020 21:13:06 GMT+0000 (UTC).
Hub.Handler.Id = "nR2cuqYSe6SmPNEYW";
Hub.Maintainer.Name = "Talos91";
Hub.Maintainer.Id = "eeL7HAz8zJovChWw4";
var answers1 = ["Yes", "No"];
var answers2 = ["No", "Yes"];
Game.AddOption("Will you use the game native splitscreen?", "If yes launch only two horizontal instances, gamepads only.", "Native", answers1);
Game.AddOption("First instance two players and the other keyboards?", "Native split in the first and other keyboards.", "Mode", answers2);
Game.ExecutableContext = ["FxStudioRT_x64.dll"];
Game.GameName = "Divinity Original Sin Enhanced Edition";
Game.HandlerInterval = 100;
Game.SymlinkExe = false;
Game.SymlinkGame = true;
Game.SupportsKeyboard = false;
Game.ExecutableName = "eocapp.exe";
Game.SteamID = "373420";
Game.GUID = "Divinity Original Sin Enhanced Edition";
Game.MaxPlayers = 4;
Game.MaxPlayersOneMonitor = 4;
Game.BinariesFolder = "Shipping";
Game.NeedsSteamEmulation = false;
Game.LauncherTitle = "";
Game.SupportsPositioning = true;
Game.HideTaskbar = false;
Game.Hook.ForceFocus = true;
Game.ForceFinishOnPlay = true;
Game.StartArguments = "";
Game.Hook.ForceFocusWindowName = "DOS EE";
Game.HasDynamicWindowTitle = true;
Game.Hook.DInputEnabled = false;
Game.Hook.DInputForceDisable = true;
Game.Hook.XInputEnabled = true;
Game.Hook.XInputReroute = false;
Game.FakeFocus = true;
Game.HookFocus = true;
Game.Hook.CustomDllEnabled = false;
Game.XInputPlusDll = ["xinput1_4.dll"];
Game.Description =
"Press the END key in your keyboard to unlock the input when you finish playing. You can also use CTRL+Q to close Nucleus and all its instances. This script is designed for 2 players per instance using the game native splitscreen, so you can play with 4 players in only two instances of the game for better performance, so the first two gamepads will control the first instance and the other two gamepads the second, in the title screen just press start to add a local player in each instance, use different profile per player. If you want to have only 1 player per instance to use keyboards (native splitscreen only works with gamepads) select No in the UI option before pressing play in Nucleus.";
Game.PauseBetweenStarts = 30;
Game.SupportsMultipleKeyboardsAndMice = true;
Game.HookSetCursorPos = true;
Game.HookGetCursorPos = true;
Game.HookGetKeyState = true;
Game.HookGetAsyncKeyState = true;
Game.HookGetKeyboardState = true;
Game.HookFilterRawInput = false;
Game.HookFilterMouseMessages = true;
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 = true;
Game.LockInputToggleKey = 0x23;
Game.Play = function() {
var txtPath = Context.GetFolder(Nucleus.Folder.Documents) + "\\Larian Studios\\Divinity Original Sin Enhanced Edition\\graphicSettings.lsx";
var dict = ['52|value="1"|value="0" '];
Context.ReplacePartialLinesInTextFile(txtPath, dict);
var native = Context.Options["Native"];
var mode = Context.Options["Mode"];
if (Context.PlayerID == 0) {
if (native == "Yes") {
var savePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Shipping\\XinputPlus.ini";
Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [
new Nucleus.IniSaveInfo("ControllerNumber", "Controller1", "1"),
new Nucleus.IniSaveInfo("ControllerNumber", "Controller2", "2"),
new Nucleus.IniSaveInfo("ControllerNumber", "Controller3", "0"),
new Nucleus.IniSaveInfo("ControllerNumber", "Controller4", "0")
]);
}
if (mode == "Yes") {
var savePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Shipping\\XinputPlus.ini";
Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [
new Nucleus.IniSaveInfo("ControllerNumber", "Controller1", "1"),
new Nucleus.IniSaveInfo("ControllerNumber", "Controller2", "2"),
new Nucleus.IniSaveInfo("ControllerNumber", "Controller3", "0"),
new Nucleus.IniSaveInfo("ControllerNumber", "Controller4", "0")
]);
}
}
if (Context.PlayerID == 1) {
if (native == "Yes") {
var savePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Shipping\\XinputPlus.ini";
Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [
new Nucleus.IniSaveInfo("ControllerNumber", "Controller1", "3"),
new Nucleus.IniSaveInfo("ControllerNumber", "Controller2", "4"),
new Nucleus.IniSaveInfo("ControllerNumber", "Controller3", "0"),
new Nucleus.IniSaveInfo("ControllerNumber", "Controller4", "0")
]);
}
if (mode == "Yes") {
var savePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Shipping\\XinputPlus.ini";
Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [
new Nucleus.IniSaveInfo("ControllerNumber", "Controller1", "3"),
new Nucleus.IniSaveInfo("ControllerNumber", "Controller2", "0"),
new Nucleus.IniSaveInfo("ControllerNumber", "Controller3", "0"),
new Nucleus.IniSaveInfo("ControllerNumber", "Controller4", "0")
]);
}
}
if (native == "No") {
}
if (mode == "No") {
}
};