Divinity: Original Sin II - Definitive Edition · handler “DOSIIDE”
Version 2
Release notes
UI option to select players per instance. 2 scripts not needed anymore.
- Released
- Size
- 1.7 KB
- Downloads
- 2,451
- Check
- Verified
- SHA-256
- 2e1cc1fefd94d9baf077492519997041585696dd93122f004ed6b937be94d1d9
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:14:51 GMT+0000 (UTC).
Hub.Handler.Id = "pSEDe2grDxuP6DJ6Y";
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 = ["PxFoundation_x64.dll", "PxPvdSDK_x64.dll", "PhysX3_x64.dll"];
Game.GameName = "Divinity Original Sin 2 - Definitive Edition";
Game.HandlerInterval = 100;
Game.SymlinkExe = false;
Game.SymlinkGame = true;
Game.SupportsKeyboard = false;
Game.ExecutableName = "eocapp.exe";
Game.SteamID = "435150";
Game.GUID = "Divinity Original Sin 2 DE";
Game.MaxPlayers = 4;
Game.MaxPlayersOneMonitor = 4;
Game.BinariesFolder = "bin";
Game.NeedsSteamEmulation = false;
Game.LauncherTitle = "";
Game.SupportsPositioning = true;
Game.HideTaskbar = false;
Game.Hook.ForceFocus = true;
Game.ForceFinishOnPlay = true;
Game.StartArguments = "";
Game.Hook.ForceFocusWindowName = "DOS II : DE";
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 2 Definitive Edition\\graphicSettings.lsx";
var dict = ['57|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) + "\\bin\\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) + "\\bin\\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) + "\\bin\\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) + "\\bin\\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") {
}
};