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

Alone in the Dark: Illumination · handler “AloneintheDark”

Version 4

Release notes

New UI option and fixes.

Released
Size
4.0 KB
Downloads
101
Check
Verified
SHA-256
33e49119cca5f4ff8525b2ebe0f3a5462909d17ce2869a3da079c6c9f362b343
Download v4 (.nc)All versions

Files 1

PathSize
handler.js25 KB

handler.js

Plain text
Hub.Handler.Version = 4; // Released at https://hub.splitscreen.me/ on Wed Feb 17 2021 04:24:30 GMT+0000 (UTC).
Hub.Handler.Id = "pFZYZhGGS3bPwbgye";
Hub.Maintainer.Name = "Talos91";
Hub.Maintainer.Id = "eeL7HAz8zJovChWw4";

var answers1 = ["Gamepad_FaceButton_Bottom", "Gamepad_FaceButton_Left", "Gamepad_FaceButton_Right", "Gamepad_FaceButton_Top", "F"];
var answers2 = ["Yes", "No"];
var answers3 = ["No", "Yes"];
var answers4 = ["No", "1", "2", "3", "4"];
var answers5 = ["No", "Yes"];
Game.AddOption("Map interact to a gamepad button.", "The interact function is not mappable to any controller button in-game.", "Inter", answers1);
Game.AddOption("Invert Y camera axis?", "Inverts the right stick Y axis default movement.", "Invert", answers2);
Game.AddOption("Use alternative focus method?", "Click last prompt until all instances are in-game as it disables m/kb input.", "Focus", answers3);
Game.AddOption("Unmap the Priest class meele button?", "Select the instance you'll use the Priest in to unmap this action.", "Priest", answers4);
Game.AddOption("Resize instances at the end?", "Allows you to customize all skills in 2 players vertical splitscreen.", "End", answers5);

