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

Terraria · handler “Terraria”

Version 4

Release notes

Config editing fix and resizing fixes.

Released
Size
1.4 KB
Downloads
4,009
Check
Verified
SHA-256
92dc92035afd90a04a6881ae26c1a779612799bf44aa3d00631642d21bf9b0cf
Download v4 (.nc)All versions

Files 1

PathSize
handler.js3.4 KB

handler.js

Plain text
Hub.Handler.Version = 4; // Released at https://hub.splitscreen.me/ on Thu Dec 03 2020 17:19:51 GMT+0000 (UTC).
Hub.Handler.Id = "J5vdAQFvS9i3AZCRE";
Hub.Maintainer.Name = "Talos91";
Hub.Maintainer.Id = "eeL7HAz8zJovChWw4";

Game.FileSymlinkExclusions = ["steam_appid.txt", "config.json"];
Game.FileSymlinkCopyInstead = ["steam_api.dll"];
Game.NeedsSteamEmulation = false;
Game.CreateSteamAppIdByExe = true;
Game.HandlerInterval = 100;
Game.SymlinkExe = false;
Game.SymlinkGame = true;
Game.SymlinkFolders = true;
Game.ExecutableName = "terraria.exe";
Game.SteamID = "105600";
Game.GUID = "Terraria";
Game.GameName = "Terraria";
Game.MaxPlayers = 4;
Game.MaxPlayersOneMonitor = 4;
Game.LauncherTitle = "";
Game.HideTaskbar = false;
Game.SupportsPositioning = true;
Game.Hook.ForceFocus = true;
Game.Hook.ForceFocusWindowName = "Terraria";
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.FakeFocus = true;
Game.HookFocus = true;
Game.SetWindowHook = true;
Game.ResetWindows = false;
Game.UserProfileConfigPath = "Documents\\My Games\\Terraria";
Game.UserProfileSavePath = "Documents\\My Games\\Terraria\\Players";
Game.Description =
  "When an instance opens move in the title screen using the respective gamepad for the controllers to work correctly. Press the END key in your keyboard to unlock the input and the main cursor when you finish playing. You can also use CTRL+Q to close Nucleus and all its instances.";
Game.PauseBetweenProcessGrab = 5;
Game.PauseBetweenStarts = 45;

Game.SupportsMultipleKeyboardsAndMice = true;

Game.HookSetCursorPos = false;
Game.HookGetCursorPos = true;
Game.HookGetKeyState = true;
Game.HookGetAsyncKeyState = true;
Game.HookGetKeyboardState = true;
Game.HookFilterRawInput = false;
Game.HookFilterMouseMessages = false;
Game.HookUseLegacyInput = false;
Game.HookDontUpdateLegacyInMouseMsg = false;
Game.HookMouseVisibility = false;

Game.SendNormalMouseInput = true;
Game.SendNormalKeyboardInput = true;
Game.SendScrollWheel = true;
Game.ForwardRawKeyboardInput = false;
Game.ForwardRawMouseInput = false;
Game.DrawFakeMouseCursor = false;
Game.LockInputAtStart = true;
Game.LockInputToggleKey = 0x23;

Game.Play = function() {
  var cfgFilePath = Context.GetFolder(Nucleus.Folder.Documents) + "\\My Games\\Terraria\\config.json";

  var windowModeLine = Context.FindLineNumberInTextFile(cfgFilePath, "Fullscreen", Nucleus.SearchType.Contains);
  var windowMax = Context.FindLineNumberInTextFile(cfgFilePath, "WindowMaximized", Nucleus.SearchType.Contains);
  var windownoborders = Context.FindLineNumberInTextFile(cfgFilePath, "WindowBorderless", Nucleus.SearchType.Contains);
  var screenWidthLine = Context.FindLineNumberInTextFile(cfgFilePath, "DisplayWidth", Nucleus.SearchType.Contains);
  var screenHeightLine = Context.FindLineNumberInTextFile(cfgFilePath, "DisplayHeight", Nucleus.SearchType.Contains);

  Context.ReplaceLinesInTextFile(cfgFilePath, [
    windowModeLine + '|  "Fullscreen": false, ',
    windowMax + '|  "WindowMaximized": false, ',
    windownoborders + '|  "WindowBorderless": true, ',
    screenWidthLine + '|  "DisplayWidth":' + Context.Width + ",",
    screenHeightLine + '|  "DisplayHeight":' + Context.Height + ","
  ]);
};