Quake II · handler “Quake II (Quake2XP)”
Version 1
Release notes
Quake II
- Released
- Size
- 1.4 KB
- Downloads
- 3
- Check
- Unverified
- SHA-256
- 3aa86263b817b9f2a21f560b7a122cd030e4175ca0e25a8d3d590900df40e604
Files 1
| Path | Size |
|---|---|
| handler.js | 5.4 KB |
handler.js
Plain textHub.Handler.Version = 1; // Released at https://hub.splitscreen.me/ on Wed Jul 28 2021 12:47:24 GMT+0000 (UTC).
Hub.Handler.Id = "pLqgXNBzFSgK6tcGf";
Hub.Maintainer.Name = "Genjuro_Kibagami";
Hub.Maintainer.Id = "6s2Fuz9unXTtH453m";
var answers = ["None", "The Reckoning", "Ground Zero", "Eraser Bots"];
Game.AddOption("Select a Mod", "", "mod", answers);
Game.ExecutableContext = ["devil.dll"];
Game.DirSymlinkExclusions = [];
Game.FileSymlinkExclusions = [];
Game.DirSymlinkCopyInstead = ["baseq2", "rogue", "xatrix", "eraser"];
Game.UseNucleusEnvironment = false;
Game.NeedsSteamEmulation = false;
Game.UseGoldberg = false;
Game.HandlerInterval = 100;
Game.SymlinkExe = false;
Game.SymlinkGame = true;
Game.SymlinkFolders = true;
Game.ExecutableName = "quake2xp.exe";
Game.SteamID = "2310";
Game.GUID = "Quake 2";
Game.GameName = "Quake 2";
Game.MaxPlayers = 8;
Game.MaxPlayersOneMonitor = 8;
Game.HideTaskbar = true;
Game.Hook.ForceFocus = true;
Game.Hook.ForceFocusWindowName = "quake2xp";
Game.HasDynamicWindowTitle = true;
Game.FakeFocus = true;
Game.FakeFocusInterval = 40000;
Game.SendFakeFocusMsg = true;
Game.HookFocus = true;
Game.SetWindowHook = true;
Game.Hook.DInputEnabled = false;
Game.Hook.XInputEnabled = true;
Game.Hook.UseAlpha8CustomDll = true;
Game.Hook.CustomDllEnabled = false;
Game.XInputPlusDll = ["xinput1_4.dll", "xinput9_1_0.dll"];
Game.Description =
"run game and all mission packs with quake2xp and set any graphics options before using nucleus. Start a multiplayer game in the first instance and press ok on prompt when server is ready";
Game.KeepSymLinkOnExit = true;
Game.PauseBetweenProcessGrab = 5;
Game.PauseBetweenStarts = 15;
Game.PromptAfterFirstInstance = true;
Game.Play = function() {
var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\baseq2\\xpconfig.cfg";
var dict = [
Context.FindLineNumberInTextFile(txtPath, "set r_customWidth ", Nucleus.SearchType.StartsWith) + '|set r_customWidth "' + Context.Width + '"',
Context.FindLineNumberInTextFile(txtPath, "set r_customHeight ", Nucleus.SearchType.StartsWith) + '|set r_customHeight "' + Context.Height + '"',
Context.FindLineNumberInTextFile(txtPath, "set r_mode ", Nucleus.SearchType.StartsWith) + '|set r_mode "' + 21 + '"',
Context.FindLineNumberInTextFile(txtPath, "set name ", Nucleus.SearchType.StartsWith) + '|set name "' + Context.Nickname + '"'
];
Context.ReplaceLinesInTextFile(txtPath, dict);
if (System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\rogue\\xpconfig.cfg")) {
var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\rogue\\xpconfig.cfg";
var dict = [
Context.FindLineNumberInTextFile(txtPath, "set r_customWidth ", Nucleus.SearchType.StartsWith) + '|set r_customWidth "' + Context.Width + '"',
Context.FindLineNumberInTextFile(txtPath, "set r_customHeight ", Nucleus.SearchType.StartsWith) + '|set r_customHeight "' + Context.Height + '"',
Context.FindLineNumberInTextFile(txtPath, "set r_mode ", Nucleus.SearchType.StartsWith) + '|set r_mode "' + 21 + '"',
Context.FindLineNumberInTextFile(txtPath, "set name ", Nucleus.SearchType.StartsWith) + '|set name "' + Context.Nickname + '"'
];
Context.ReplaceLinesInTextFile(txtPath, dict);
}
if (System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\xatrix\\xpconfig.cfg")) {
var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\xatrix\\xpconfig.cfg";
var dict = [
Context.FindLineNumberInTextFile(txtPath, "set r_customWidth ", Nucleus.SearchType.StartsWith) + '|set r_customWidth "' + Context.Width + '"',
Context.FindLineNumberInTextFile(txtPath, "set r_customHeight ", Nucleus.SearchType.StartsWith) + '|set r_customHeight "' + Context.Height + '"',
Context.FindLineNumberInTextFile(txtPath, "set r_mode ", Nucleus.SearchType.StartsWith) + '|set r_mode "' + 21 + '"',
Context.FindLineNumberInTextFile(txtPath, "set name ", Nucleus.SearchType.StartsWith) + '|set name "' + Context.Nickname + '"'
];
Context.ReplaceLinesInTextFile(txtPath, dict);
}
if (System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\eraser\\xpconfig.cfg")) {
var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\eraser\\xpconfig.cfg";
var dict = [
Context.FindLineNumberInTextFile(txtPath, "set r_customWidth ", Nucleus.SearchType.StartsWith) + '|set r_customWidth "' + Context.Width + '"',
Context.FindLineNumberInTextFile(txtPath, "set r_customHeight ", Nucleus.SearchType.StartsWith) + '|set r_customHeight "' + Context.Height + '"',
Context.FindLineNumberInTextFile(txtPath, "set r_mode ", Nucleus.SearchType.StartsWith) + '|set r_mode "' + 21 + '"',
Context.FindLineNumberInTextFile(txtPath, "set name ", Nucleus.SearchType.StartsWith) + '|set name "' + Context.Nickname + '"'
];
Context.ReplaceLinesInTextFile(txtPath, dict);
}
var mod = Context.Options["mod"];
if (mod == "None") {
var modarg = "";
}
if (mod == "The Reckoning") {
var modarg = "+set game xatrix";
}
if (mod == "Ground Zero") {
var modarg = "+set game rogue";
}
if (mod == "Eraser Bots") {
var modarg = "+set game eraser";
}
if (Context.PlayerID == 0) {
Context.StartArguments = modarg;
} else {
Context.StartArguments = modarg + " +connect 127.0.0.1";
}
};