Hammerwatch · handler “Hammerwatch”
Version 2
Release notes
New LAN UI option.
- Released
- Size
- 1.4 KB
- Downloads
- 303
- Check
- Verified
- SHA-256
- 03c1d5dcd6c4e7f8df870e2272f0b0624d6ae3d7ce192432662b0e3d467e5bbb
Files 1
| Path | Size |
|---|---|
| handler.js | 3.0 KB |
handler.js
Plain textHub.Handler.Version = 2; // Released at https://hub.splitscreen.me/ on Fri Mar 12 2021 01:44:53 GMT+0000 (UTC).
Hub.Handler.Id = "JMjkv7FdBo7RJ4GNR";
Hub.Maintainer.Name = "Talos91";
Hub.Maintainer.Id = "eeL7HAz8zJovChWw4";
var answers1 = ["Yes", "No"];
Game.AddOption("LAN?", "Connect the instances via the game's native LAN, read notes before using.", "LAN", answers1);
Game.DirSymlinkExclusions = ["editor"];
Game.FileSymlinkExclusions = ["steam_appid.txt"];
Game.FileSymlinkCopyInstead = ["config.xml"];
Game.NeedsSteamEmulation = false;
Game.UseGoldberg = true;
Game.HandlerInterval = 100;
Game.SymlinkGame = true;
Game.SymlinkFolders = true;
Game.SymlinkExe = false;
Game.SupportsKeyboard = true;
Game.ExecutableName = "hammerwatch.exe";
Game.SteamID = "239070";
Game.GUID = "HammerWatch";
Game.GameName = "HammerWatch";
Game.MaxPlayers = 4;
Game.MaxPlayersOneMonitor = 4;
Game.LauncherTitle = "";
Game.Hook.ForceFocus = true;
Game.Hook.ForceFocusWindowName = "Hammerwatch";
Game.HasDynamicWindowTitle = true;
Game.FakeFocus = true;
Game.Hook.DInputEnabled = false;
Game.Hook.DInputForceDisable = true;
Game.Hook.XInputEnabled = true;
Game.Hook.XInputReroute = false;
Game.XInputPlusDll = ["xinput1_4.dll"];
Game.Hook.CustomDllEnabled = false;
Game.Description =
"The game already has 4 player local co-op but shared screen, with this script each player gets his own screen and you can use different monitors, you can separate without the map zooming out. If you select LAN in the Nucleus UI player options the script will launch all instances under your steam account, it is possible to unlock steam achievements using this option, to connect the instances host a regular server in one instance and connect to it in the other instances using the join option, write localhost in the field that will show to join, alt-tab to an instance to use the keyboard. If you select to not use the LAN UI option Nucleus will use steam emulation instead, to connect the instances host a game in one instance and join in the others using the browse option, the lobby will show in the list. If you use a keyboard player enable keyboard in the player 1 in-game settings for that instance.";
Game.PauseBetweenStarts = 30;
Game.Play = function() {
var path = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\config.xml";
Context.ChangeXmlNodeInnerTextValue(path, "//Fullscreen", "false");
Context.ChangeXmlNodeInnerTextValue(path, "//Width", Context.Width);
Context.ChangeXmlNodeInnerTextValue(path, "//Height", Context.Height);
Context.ChangeXmlNodeInnerTextValue(path, "//LetterBox", "false");
var lan = Context.Options["LAN"];
if (lan == "Yes") {
var savePkgOrigin = System.IO.Path.Combine(Context.RootInstallFolder, "steam_api.dll");
var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\steam_api.dll");
System.IO.File.Copy(savePkgOrigin, savePath, true);
}
if (lan == "No") {
}
};