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

Attack on Titan 2 · handler “AoT-2”

Version 6

Release notes

aspect ratio UI option.

Released
Size
1.6 KB
Downloads
299
Check
Verified
SHA-256
0eb74fdf555d6e56c2f1a2b18d063a462ed81047fc93b51874c8858449603cc2
Download v6 (.nc)All versions

Files 1

PathSize
handler.js5.8 KB

handler.js

Plain text
Hub.Handler.Version = 6; // Released at https://hub.splitscreen.me/ on Sun Dec 25 2022 10:57:51 GMT+0000 (Coordinated Universal Time).
Hub.Handler.Id = "yoLsR78HEE8N4fFBA";
Hub.Maintainer.Name = "Talos91";
Hub.Maintainer.Id = "eeL7HAz8zJovChWw4";

var answers1 = ["No", "Yes"];
var answers2 = ["No", "Yes"];
Game.AddOption("Keep aspect ratio?", "Maintains the default aspect ratio to avoid stretching.", "Ratio", answers1);
Game.AddOption("Alternative method to open multiple instances?", "ONLY use if you have issues running multiple instances with the default.", "Hex", answers2);

Game.ExecutableContext = ["LINKDATA"];
Game.FileSymlinkExclusions = ["steam_api.dll", "steam_api64.dll", "steam_appid.txt", "xinput1_3.dll", "AOT2_EU.exe"];
Game.FileSymlinkCopyInstead = ["Launcher.exe"];
Game.UseNucleusEnvironment = true;
Game.NeedsSteamEmulation = false;
Game.UseGoldberg = true;
Game.HandlerInterval = 100;
Game.SymlinkExe = false;
Game.SymlinkGame = true;
Game.SymlinkFolders = true;
Game.ExecutableName = "AOT2_EU.exe";
Game.SteamID = "601050";
Game.GUID = "Attack on Titan 2";
Game.GameName = "Attack on Titan 2 - A.O.T.2";
Game.MaxPlayers = 8;
Game.MaxPlayersOneMonitor = 8;
Game.LauncherTitle = "";
Game.HideTaskbar = false;
Game.Hook.ForceFocus = true;
Game.Hook.ForceFocusWindowName = "Attack on Titan 2 / A.O.T. 2";
Game.Hook.DInputEnabled = false;
Game.Hook.XInputEnabled = true;
Game.Hook.XInputReroute = false;
Game.XInputPlusDll = ["xinput1_3.dll"];
Game.Hook.CustomDllEnabled = false;
Game.SupportsKeyboard = true;
Game.UserProfileSavePath = "Documents\\KoeiTecmo\\Attack on Titan2_AOT2\\SAVEDATA";
Game.Description =
  "Create a room in one instance and the others can join via RoomID. Each instance has its own saves that are copies of your original ones, so your original saves will not be overwritten. You can access these saves in the app, after the first launch click game options/open user profile save path in the UI.";
Game.PauseBetweenStarts = 30;

