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

Sacred 3 · handler “Sacred3”

Version 1

Release notes

First Release

Released
Size
1.5 KB
Downloads
66
Check
Verified
SHA-256
af43147271ac00531f006b0397d27fd8d7c704dc34b510f45fbfa59720262eae
Download v1 (.nc)All versions

Files 1

PathSize
handler.js3.5 KB

handler.js

Plain text
Hub.Handler.Version = 1; // Released at https://hub.splitscreen.me/ on Thu Feb 13 2020 10:49:18 GMT+0000 (UTC).
Hub.Handler.Id = "NHGAXsj7jQpmgDcft";
Hub.Maintainer.Name = "Talos91";
Hub.Maintainer.Id = "eeL7HAz8zJovChWw4";

Game.FileSymlinkExclusions = ["steam_api.dll", "steam_appid.txt", "steam_interfaces.txt"];
Game.NeedsSteamEmulation = false;
Game.UseGoldberg = true;
Game.HandlerInterval = 100;
Game.SymlinkExe = false;
Game.SymlinkGame = true;
Game.SymlinkFolders = true;
Game.SupportsKeyboard = true;
Game.ExecutableName = "sacred3.exe";
Game.SteamID = "247950";
Game.GUID = "Sacred 3";
Game.GameName = "Sacred 3";
Game.MaxPlayers = 4;
Game.MaxPlayersOneMonitor = 4;
Game.LauncherTitle = "";
Game.HideTaskbar = false;
Game.Hook.ForceFocus = true;
Game.Hook.ForceFocusWindowName = "Sacred 3";
Game.HasDynamicWindowTitle = true;
Game.Hook.DInputEnabled = false;
Game.Hook.DInputForceDisable = true;
Game.Hook.XInputEnabled = true;
Game.Hook.XInputReroute = false;
Game.Hook.CustomDllEnabled = false;
Game.XInputPlusDll = ["xinput1_3.dll"];
//Game.PlayersPerInstance = 2;
Game.HookFocus = true;
Game.SetWindowHookStart = true;
Game.Description =
  "Select different save slot per instance. To connect the instances after starting the first stage exit to lobby in all and you can join from there using the friends option. If you want to add one local player per instance enable the GamePlayersPerInstance line in the script, you can have 4 players on only two instances that way.";
Game.PauseBetweenStarts = 20;

Game.Play = function() {
  var username = System.Environment.UserName;
  var VideoConfig = "C:\\Users\\" + username + "\\Saved Games\\sacred3.cfg";
  Context.ModifySaveFile(VideoConfig, VideoConfig, Nucleus.SaveType.INI, [
    new Nucleus.IniSaveInfo("DisplaySettings", "ScreenResolutionWidth", Context.Width),
    new Nucleus.IniSaveInfo("DisplaySettings", "ScreenResolutionHeight", Context.Height),
    new Nucleus.IniSaveInfo("DisplaySettings", "UseFullscreenMode", "false")
  ]);

  var autoExec = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\steam_interfaces.txt";
  var lines = [
    "SteamClient012",
    "SteamGameServer011",
    "SteamGameServerStats001",
    "SteamUser016",
    "SteamFriends013",
    "SteamUtils005",
    "SteamMatchMaking009",
    "SteamMatchMakingServers002",
    "STEAMUSERSTATS_INTERFACE_VERSION011",
    "STEAMAPPS_INTERFACE_VERSION005",
    "SteamNetworking005",
    "STEAMREMOTESTORAGE_INTERFACE_VERSION010",
    "STEAMSCREENSHOTS_INTERFACE_VERSION002",
    "STEAMHTTP_INTERFACE_VERSION002",
    "STEAMUNIFIEDMESSAGES_INTERFACE_VERSION001"
  ];

  Context.WriteTextFile(autoExec, lines);

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

  var autoExec = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\steam_settings\\DLC.txt";
  var lines = [
    "261160=Sacred 3: Underworld Story ",
    "261161=Sacred 3: Orcland Story ",
    "279110=Sacred 3: Malakhim Hero ",
    "279111=Sacred 3: Orc of Thrones ",
    "279112=Sacred 3: Z4ngr13f Weapon Spirit "
  ];

  Context.WriteTextFile(autoExec, lines);

  if (Player.Owner.IsDualHorizontal()) {
    //patch widescreen
    Context.PatchFile(System.IO.Path.Combine(Context.RootInstallFolder, "sacred3.exe"), System.IO.Path.Combine(Context.RootFolder, "sacred3.exe"), [0x39, 0x8e, 0xe3, 0x3f], [0xcd, 0x90, 0x19, 0x40]);
  }
};