Game.DirSymlinkExclusions = [
  "Dark\\Binaries\\Win64",
  "Engine\\Binaries\\ThirdParty\\Steamworks\\Steamv130\\Win64",
  "Dark\\Config",
  "Dark\\Content",
  "Dark\\Saved\\Config\\WindowsNoEditor",
  "Dark\\Content\\Movies",
  "Engine\\Config"
];
Game.FileSymlinkExclusions = [
  "steam_api64.dll",
  "steam_appid.txt",
  //"LoadingScreen.mp4",
  //"LoadingScreen.uasset",
  //"Startup.mp4",
  //"Startup.uasset",
  "Audio_TONY_StateTrigger.uasset"
];
Game.FileSymlinkCopyInstead = [
  "DefaultInput.ini",
  "DefaultEngine.ini",
  "GameUserSettings.ini",
  "BaseEngine.ini",
  "Engine.ini",
  "Dark.uproject",
  "B_ConstructObjective_BoatChain.uasset",
  "B_ConstructObjective_CopterRadio.uasset",
  "B_ConstructObjective_DoorChain.uasset",
  "B_ConstructObjective_DoorChain_Single.uasset",
  "B_ConstructObjective_Tires.uasset",
  "B_ConstructObjective_TruckFuel.uasset",
  "B_ConstructObjective_TruckKeys.uasset",
  "B_ConstructObjective_TruckKeys_Part.uasset",
  "B_RepairBoat.uasset",
  "B_RepairHelicopter.uasset",
  "B_RepairTruck.uasset",
  "CameraShake_CthulhuRockThrow.uasset",
  "ECharacterAbility.uasset",
  "LightBoxTrig_Bathroom_Blueprint.uasset",
  "muzzleFlash_smoke001_ADD.uasset",
  "ReplicatedHintBox.uasset",
  "GlobalShaderCache-PCD3D_SM4.bin",
  "GlobalShaderCache-PCD3D_SM5.bin"
];
Game.UseNucleusEnvironment = true;
Game.NeedsSteamEmulation = false;
Game.UseGoldberg = true;
Game.GoldbergNoLocalSave = true;
Game.HandlerInterval = 100;
Game.SymlinkExe = false;
Game.SymlinkGame = true;
Game.SymlinkFolders = true;
Game.SupportsKeyboard = true;
Game.ExecutableName = "Dark-Win64-Shipping.exe";
Game.SteamID = "275060";
Game.GUID = "Alone in the Dark Illumination";
Game.GameName = "Alone in the Dark: Illumination";
Game.MaxPlayers = 4;
Game.MaxPlayersOneMonitor = 4;
Game.BinariesFolder = "Dark\\Binaries\\Win64";
Game.LauncherTitle = "";
Game.Hook.ForceFocus = true;
Game.Hook.ForceFocusWindowName = "Alone in the Dark: Illumination";
Game.HookFocus = true;
Game.SetWindowHookStart = true;
Game.ResetWindows = true;
Game.SetForegroundWindowElsewhere = true;
Game.Hook.CustomDllEnabled = false;
Game.Hook.DInputEnabled = false;
Game.Hook.DInputForceDisable = true;
Game.Hook.XInputEnabled = true;
Game.Hook.XInputReroute = false;
Game.UserProfileSavePath = "AppData\\Roaming\\Goldberg SteamEmu Saves\\275060";
Game.Description =
  "IMPORTANT: Use the mouse to navigate the main menu. Host a multiplayer lobby in one instance and the others can join, click refresh if you do not see the lobby. Once all join the same lobby, click ready in all and right after pressing start game in the host instance click ok on the Nucleus prompt that shows at the end, do it like this for focus to work. Do not alt-tab or click on a gamepad instance after that or you will lose focus, only alt-tab to the keyboard instance if you use one, it will be always the last instance that opens. After finishing a level or dying make sure all instances are unfocused before the new game starts for the gamepad background input to work, you can do this by alt-tabbing to the Nucleus Co-op app window. Use the alternative focus Nucleus UI option if this does not work with xbox one gamepads for example, for this one the mouse/kb input disables for the gamepad instances after you press the last prompt. If you want the instances to resize correctly you need to create custom resolutions in your AMD/Nvidia/Intel panel (For example: 960x1080, 960x540, 1920x540 etc.) so the game can see and use them. The interact function is not mappable to any gamepad button in-game unless you edit an .ini file, Nucleus edits this .ini automatically, select the button to map to this function in the Nucleus UI option. If you already made that .ini edit in your main files select F in the UI option. You can remap your gamepad buttons in the game input settings if you want to change the default gamepad mappings. Reduce graphic settings like textures and shadows to improve performance. The Priest gun bashing crashes the game, this is a bug with latest version of the game, unmap this action using the UI option if you use the Priest. Use the resize at the end UI option if the skills menu gets cut in vertical splitscreen for 2 players so you can customize all skills before the instances resize.";
Game.KeepSymLinkOnExit = true;
Game.PromptBetweenInstances = true;
Game.PauseBetweenStarts = 30;