Game.Play = function() {
  Context.EditRegKey("HKEY_CURRENT_USER", "SOFTWARE\\KoeiTecmo\\Attack on Titan2_AOT2\\System", "ScreenMode", 0, Nucleus.RegType.DWord);

  if (Context.HasKeyboardPlayer == true) {
    //Context.EditRegKey("HKEY_CURRENT_USER", "SOFTWARE\\KoeiTecmo\\Attack on Titan2_AOT2\\System", "PreferInput", 0, Nucleus.RegType.DWord);
  } else {
    Game.SetForegroundWindowElsewhere = true;

    //Context.EditRegKey("HKEY_CURRENT_USER", "SOFTWARE\\KoeiTecmo\\Attack on Titan2_AOT2\\System", "PreferInput", 1, Nucleus.RegType.DWord);
  }

  var ratio = Context.Options["Ratio"];
  var hex = Context.Options["Hex"];

  if (ratio == "Yes") {
    Game.KeepMonitorAspectRatio = true;
    Game.IgnoreWindowBorderCheck = true;
    Context.HideDesktop();
    Context.HideTaskBar();
  }

  if (ratio == "No") {
  }

  if (hex == "Yes") {
    if (Context.PlayerID == 0) {
      System.IO.File.Copy(System.IO.Path.Combine(Context.RootInstallFolder, "AOT2_EU.exe"), System.IO.Path.Combine(Context.RootFolder, "AOT2_EU.exe"), true);
    }

    if (Context.PlayerID == 1) {
      //patch window class 52 45 56 45 4E 47 45 5F 45 55
      Context.PatchFile(
        System.IO.Path.Combine(Context.RootInstallFolder, "AOT2_EU.exe"),
        System.IO.Path.Combine(Context.RootFolder, "AOT2_EU.exe"),
        [0x52, 0x45, 0x56, 0x45, 0x4e, 0x47, 0x45, 0x5f, 0x45, 0x55],
        [0x52, 0x45, 0x56, 0x45, 0x4e, 0x47, 0x45, 0x5f, 0x45, 0x41]
      );
    }

    if (Context.PlayerID == 2) {
      Context.PatchFile(
        System.IO.Path.Combine(Context.RootInstallFolder, "AOT2_EU.exe"),
        System.IO.Path.Combine(Context.RootFolder, "AOT2_EU.exe"),
        [0x52, 0x45, 0x56, 0x45, 0x4e, 0x47, 0x45, 0x5f, 0x45, 0x55],
        [0x52, 0x45, 0x56, 0x45, 0x4e, 0x47, 0x45, 0x5f, 0x45, 0x42]
      );
    }

    if (Context.PlayerID == 3) {
      Context.PatchFile(
        System.IO.Path.Combine(Context.RootInstallFolder, "AOT2_EU.exe"),
        System.IO.Path.Combine(Context.RootFolder, "AOT2_EU.exe"),
        [0x52, 0x45, 0x56, 0x45, 0x4e, 0x47, 0x45, 0x5f, 0x45, 0x55],
        [0x52, 0x45, 0x56, 0x45, 0x4e, 0x47, 0x45, 0x5f, 0x45, 0x43]
      );
    }

    if (Context.PlayerID == 4) {
      Context.PatchFile(
        System.IO.Path.Combine(Context.RootInstallFolder, "AOT2_EU.exe"),
        System.IO.Path.Combine(Context.RootFolder, "AOT2_EU.exe"),
        [0x52, 0x45, 0x56, 0x45, 0x4e, 0x47, 0x45, 0x5f, 0x45, 0x55],
        [0x52, 0x45, 0x56, 0x45, 0x4e, 0x47, 0x45, 0x5f, 0x45, 0x44]
      );
    }

    if (Context.PlayerID == 5) {
      Context.PatchFile(
        System.IO.Path.Combine(Context.RootInstallFolder, "AOT2_EU.exe"),
        System.IO.Path.Combine(Context.RootFolder, "AOT2_EU.exe"),
        [0x52, 0x45, 0x56, 0x45, 0x4e, 0x47, 0x45, 0x5f, 0x45, 0x55],
        [0x52, 0x45, 0x56, 0x45, 0x4e, 0x47, 0x45, 0x5f, 0x45, 0x45]
      );
    }

    if (Context.PlayerID == 6) {
      Context.PatchFile(
        System.IO.Path.Combine(Context.RootInstallFolder, "AOT2_EU.exe"),
        System.IO.Path.Combine(Context.RootFolder, "AOT2_EU.exe"),
        [0x52, 0x45, 0x56, 0x45, 0x4e, 0x47, 0x45, 0x5f, 0x45, 0x55],
        [0x52, 0x45, 0x56, 0x45, 0x4e, 0x47, 0x45, 0x5f, 0x45, 0x46]
      );
    }

    if (Context.PlayerID == 7) {
      Context.PatchFile(
        System.IO.Path.Combine(Context.RootInstallFolder, "AOT2_EU.exe"),
        System.IO.Path.Combine(Context.RootFolder, "AOT2_EU.exe"),
        [0x52, 0x45, 0x56, 0x45, 0x4e, 0x47, 0x45, 0x5f, 0x45, 0x55],
        [0x52, 0x45, 0x56, 0x45, 0x4e, 0x47, 0x45, 0x5f, 0x45, 0x47]
      );
    }
  }

  if (hex == "No") {
    Game.HookInit = true;

    System.IO.File.Copy(System.IO.Path.Combine(Context.RootInstallFolder, "AOT2_EU.exe"), System.IO.Path.Combine(Context.RootFolder, "AOT2_EU.exe"), true);
  }
};