Terraria · handler “Terraria”
Version 5
Release notes
UI option and fixes
- Released
- Size
- 1.6 KB
- Downloads
- 3,083
- Check
- Verified
- SHA-256
- d3beab9551a1c6530084f2fd34fa0abd640a3c070d0eec6cb765ef73368bc707
Files 1
| Path | Size |
|---|---|
| handler.js | 4.6 KB |
handler.js
Plain textHub.Handler.Version = 5; // Released at https://hub.splitscreen.me/ on Wed May 19 2021 00:20:07 GMT+0000 (UTC).
Hub.Handler.Id = "J5vdAQFvS9i3AZCRE";
Hub.Maintainer.Name = "Talos91";
Hub.Maintainer.Id = "eeL7HAz8zJovChWw4";
var answers1 = ["No", "Yes"];
Game.AddOption("Launch in Borderless windowed?", "Alternative to the regular windowed mode.", "Borderless", answers1);
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 = 8;
Game.MaxPlayersOneMonitor = 4;
Game.LauncherTitle = "";
Game.HideTaskbar = false;
Game.Hook.ForceFocus = true;
Game.Hook.ForceFocusWindowName = "Terraria";
Game.HasDynamicWindowTitle = true;
Game.FakeFocus = true;
Game.HookFocus = true;
Game.SetWindowHook = true;
Game.ResetWindows = true;
Game.Hook.DInputEnabled = false;
Game.Hook.XInputEnabled = true;
Game.Hook.XInputReroute = false;
Game.Hook.CustomDllEnabled = false;
Game.XInputPlusDll = ["xinput1_3.dll"];
Game.DocumentsConfigPath = "My Games\\Terraria";
Game.DocumentsSavePath = "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. To join each other host a world in one instance with steam multiplayer disabled then the others can join using join via IP, type localhost and accept. If you want the instances to resize correctly and avoid stretching you need to create custom resolutions in your AMD/Nvidia/Intel panel (For example: 960x1080, 960x540, 1920x540 etc.) so the game can see and use them.";
Game.PauseBetweenProcessGrab = 5;
Game.PauseBetweenStarts = 40;
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 borderless = Context.Options["Borderless"];
if (borderless == "Yes") {
var txtPath = Context.GetFolder(Nucleus.Folder.Documents) + "\\My Games\\Terraria\\config.json";
var dict = [
Context.FindLineNumberInTextFile(txtPath, ' "Fullscreen":', Nucleus.SearchType.StartsWith) + '| "Fullscreen": false, ',
Context.FindLineNumberInTextFile(txtPath, ' "WindowMaximized":', Nucleus.SearchType.StartsWith) + '| "WindowMaximized": false,',
Context.FindLineNumberInTextFile(txtPath, ' "WindowBorderless":', Nucleus.SearchType.StartsWith) + '| "WindowBorderless": true,',
Context.FindLineNumberInTextFile(txtPath, ' "DisplayWidth":', Nucleus.SearchType.StartsWith) + '| "DisplayWidth": ' + Context.Width + ",",
Context.FindLineNumberInTextFile(txtPath, ' "DisplayHeight":', Nucleus.SearchType.StartsWith) + '| "DisplayHeight": ' + Context.Height + ","
];
Context.ReplaceLinesInTextFile(txtPath, dict);
}
if (borderless == "No") {
var txtPath = Context.GetFolder(Nucleus.Folder.Documents) + "\\My Games\\Terraria\\config.json";
var dict = [
Context.FindLineNumberInTextFile(txtPath, ' "Fullscreen":', Nucleus.SearchType.StartsWith) + '| "Fullscreen": false, ',
Context.FindLineNumberInTextFile(txtPath, ' "WindowMaximized":', Nucleus.SearchType.StartsWith) + '| "WindowMaximized": false,',
Context.FindLineNumberInTextFile(txtPath, ' "WindowBorderless":', Nucleus.SearchType.StartsWith) + '| "WindowBorderless": false,',
Context.FindLineNumberInTextFile(txtPath, ' "DisplayWidth":', Nucleus.SearchType.StartsWith) + '| "DisplayWidth": ' + Context.Width + ",",
Context.FindLineNumberInTextFile(txtPath, ' "DisplayHeight":', Nucleus.SearchType.StartsWith) + '| "DisplayHeight": ' + Context.Height + ","
];
Context.ReplaceLinesInTextFile(txtPath, dict);
}
};