Game.Play = function() {
  var Args = (Context.Args = " -WindowedFullscreen " + " -AlwaysFocus " + " -NOSCREENMESSAGES " + " -ResX= " + Context.Width + " -ResY= " + Context.Height);
  Context.StartArguments = Args;

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

  var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Dark\\Binaries\\Win64\\xinput1_3.dll");
  var savePkgOrigin = System.IO.Path.Combine(Context.NucleusFolder, "utils\\XInputPlus\\x64\\xinput1_3.dl_");
  System.IO.File.Copy(savePkgOrigin, savePath, true);

  var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Dark\\Binaries\\Win64\\xinput9_1_0.dll");
  var savePkgOrigin = System.IO.Path.Combine(Context.NucleusFolder, "utils\\XInputPlus\\x64\\xinput1_3.dl_");
  System.IO.File.Copy(savePkgOrigin, savePath, true);

  var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Dark\\Saved\\Config\\WindowsNoEditor\\GameUserSettings.ini");
  Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [
    new Nucleus.IniSaveInfo("/Script/Dark.DarkUserSettings", "bUseDesktopResolutionForFullscreen", "False"),
    new Nucleus.IniSaveInfo("/Script/Dark.DarkUserSettings", "FullscreenMode", 1)
  ]);

  var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Engine\\Config\\BaseEngine.ini");
  Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [new Nucleus.IniSaveInfo("/Script/Engine.Engine", "bPauseOnLossOfFocus", "false")]);

  if (Context.AspectRatioDecimal > 1.8) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Engine\\Config\\BaseEngine.ini");
    Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [new Nucleus.IniSaveInfo("/Script/Engine.LocalPlayer", "AspectRatioAxisConstraint", "AspectRatio_MaintainYFOV")]);
  } else if (Context.AspectRatioDecimal < 1.2) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Engine\\Config\\BaseEngine.ini");
    Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [new Nucleus.IniSaveInfo("/Script/Engine.LocalPlayer", "AspectRatioAxisConstraint", "AspectRatio_MaintainXFOV")]);
  } else {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Engine\\Config\\BaseEngine.ini");
    Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [new Nucleus.IniSaveInfo("/Script/Engine.LocalPlayer", "AspectRatioAxisConstraint", "AspectRatio_MaintainXFOV")]);
  }

  if (Context.IsKeyboardPlayer) {
    Game.KeepSymLinkOnExit = false;

    var savePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Dark\\Binaries\\Win64\\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")
    ]);

    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Dark\\Saved\\Config\\WindowsNoEditor\\GameUserSettings.ini";
    var dict = [
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="MoveForward",bIsAxis=True,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="MoveForward",bIsAxis=True,AxisScale=1.000000,BoundKey=W)',
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="MoveBackward",bIsAxis=True,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="MoveBackward",bIsAxis=True,AxisScale=1.000000,BoundKey=S)',
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="MoveLeft",bIsAxis=True,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="MoveLeft",bIsAxis=True,AxisScale=1.000000,BoundKey=A)',
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="MoveRight",bIsAxis=True,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="MoveRight",bIsAxis=True,AxisScale=1.000000,BoundKey=D)',
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="Sprint",bIsAxis=False,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="Sprint",bIsAxis=False,AxisScale=1.000000,BoundKey=LeftShift)',
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="Jump",bIsAxis=False,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="Jump",bIsAxis=False,AxisScale=1.000000,BoundKey=SpaceBar)',
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="Reload",bIsAxis=False,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="Reload",bIsAxis=False,AxisScale=1.000000,BoundKey=R)',
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="Fire",bIsAxis=False,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="Fire",bIsAxis=False,AxisScale=1.000000,BoundKey=LeftMouseButton)',
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="Aim",bIsAxis=False,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="Aim",bIsAxis=False,AxisScale=1.000000,BoundKey=RightMouseButton)',
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="AltFire",bIsAxis=False,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="AltFire",bIsAxis=False,AxisScale=1.000000,BoundKey=E)',
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="Bash",bIsAxis=False,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="Bash",bIsAxis=False,AxisScale=1.000000,BoundKey=Q)',
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="SwitchToNextInventory",bIsAxis=False,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="SwitchToNextInventory",bIsAxis=False,AxisScale=1.000000,BoundKey=MouseScrollUp)',
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="SwitchToPreviousIventory",bIsAxis=False,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="SwitchToPreviousIventory",bIsAxis=False,AxisScale=1.000000,BoundKey=MouseScrollDown)',
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="DropCarriedObject",bIsAxis=False,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="DropCarriedObject",bIsAxis=False,AxisScale=1.000000,BoundKey=G)',
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="ActivateAbilityZero",bIsAxis=False,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="ActivateAbilityZero",bIsAxis=False,AxisScale=1.000000,BoundKey=One)',
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="ActivateAbilityOne",bIsAxis=False,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="ActivateAbilityOne",bIsAxis=False,AxisScale=1.000000,BoundKey=Two)',
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="ActivateAbilityTwo",bIsAxis=False,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="ActivateAbilityTwo",bIsAxis=False,AxisScale=1.000000,BoundKey=Three)',
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="ActivateAbilityThree",bIsAxis=False,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="ActivateAbilityThree",bIsAxis=False,AxisScale=1.000000,BoundKey=Four)'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);
  } else {
    var savePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Dark\\Binaries\\Win64\\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)
    ]);
  }

  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Dark\\Content\\Audio_TONY_StateTrigger.uasset")) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Dark\\Content\\Audio_TONY_StateTrigger.uasset");
    var savePkgOrigin = System.IO.Path.Combine(Context.OrigRootFolder, "Dark\\Content\\Audio_TONY_StateTrigger.uasset");
    System.IO.File.Copy(savePkgOrigin, savePath, true);

    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Dark\\Saved\\Config\\WindowsNoEditor\\GameUserSettings.ini");
    Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [new Nucleus.IniSaveInfo("/Script/Dark.DarkUserSettings", "AimSensitivity", "2.900000")]);

    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Dark\\Saved\\Config\\WindowsNoEditor\\GameUserSettings.ini";
    var dict = [
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="MoveForward",bIsAxis=True,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="MoveForward",bIsAxis=True,AxisScale=1.000000,BoundKey=Gamepad_LeftStick_Up)',
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="MoveBackward",bIsAxis=True,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="MoveBackward",bIsAxis=True,AxisScale=1.000000,BoundKey=Gamepad_LeftStick_Down)',
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="MoveLeft",bIsAxis=True,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="MoveLeft",bIsAxis=True,AxisScale=1.000000,BoundKey=Gamepad_LeftStick_Left)',
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="MoveRight",bIsAxis=True,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="MoveRight",bIsAxis=True,AxisScale=1.000000,BoundKey=Gamepad_LeftStick_Right)',
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="Sprint",bIsAxis=False,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="Sprint",bIsAxis=False,AxisScale=1.000000,BoundKey=Gamepad_FaceButton_Left)',
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="Jump",bIsAxis=False,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="Jump",bIsAxis=False,AxisScale=1.000000,BoundKey=Gamepad_LeftThumbstick)',
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="Reload",bIsAxis=False,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="Reload",bIsAxis=False,AxisScale=1.000000,BoundKey=Gamepad_FaceButton_Right)',
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="Fire",bIsAxis=False,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="Fire",bIsAxis=False,AxisScale=1.000000,BoundKey=Gamepad_RightTrigger)',
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="Aim",bIsAxis=False,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="Aim",bIsAxis=False,AxisScale=1.000000,BoundKey=Gamepad_LeftTrigger)',
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="AltFire",bIsAxis=False,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="AltFire",bIsAxis=False,AxisScale=1.000000,BoundKey=Gamepad_RightShoulder)',
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="Bash",bIsAxis=False,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="Bash",bIsAxis=False,AxisScale=1.000000,BoundKey=Gamepad_FaceButton_Top)',
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="SwitchToNextInventory",bIsAxis=False,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="SwitchToNextInventory",bIsAxis=False,AxisScale=1.000000,BoundKey=Gamepad_RightThumbstick)',
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="SwitchToPreviousIventory",bIsAxis=False,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="SwitchToPreviousIventory",bIsAxis=False,AxisScale=1.000000,BoundKey=Gamepad_LeftShoulder)',
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="DropCarriedObject",bIsAxis=False,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="DropCarriedObject",bIsAxis=False,AxisScale=1.000000,BoundKey=Gamepad_Special_Left)',
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="ActivateAbilityZero",bIsAxis=False,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="ActivateAbilityZero",bIsAxis=False,AxisScale=1.000000,BoundKey=Gamepad_DPad_Down)',
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="ActivateAbilityOne",bIsAxis=False,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="ActivateAbilityOne",bIsAxis=False,AxisScale=1.000000,BoundKey=Gamepad_DPad_Up)',
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="ActivateAbilityTwo",bIsAxis=False,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="ActivateAbilityTwo",bIsAxis=False,AxisScale=1.000000,BoundKey=Gamepad_DPad_Left)',
      Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="ActivateAbilityThree",bIsAxis=False,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
        '|InputBinds=(ActionName="ActivateAbilityThree",bIsAxis=False,AxisScale=1.000000,BoundKey=Gamepad_DPad_Right)'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);
  } else {
  }

  var inter = "Inter";
  var invert = Context.Options["Invert"];
  var focus = Context.Options["Focus"];
  var priest = Context.Options["Priest"];
  var end = Context.Options["End"];

  if (Context.IsKeyboardPlayer) {
    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Dark\\Config\\DefaultInput.ini";
    var dict = [
      Context.FindLineNumberInTextFile(txtPath, '+ActionMappings=(ActionName="Interact",Key=F,bShift=False,bCtrl=False,bAlt=False,bCmd=False)', Nucleus.SearchType.StartsWith) +
        '|+ActionMappings=(ActionName="Interact",Key=F,bShift=False,bCtrl=False,bAlt=False,bCmd=False)'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);
  } else {
    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Dark\\Config\\DefaultInput.ini";
    var dict = [
      Context.FindLineNumberInTextFile(txtPath, '+ActionMappings=(ActionName="Interact",Key=F,bShift=False,bCtrl=False,bAlt=False,bCmd=False)', Nucleus.SearchType.StartsWith) +
        '|+ActionMappings=(ActionName="Interact",Key=' +
        Context.Options[inter] +
        ",bShift=False,bCtrl=False,bAlt=False,bCmd=False)"
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);
  }

  if (invert == "Yes") {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Dark\\Saved\\Config\\WindowsNoEditor\\GameUserSettings.ini");
    Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [new Nucleus.IniSaveInfo("/Script/Dark.DarkUserSettings", "bInvertY", "True")]);
  }

  if (invert == "No") {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Dark\\Saved\\Config\\WindowsNoEditor\\GameUserSettings.ini");
    Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [new Nucleus.IniSaveInfo("/Script/Dark.DarkUserSettings", "bInvertY", "False")]);
  }

  if (focus == "Yes") {
    Game.ProcessChangesAtEnd = true;
    Game.PromptProcessChangesAtEnd = true;
    Game.PreventWindowDeactivation = true;
    Game.KeyboardPlayerSkipPreventWindowDeactivate = true;
    Game.PromptBetweenInstances = false;
  }

  if (focus == "No") {
  }

  if (end == "Yes") {
    if (Player.Owner.IsDualVertical()) {
      Game.SetWindowHookStart = false;
      Game.SetWindowHook = true;
      Game.ProcessChangesAtEnd = true;
      Game.PromptProcessChangesAtEnd = true;
      Game.PromptBetweenInstances = false;
      Game.PromptAfterFirstInstance = true;
    }
  }
  if (end == "No") {
  }

  if (priest == "No") {
  }

  if (priest == "1") {
    if (Context.PlayerID == 0) {
      var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Dark\\Saved\\Config\\WindowsNoEditor\\GameUserSettings.ini";
      var dict = [
        Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="Bash",bIsAxis=False,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
          '|InputBinds=(ActionName="Bash",bIsAxis=False,AxisScale=1.000000,BoundKey=)'
      ];
      Context.ReplaceLinesInTextFile(txtPath, dict);
    }
  }
  if (priest == "2") {
    if (Context.PlayerID == 1) {
      var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Dark\\Saved\\Config\\WindowsNoEditor\\GameUserSettings.ini";
      var dict = [
        Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="Bash",bIsAxis=False,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
          '|InputBinds=(ActionName="Bash",bIsAxis=False,AxisScale=1.000000,BoundKey=)'
      ];
      Context.ReplaceLinesInTextFile(txtPath, dict);
    }
  }
  if (priest == "3") {
    if (Context.PlayerID == 2) {
      var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Dark\\Saved\\Config\\WindowsNoEditor\\GameUserSettings.ini";
      var dict = [
        Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="Bash",bIsAxis=False,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
          '|InputBinds=(ActionName="Bash",bIsAxis=False,AxisScale=1.000000,BoundKey=)'
      ];
      Context.ReplaceLinesInTextFile(txtPath, dict);
    }
  }
  if (priest == "4") {
    if (Context.PlayerID == 3) {
      var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Dark\\Saved\\Config\\WindowsNoEditor\\GameUserSettings.ini";
      var dict = [
        Context.FindLineNumberInTextFile(txtPath, 'InputBinds=(ActionName="Bash",bIsAxis=False,AxisScale=1.000000,BoundKey=', Nucleus.SearchType.StartsWith) +
          '|InputBinds=(ActionName="Bash",bIsAxis=False,AxisScale=1.000000,BoundKey=)'
      ];
      Context.ReplaceLinesInTextFile(txtPath, dict);
    }
  }
};