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 2

Release notes

sretching fix and patch.

Released
Size
5.7 MB
Downloads
77
Check
Verified
SHA-256
96179365654d1fd641cb297b9da60f077d59c225a61722626a3aa43ce7972c83
Download v2 (.nc)All versions

Files 3

PathSize
DragonQuestB2/DQB2_EU.jdf14.4 MB
DragonQuestB2/JDiff.exe869 KB
handler.js5.8 KB

handler.js

Plain text
Hub.Handler.Version = 2; // Released at https://hub.splitscreen.me/ on Sun Feb 07 2021 23:09:02 GMT+0000 (UTC).
Hub.Handler.Id = "8MzyqkLztCzTmhQf2";
Hub.Maintainer.Name = "Talos91";
Hub.Maintainer.Id = "eeL7HAz8zJovChWw4";

var answers1 = ["Yes", "No"];
var answers2 = ["Yes", "No"];
Game.AddOption("Patch Exe? ONLY select yes if you have the legit steam game.", "Just run once if you do. Select yes, wait for the exe to patch, close Nucleus.", "Legit", answers1);
Game.AddOption("Change aspect ratio to match the window resolution?", "Fixes the stretching in split-screen. Tested with 1920x1080 res.", "AR", answers2);

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.DInputForceDisable = true;
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. You will get a Nucleus error the first time you select the patch exe UI option just click ok and make sure you close Nucleus correctly, the game will launch correctly after that.";
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 legit = Context.Options["Legit"];
  var ar = Context.Options["AR"];
  var Gamefolder = System.IO.Path.Combine(Game.Folder);

  if (legit == "Yes") {
    if (!System.IO.File.Exists(Gamefolder + "\\DQB2_EU.exe")) {
      Game.PauseBetweenContextAndLaunch = 10;

      var savePath = (Context.SavePath = Gamefolder + "\\DQB2_EUog.exe");
      var savePkgOrigin = System.IO.Path.Combine(Context.RootInstallFolder, "DQB2_EU.exe");
      System.IO.File.Copy(savePkgOrigin, savePath, true);

      var Bat = Gamefolder + "\\start.bat";
      var lines = ["jdiff.exe -u DQB2_EUog.exe DQB2_EU.jdf DQB2_EU.exe"];
      Context.WriteTextFile(Bat, lines);

      Context.RunAdditionalFiles([Gamefolder + "\\start.bat"], false, 1);
    } else {
    }
  }

  if (legit == "No") {
    if (!System.IO.File.Exists(Gamefolder + "\\DQB2_EU.exe")) {
      var savePath = (Context.SavePath = Gamefolder + "\\DQB2_EU.exe");
      var savePkgOrigin = System.IO.Path.Combine(Context.RootInstallFolder, "DQB2_EU.exe");
      System.IO.File.Copy(savePkgOrigin, savePath, true);
    } else {
    }
  }

  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(Game.Folder, "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(Game.Folder, "DQB2_EU.exe"), System.IO.Path.Combine(Context.RootFolder, "DQB2_EU.exe"), [0x06, 0x00, 0x00, 0x80, 0x07], [0x06, 0x00, 0x00, 0xc0, 0x03]);
    } else {
      var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\DQB2_EU.exe");
      var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "DQB2_EU.exe");
      System.IO.File.Copy(savePkgOrigin, savePath, true);
    }
  }

  if (ar == "No") {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\DQB2_EU.exe");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "DQB2_EU.exe");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }
};