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

Dragon Quest Builders 2 · handler “DragonQuestB2”

Version 3

Release notes

Updated for latest steam version

Released
Size
1.7 KB
Downloads
259
Check
Verified
SHA-256
03872d66be845aa6a802e73d767e6be0bc0ef9a48654d082424b2f2dd70ae3eb
Download v3 (.nc)All versions

Files 1

PathSize
handler.js4.2 KB

handler.js

Plain text
Hub.Handler.Version = 3; // Released at https://hub.splitscreen.me/ on Thu May 27 2021 06:07:32 GMT+0000 (UTC).
Hub.Handler.Id = "8MzyqkLztCzTmhQf2";
Hub.Maintainer.Name = "Talos91";
Hub.Maintainer.Id = "eeL7HAz8zJovChWw4";

var answers1 = ["Yes", "No"];
Game.AddOption("Edit resolution to match the window size?", "Fixes the stretching in split-screen. Tested with 1920x1080 monitor res only.", "AR", answers1);

Game.KillMutex = ["BLD_MUTEX"];
Game.FileSymlinkExclusions = ["steam_api64.dll", "steam_appid.txt", "winmm.dll", "DQB2_EU.exe", "GameLauncher.exe"];
Game.FileSymlinkCopyInstead = ["KTSLXA2C.dll", "KTSLXA27.dll", "KTSLXA29.dll", "LINKDATA.idx", "LINKDATA_PATCH.idx", "Config.exe"];
Game.NeedsSteamEmulation = false;
Game.UseGoldberg = true;
Game.GoldbergExperimental = true;
Game.HandlerInterval = 100;
Game.SymlinkExe = false;
Game.SymlinkGame = true;
Game.SymlinkFolders = true;
Game.SupportsKeyboard = true;
Game.ExecutableName = "DQB2_EU.exe";
Game.SteamID = "1072420";
Game.GUID = "Dragon Quest Builders 2";
Game.GameName = "DRAGON QUEST BUILDERS 2";
Game.MaxPlayers = 4;
Game.MaxPlayersOneMonitor = 4;
Game.LauncherTitle = "";
Game.HideTaskbar = false;
Game.Hook.ForceFocus = true;
Game.Hook.ForceFocusWindowName = "DRAGON QUEST BUILDERS 2";
Game.PreventWindowDeactivation = true;
Game.KeyboardPlayerSkipPreventWindowDeactivate = true;
Game.HookInit = true;
Game.Hook.DInputEnabled = false;
Game.Hook.XInputEnabled = true;
Game.Hook.XInputReroute = false;
Game.XInputPlusDll = ["xinput1_3.dll"];
Game.Hook.CustomDllEnabled = false;
Game.UserProfileSavePath = "Documents\\My Games\\DRAGON QUEST BUILDERS II\\Steam";
Game.PlayerSteamIDs = ["76561198422152817"];
Game.Description =
  "Co-op unlocks when you complete the first tablet three targets after returning to the first island from Furrowfield. You can access each instance save from the app, after the first launch click game options/open user profile save path in the UI. If you get uneven fps in the instances try alt tabbing to the nucleuscoop app window when using multiple gamepads only, the game windows will still remain on top. Open the menu in all instances if the keyboard player can not move the cursor.";
Game.PauseBetweenStarts = 30;

Game.Play = function() {
  Context.EditRegKey("HKEY_CURRENT_USER", "SOFTWARE\\SQUARE ENIX\\DRAGON QUEST BUILDERS 2\\Graphic Setting", "WindowMode", 2, Nucleus.RegType.DWord);

  var filePath = (Context.filePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\steam_settings");
  System.IO.Directory.CreateDirectory(filePath);

  var nolay = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\steam_settings\\disable_overlay.txt";
  var lines = [""];
  Context.WriteTextFile(nolay, lines);

  if (Context.HasKeyboardPlayer == true) {
  } else {
    Game.SetForegroundWindowElsewhere = true;
  }

  var ar = Context.Options["AR"];

  if (ar == "Yes") {
    if (Context.AspectRatioDecimal > 1.8) {
      Context.EditRegKey("HKEY_CURRENT_USER", "SOFTWARE\\SQUARE ENIX\\DRAGON QUEST BUILDERS 2\\Graphic Setting", "Resolution", 6, Nucleus.RegType.DWord);

      Context.PatchFile(
        System.IO.Path.Combine(Context.RootInstallFolder, "DQB2_EU.exe"),
        System.IO.Path.Combine(Context.RootFolder, "DQB2_EU.exe"),
        [0x03, 0x00, 0x00, 0x38, 0x04, 0x00],
        [0x03, 0x00, 0x00, 0x1c, 0x02, 0x00]
      );
    } else if (Context.AspectRatioDecimal < 1.2) {
      Context.EditRegKey("HKEY_CURRENT_USER", "SOFTWARE\\SQUARE ENIX\\DRAGON QUEST BUILDERS 2\\Graphic Setting", "Resolution", 6, Nucleus.RegType.DWord);

      Context.PatchFile(
        System.IO.Path.Combine(Context.RootInstallFolder, "DQB2_EU.exe"),
        System.IO.Path.Combine(Context.RootFolder, "DQB2_EU.exe"),
        [0x06, 0x00, 0x00, 0x80, 0x07],
        [0x06, 0x00, 0x00, 0xc0, 0x03]
      );
    } else {
      System.IO.File.Copy(System.IO.Path.Combine(Context.RootInstallFolder, "DQB2_EU.exe"), System.IO.Path.Combine(Context.RootFolder, "DQB2_EU.exe"), true);
    }
  }

  if (ar == "No") {
    System.IO.File.Copy(System.IO.Path.Combine(Context.RootInstallFolder, "DQB2_EU.exe"), System.IO.Path.Combine(Context.RootFolder, "DQB2_EU.exe"), true);
  }
};