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

Call of Duty: World at War · handler “Call of Duty World at War”

Version 25

Release notes

4 player split screen support has been added for Campaign/Zombies

Released
Size
6.5 MB
Downloads
14,122
Check
Verified
SHA-256
d3c2c4b14a5d003410ebd5e861c948b0ac128053b41225f6f503a5e5482736aa
Download v25 (.nc)All versions

Files 27

PathSize
handler/Bots mod/z_svr_bots.iwd366 KB
handler/CoD profile.cfg503 B
handler/Config files/plutonium.cfg16 KB
handler/Config files/plutonium_mp.cfg15 KB
handler/Config files/unlockstats8.0 KB
handler/F2 Guest.au31.3 KB
handler/F2 Guest.exe894 KB
handler/F2 Host MP.au3838 B
handler/F2 Host MP.exe894 KB
handler/F2 Host.au31.1 KB
handler/F2 Host.exe894 KB
handler/F3 Restart.au3316 B
handler/F3 Restart.exe894 KB
handler/JoyToKey.exe2.0 MB
handler/JoyToKey.ini1.2 KB
handler/Local IP.txt19 B
handler/osd.ini4.6 KB
handler/Players.txt23 B
handler/Prompt.exe894 KB
handler/SpecialK/d3d9.dll8.0 MB
handler/SpecialK/d3d9.ini4.5 KB
handler/start.au31.5 KB
handler/start.exe894 KB
handler/unlockall.txt17 B
handler/winject32.exe8.5 KB
handler/winject64.exe11 KB
handler.js67 KB

handler.js

Plain text
Hub.Handler.Version = 25; // Released at https://hub.splitscreen.me/ on Tue Sep 19 2023 10:03:13 GMT+0000 (Coordinated Universal Time).
Hub.Handler.Id = "ZeCGPXaap5Dzs5PXc";
Hub.Maintainer.Name = "Perserveruz";
Hub.Maintainer.Id = "nFAYvHKj75jAFRAgt";

var answers = ["No", "Yes"];
var answers1 = [
  "-",
  "Abandoned School",
  "Alcatraz",
  "Backlot",
  "Backrooms",
  "Berlin Bank",
  "Clinic Of Evil",
  "Dead Ship",
  "HelloKittyRemastered",
  "Kino - The Rebirth",
  "Kino The Rebirth V4",
  "Leviathan",
  "Nach Reimagined",
  "Nacht Der Toten Walder",
  "Oil Rig",
  "Pistol Defense",
  "sanatorium",
  "Spongebob",
  "SuperMario64",
  "Swan",
  "TheCrazyPlace",
  "TMG castle",
  "UGX Comosea",
  "UGX Requiem",
  "Zombie Sumpf"
];
var answers2 = ["Default", "Yes", "No"];
var answers3 = ["No", "720p", "1080p"];
var answers4 = ["Default", "Yes", "No"];
var answers5 = ["-", "vsync", "30", "45", "60", "90", "120", "200"];
var answers6 = ["Default", "Low", "Med", "High", "Extra"];
var answers7 = ["Campaign/Zombies", "Multiplayer"];
var answers8 = ["-", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18"];
var answers9 = ["2", "1", "3", "4", "5", "6", "7", "8", "0"];
var answers10 = [
  "-",
  "1",
  "2",
  "3",
  "4",
  "5",
  "6",
  "7",
  "8",
  "9",
  "10",
  "11",
  "12",
  "13",
  "14",
  "15",
  "16",
  "17",
  "18",
  "19",
  "20",
  "21",
  "22",
  "23",
  "24",
  "25",
  "26",
  "27",
  "28",
  "29",
  "30",
  "31",
  "32",
  "33",
  "34",
  "35",
  "36",
  "37",
  "38",
  "39",
  "40",
  "41",
  "42",
  "43",
  "44",
  "45",
  "46",
  "47",
  "48",
  "49",
  "50",
  "51",
  "52",
  "53",
  "54",
  "55",
  "56",
  "57",
  "58",
  "59",
  "60",
  "61",
  "62",
  "63",
  "64",
  "65",
  "66",
  "67",
  "68",
  "69",
  "70",
  "71",
  "72",
  "73",
  "74",
  "75",
  "76",
  "77",
  "78",
  "79",
  "80",
  "81",
  "82",
  "83",
  "84",
  "85",
  "86",
  "87",
  "88",
  "89",
  "90",
  "91",
  "92",
  "93",
  "94",
  "95",
  "96",
  "97",
  "98",
  "99",
  "100",
  "101",
  "102",
  "103",
  "104",
  "105",
  "106",
  "107",
  "108",
  "109",
  "110",
  "111",
  "112",
  "113",
  "114",
  "115",
  "116",
  "117",
  "118",
  "119",
  "120",
  "121",
  "122",
  "123",
  "124",
  "125",
  "126",
  "127",
  "128",
  "129",
  "130",
  "131",
  "132",
  "133",
  "134",
  "135",
  "136",
  "137",
  "138",
  "139",
  "140",
  "141",
  "142",
  "143",
  "144",
  "145",
  "146",
  "147",
  "148",
  "149",
  "150",
  "151",
  "152",
  "153",
  "154",
  "155",
  "156",
  "157",
  "158",
  "159",
  "160",
  "161",
  "162",
  "163",
  "164",
  "165",
  "166",
  "167",
  "168",
  "169",
  "170",
  "171",
  "172",
  "173",
  "174",
  "175",
  "176",
  "177",
  "178",
  "179",
  "180",
  "181",
  "182",
  "183",
  "184",
  "185",
  "186",
  "187",
  "188",
  "189",
  "190",
  "191",
  "192",
  "193",
  "194",
  "195",
  "196",
  "197",
  "198",
  "199",
  "200"
];
var answers11 = ["1", "2", "3", "4"];
Game.AddOption("Select preferred game mode", "", "mode", answers7);
Game.AddOption("Choose your preferred graphic settings", "Default will use the previous or default settings", "Graphics", answers6);
Game.AddOption("Select Custom Mod for Zombies", "Only valid for Zombies and will need to be manually launched for each instance", "Mod", answers1);
Game.AddOption("Select the number of players for Zombies and Campaign", "", "Players", answers11);
Game.AddOption("Select the number of bots to be added for Multiplayer", "", "Bots", answers8);
Game.AddOption("Select the bot skill level for Multiplayer", "", "Skill", answers9);
Game.AddOption("Would you like to unlock all", "", "Unlock", answers);
Game.AddOption("For LAN and only for Guest PC, select the last digits of the host IP", "", "lan", answers10);
Game.AddOption("Enable music only in the first instance?", "Default will use the previous or default settings", "Mus", answers2);
Game.AddOption("Select the FPS Cap the game will use", "", "FPS", answers5);
Game.AddOption("Swap shoulder and trigger buttons (useful for Playstation controllers)", "Default will use the previous or default settings", "pscontrollers", answers4);
Game.FileSymlinkExclusions = ["d3d9.dll", "Xinputplus.ini", "xinput1_4.dll", "xinput1_3.dll"];
Game.HandlerInterval = 100;
Game.SymlinkExe = false;
Game.SymlinkGame = true;
Game.SymlinkFolders = false;
Game.KeepSymLinkOnExit = true;
Game.UseNucleusEnvironment = true;
Game.SupportsKeyboard = true;
Game.ExecutableName = "CoDWaW.exe";
Game.ExecutableToLaunch = "Plutonium/launch.bat";
Game.BinariesFolder = "";
Game.SteamID = "10090";
Game.GUID = "Call of Duty World at War";
Game.GameName = "Call of Duty World at War";
Game.MaxPlayersOneMonitor = 4;
Game.MaxPlayers = 4;
Game.Hook.ForceFocus = true;
Game.HasDynamicWindowTitle = false;
Game.HookFocus = false;
Game.FakeFocus = false;
Game.FakeFocusSendActivate = false;
Game.Hook.DInputEnabled = false;
Game.Hook.DInputForceDisable = true;
Game.Hook.XInputEnabled = true;
Game.Hook.XInputReroute = false;
Game.Hook.CustomDllEnabled = false;
Game.Hook.UseAlpha8CustomDll = false;
Game.InjectHookXinput = false;
Game.PromptBetweenInstances = false;
Game.ProcessChangesAtEnd = false;
Game.ResetWindows = true;
Game.SetWindowHookStart = false;
Game.PreventWindowDeactivation = false;
Game.KeyboardPlayerSkipPreventWindowDeactivate = false;
Game.SetForegroundWindowElsewhere = true;
Game.HideTaskbar = false;
Game.SetTopMostAtEnd = true;
Game.KillProcessesOnClose = ["start", "connect", "F2 Host", "F2 Host MP", "F2 Guest", "F3 Restart", "cmd", "JoyToKey"];
Game.Description =
  "For best compatibility it is advisable to close Steam. You will need to separately download the Plutonium files from the following link https://www.mediafire.com/file/2dours2tgq3824x/CoDWaW_Plutonium_files.rar/file and extract them to your Call of Duty World at War/Plutonium folder, located under your NucleusCo-op/handler folder. For Campaign/Zombies, prior to launching your instances, choose the number of players under the launch options in Nucleus. Once the instances have finished opening and resizing have the first player setup a cooperative/private match, then instead of clicking start match, press F2 or press and hold the start button on your gamepad to launch the match and to automatically connect all instances (please be patient as this can take some time). Press F3 or press and hold the Y button button on your gamepad in case you need to quickly restart match. To use modded zombie maps, place your mod in the Modded maps folder located under NucleusCo-op, handlers, CoDWaW, and at the launch options screen in Nucleus select your mod. For Multiplayer, launch your instances and have the first player host a match. Once in game, press F2 or press and hold the start button on your gamepad to have all the other instances connect automatically. To quickly restart your match press F3 or press and hold the Y button on your gamepad. To play over LAN, ONLY the guest PC will need to select the last 1-3 digits of the Host PC's IP address in the launch options, then once all the instances have finished positionin/resizing, press F2 or press and hold the start button on gamepad to connect all the guest instances to the host PC. The hotkey exes (F2 host, F2 Guest, F3 restart, start, Prompt) and the winject32-64.exes may be blocked or flagged by windows defender as potential viruses/threats, but I can guarantee they are nothing but false/positives as I personally created the hotkeys using AutoIt, while the winject exes I got them from the following link https://www.unknowncheats.me/forum/general-programming-and-reversing/518833-winject-windows-injector.html and have been analyzed and cleared by one of their moderators. Last but not least, enjoy playing this awesome CoD game with friends and family!";

Game.SupportsMultipleKeyboardsAndMice = true;

Game.Play = function() {
  // Deprecated options
  Game.HookSetCursorPos = false;
  Game.HookGetCursorPos = false;
  Game.HookGetKeyState = false;
  Game.HookGetAsyncKeyState = false;
  Game.HookGetKeyboardState = false;
  Game.HookFilterRawInput = false;
  Game.HookFilterMouseMessages = false;
  Game.HookUseLegacyInput = false;
  Game.HookDontUpdateLegacyInMouseMsg = false;
  Game.HookMouseVisibility = false;
  Game.SendNormalMouseInput = false;
  Game.SendNormalKeyboardInput = false;
  Game.SendScrollWheel = false;
  Game.ForwardRawKeyboardInput = false;
  Game.ForwardRawMouseInput = false;
  Game.DrawFakeMouseCursor = false;
  Game.LockInputAtStart = false;
  Game.LockInputSuspendsExplorer = false;
  Game.LockInputToggleKey = 0x23;

  Context.RunAdditionalFiles([Context.ScriptFolder + "\\start.exe"], false, 10);
  Context.RunAdditionalFiles([Context.ScriptFolder + "\\F3 Restart.exe"], false, 10);
  Context.RunAdditionalFiles([Context.ScriptFolder + "\\JoyToKey.exe"], false, 0);

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

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

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

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

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

  var filePath = (Context.filePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players");
  System.IO.Directory.CreateDirectory(filePath);

  var filePath = (Context.filePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\mods");
  System.IO.Directory.CreateDirectory(filePath);

  var filePath = (Context.filePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\mods\\mp_bots");
  System.IO.Directory.CreateDirectory(filePath);

  var filePath = (Context.filePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\main");
  System.IO.Directory.CreateDirectory(filePath);

  var filePath = (Context.filePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\raw");
  System.IO.Directory.CreateDirectory(filePath);

  var filePath = (Context.filePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\zone");
  System.IO.Directory.CreateDirectory(filePath);

  var filePath = (Context.filePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\raw\\scripts");
  System.IO.Directory.CreateDirectory(filePath);

  var filePath = (Context.filePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\raw\\scripts\\sp");
  System.IO.Directory.CreateDirectory(filePath);

  var filePath = (Context.filePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\raw\\scripts\\sp\\nazi_zombie_ccube_u");
  System.IO.Directory.CreateDirectory(filePath);

  var filePath = (Context.filePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\raw\\scripts\\sp\\sanatorium");
  System.IO.Directory.CreateDirectory(filePath);

  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium.cfg")) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium.cfg");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "Config files\\plutonium.cfg");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium_mp.cfg")) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium_mp.cfg");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "Config files\\plutonium_mp.cfg");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\unlockstats")) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\unlockstats");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "Config files\\unlockstats");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\bin\\AppCore.dll")) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\bin\\AppCore.dll");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "Plutonium\\bin\\AppCore.dll");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\bin\\discord_game_sdk.dll")) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\bin\\discord_game_sdk.dll");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "Plutonium\\bin\\discord_game_sdk.dll");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\bin\\plutonium-bootstrapper-win32.exe")) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\bin\\plutonium-bootstrapper-win32.exe");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "Plutonium\\bin\\plutonium-bootstrapper-win32.exe");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\bin\\plutonium-launcher-win32.exe")) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\bin\\plutonium-launcher-win32.exe");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "Plutonium\\bin\\plutonium-launcher-win32.exe");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\bin\\Ultralight.dll")) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\bin\\Ultralight.dll");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "Plutonium\\bin\\Ultralight.dll");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\bin\\UltralightCore.dll")) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\bin\\UltralightCore.dll");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "Plutonium\\bin\\UltralightCore.dll");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\bin\\WebCore.dll")) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\bin\\WebCore.dll");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "Plutonium\\bin\\WebCore.dll");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\games\\t4mp.exe")) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\games\\t4mp.exe");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "Plutonium\\games\\t4mp.exe");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\games\\t4sp.exe")) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\games\\t4sp.exe");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "Plutonium\\games\\t4sp.exe");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\raw\\scripts\\sp\\zm_spawn_fix.gsc")) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\raw\\scripts\\sp\\zm_spawn_fix.gsc");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "Plutonium\\storage\\t4\\raw\\scripts\\sp\\zm_spawn_fix.gsc");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }
  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\raw\\scripts\\sp\\callbacks.gsc")) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\raw\\scripts\\sp\\callbacks.gsc");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "Plutonium\\storage\\t4\\raw\\scripts\\sp\\callbacks.gsc");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\raw\\scripts\\sp\\sanatorium\\fix_sanatorium.gsc")) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\raw\\scripts\\sp\\sanatorium\\fix_sanatorium.gsc");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "Plutonium\\storage\\t4\\raw\\scripts\\sp\\sanatorium\\fix_sanatorium.gsc");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\raw\\scripts\\sp\\nazi_zombie_ccube_u\\fix_ccube_u.gsc")) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\raw\\scripts\\sp\\nazi_zombie_ccube_u\\fix_ccube_u.gsc");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "Plutonium\\storage\\t4\\raw\\scripts\\sp\\nazi_zombie_ccube_u\\fix_ccube_u.gsc");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\zone\\plutonium_ui.ff")) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\zone\\plutonium_ui.ff");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "Plutonium\\storage\\t4\\zone\\plutonium_ui.ff");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\zone\\plutonium_ui_mp.ff")) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\zone\\plutonium_ui_mp.ff");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "Plutonium\\storage\\t4\\zone\\plutonium_ui_mp.ff");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\info.json")) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\info.json");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "Plutonium\\info.json");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  var filePath = Context.GetFolder(Nucleus.Folder.Documents) + "\\My Mods";
  System.IO.Directory.CreateDirectory(filePath);

  var filePath = Context.GetFolder(Nucleus.Folder.Documents) + "\\My Mods\\SpecialK";
  System.IO.Directory.CreateDirectory(filePath);

  var filePath = Context.GetFolder(Nucleus.Folder.Documents) + "\\My Mods\\SpecialK\\Global";
  System.IO.Directory.CreateDirectory(filePath);

  var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.Documents) + "\\My Mods\\SpecialK\\Global\\osd.ini");
  var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "osd.ini");
  System.IO.File.Copy(savePkgOrigin, savePath, true);

  var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\d3d9.dll");
  var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "SpecialK\\d3d9.dll");
  System.IO.File.Copy(savePkgOrigin, savePath, true);

  var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\bin\\d3d9.ini");
  var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "SpecialK\\d3d9.ini");
  System.IO.File.Copy(savePkgOrigin, savePath, true);

  var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\bin\\d3d9.ini";
  var dict = [Context.FindLineNumberInTextFile(txtPath, "SlotReassignment=", Nucleus.SearchType.StartsWith) + "|SlotReassignment=" + (Context.GamepadId - 1) + ""];
  Context.ReplaceLinesInTextFile(txtPath, dict);

  if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\winject32.exe")) {
    var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\winject32.exe");
    var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "winject32.exe");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  var FPS = Context.Options["FPS"];
  if (FPS == "-") {
  }
  if (FPS == "vsync") {
    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium.cfg";
    var dict = [Context.FindLineNumberInTextFile(txtPath, "seta r_vsync", Nucleus.SearchType.StartsWith) + '|seta r_vsync "1"'];
    Context.ReplaceLinesInTextFile(txtPath, dict);

    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium_mp.cfg";
    var dict = [Context.FindLineNumberInTextFile(txtPath, "seta r_vsync", Nucleus.SearchType.StartsWith) + '|seta r_vsync "1"'];
    Context.ReplaceLinesInTextFile(txtPath, dict);
  }
  if (FPS == "30") {
    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium.cfg";
    var dict = [
      Context.FindLineNumberInTextFile(txtPath, "seta com_maxfps", Nucleus.SearchType.StartsWith) + '|seta com_maxfps "30"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_vsync", Nucleus.SearchType.StartsWith) + '|seta r_vsync "0"'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);

    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium_mp.cfg";
    var dict = [
      Context.FindLineNumberInTextFile(txtPath, "seta com_maxfps", Nucleus.SearchType.StartsWith) + '|seta com_maxfps "30"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_vsync", Nucleus.SearchType.StartsWith) + '|seta r_vsync "0"'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);
  }
  if (FPS == "45") {
    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium.cfg";
    var dict = [
      Context.FindLineNumberInTextFile(txtPath, "seta com_maxfps", Nucleus.SearchType.StartsWith) + '|seta com_maxfps "45"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_vsync", Nucleus.SearchType.StartsWith) + '|seta r_vsync "0"'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);

    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium_mp.cfg";
    var dict = [
      Context.FindLineNumberInTextFile(txtPath, "seta com_maxfps", Nucleus.SearchType.StartsWith) + '|seta com_maxfps "45"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_vsync", Nucleus.SearchType.StartsWith) + '|seta r_vsync "0"'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);
  }
  if (FPS == "60") {
    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium.cfg";
    var dict = [
      Context.FindLineNumberInTextFile(txtPath, "seta com_maxfps", Nucleus.SearchType.StartsWith) + '|seta com_maxfps "60"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_vsync", Nucleus.SearchType.StartsWith) + '|seta r_vsync "0"'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);

    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium_mp.cfg";
    var dict = [
      Context.FindLineNumberInTextFile(txtPath, "seta com_maxfps", Nucleus.SearchType.StartsWith) + '|seta com_maxfps "60"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_vsync", Nucleus.SearchType.StartsWith) + '|seta r_vsync "0"'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);
  }
  if (FPS == "90") {
    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium.cfg";
    var dict = [
      Context.FindLineNumberInTextFile(txtPath, "seta com_maxfps", Nucleus.SearchType.StartsWith) + '|seta com_maxfps "90"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_vsync", Nucleus.SearchType.StartsWith) + '|seta r_vsync "0"'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);

    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium_mp.cfg";
    var dict = [
      Context.FindLineNumberInTextFile(txtPath, "seta com_maxfps", Nucleus.SearchType.StartsWith) + '|seta com_maxfps "90"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_vsync", Nucleus.SearchType.StartsWith) + '|seta r_vsync "0"'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);
  }
  if (FPS == "120") {
    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium.cfg";
    var dict = [
      Context.FindLineNumberInTextFile(txtPath, "seta com_maxfps", Nucleus.SearchType.StartsWith) + '|seta com_maxfps "120"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_vsync", Nucleus.SearchType.StartsWith) + '|seta r_vsync "0"'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);

    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium_mp.cfg";
    var dict = [
      Context.FindLineNumberInTextFile(txtPath, "seta com_maxfps", Nucleus.SearchType.StartsWith) + '|seta com_maxfps "120"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_vsync", Nucleus.SearchType.StartsWith) + '|seta r_vsync "0"'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);
  }
  if (FPS == "200") {
    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium.cfg";
    var dict = [
      Context.FindLineNumberInTextFile(txtPath, "seta com_maxfps", Nucleus.SearchType.StartsWith) + '|seta com_maxfps "200"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_vsync", Nucleus.SearchType.StartsWith) + '|seta r_vsync "0"'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);

    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium_mp.cfg";
    var dict = [
      Context.FindLineNumberInTextFile(txtPath, "seta com_maxfps", Nucleus.SearchType.StartsWith) + '|seta com_maxfps "200"',
      Context.FindLineNumberInTextFile(txtPath, "seta r_vsync", Nucleus.SearchType.StartsWith) + '|seta r_vsync "0"'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);
  }

  var mode = Context.Options["mode"];
  var Mod = Context.Options["Mod"];
  if (mode == "Campaign/Zombies") {
    Game.Hook.ForceFocusWindowName = "Plutonium T4 Singleplayer (r3553)";
    Game.ExecutableName = "plutonium-bootstrapper-win32.exe";
    Game.LauncherExe = "Plutonium T4 Singleplayer (r3553)";

    if (Mod == "-") {
      if (Player.IsRawKeyboard) {
        var Bat = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\launch.bat";
        var lines = ['"bin\\plutonium-bootstrapper-win32.exe" t4sp "%~dp0.." -name "' + Context.Nickname + '" -lan'];
        Context.WriteTextFile(Bat, lines);
      } else {
        var Bat = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\launch.bat";
        var lines = [
          'CALL "' +
            Context.GetFolder(Nucleus.Folder.InstancedGameFolder) +
            '\\Plutonium\\winject32.exe" d3d9.dll -s "bin\\plutonium-bootstrapper-win32.exe" t4sp "%~dp0.." -name "' +
            Context.Nickname +
            '" -lan'
        ];
        Context.WriteTextFile(Bat, lines);
      }
    }

    if (Mod > "-") {
      if (Player.IsRawKeyboard) {
        var Bat = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\launch.bat";
        var lines = ['"bin\\plutonium-bootstrapper-win32.exe" t4sp "%~dp0.." -name "' + Context.Nickname + '" -lan +set fs_game mods/' + Mod + ""];
        Context.WriteTextFile(Bat, lines);

        var Bat = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\mods.bat";
        var lines = [
          "@ECHO OFF",
          "SET SrcRoot=" + Context.ScriptFolder + "\\Modded maps\\",
          "SET TargetRoot=" + Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\mods\\",
          'FOR /D %%A IN ("%SrcRoot%*") DO (MKLINK /D "%TargetRoot%%%~NA" "%%~A")',
          'FOR %%A IN ("%SrcRoot%*") DO (MKLINK "%TargetRoot%%%~NXA" "%%~A")',
          ""
        ];
        Context.WriteTextFile(Bat, lines);

        Context.RunAdditionalFiles(["all|" + Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\mods.bat"], false, 0, true, false);
      } else {
        var Bat = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\launch.bat";
        var lines = [
          'CALL "' +
            Context.GetFolder(Nucleus.Folder.InstancedGameFolder) +
            '\\Plutonium\\winject32.exe" d3d9.dll -s "bin\\plutonium-bootstrapper-win32.exe" t4sp "%~dp0.." -name "' +
            Context.Nickname +
            '" -lan +set fs_game mods/' +
            Mod +
            ""
        ];
        Context.WriteTextFile(Bat, lines);

        var Bat = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\mods.bat";
        var lines = [
          "@ECHO OFF",
          "SET SrcRoot=" + Context.ScriptFolder + "\\Modded maps\\",
          "SET TargetRoot=" + Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\mods\\",
          'FOR /D %%A IN ("%SrcRoot%*") DO (MKLINK /D "%TargetRoot%%%~NA" "%%~A")',
          'FOR %%A IN ("%SrcRoot%*") DO (MKLINK "%TargetRoot%%%~NXA" "%%~A")',
          ""
        ];
        Context.WriteTextFile(Bat, lines);

        Context.RunAdditionalFiles(["all|" + Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\mods.bat"], false, 0, true, false);
      }
    }

    var lan = Context.Options["lan"];
    if (lan == "-") {
      Context.RunAdditionalFiles([Context.ScriptFolder + "\\F2 Host.exe"], false, 10);
    }

    if (lan >= 0) {
      Context.RunAdditionalFiles([Context.ScriptFolder + "\\F2 Guest.exe"], false, 10);

      var txtPath = Game.Folder + "\\Local IP.txt";
      var dict = ["192.168.1." + lan + "      "];
      Context.WriteTextFile(txtPath, dict);
    }

    var Graphics = Context.Options["Graphics"];
    if (Graphics == "Low") {
      var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium.cfg";
      var dict = [
        Context.FindLineNumberInTextFile(txtPath, "seta r_dof_enable", Nucleus.SearchType.StartsWith) + '|seta r_dof_enable "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_aaSamples", Nucleus.SearchType.StartsWith) + '|seta r_aaSamples "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta sm_enable", Nucleus.SearchType.StartsWith) + '|seta sm_enable "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta ragdoll_enable", Nucleus.SearchType.StartsWith) + '|seta ragdoll_enable "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_picmip", Nucleus.SearchType.StartsWith) + '|seta r_picmip "3"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_bump", Nucleus.SearchType.StartsWith) + '|seta r_picmip_bump "3"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_manual", Nucleus.SearchType.StartsWith) + '|seta r_picmip_manual "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_spec", Nucleus.SearchType.StartsWith) + '|seta r_picmip_spec "3"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_specular", Nucleus.SearchType.StartsWith) + '|seta r_specular "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_zFeather", Nucleus.SearchType.StartsWith) + '|seta r_zFeather "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta sm_maxLights", Nucleus.SearchType.StartsWith) + '|seta sm_maxLights "4"'
      ];
      Context.ReplaceLinesInTextFile(txtPath, dict);
    }

    if (Graphics == "Med") {
      var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium.cfg";
      var dict = [
        Context.FindLineNumberInTextFile(txtPath, "seta r_dof_enable", Nucleus.SearchType.StartsWith) + '|seta r_dof_enable "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_aaSamples", Nucleus.SearchType.StartsWith) + '|seta r_aaSamples "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta sm_enable", Nucleus.SearchType.StartsWith) + '|seta sm_enable "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta ragdoll_enable", Nucleus.SearchType.StartsWith) + '|seta ragdoll_enable "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_picmip", Nucleus.SearchType.StartsWith) + '|seta r_picmip "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_bump", Nucleus.SearchType.StartsWith) + '|seta r_picmip_bump "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_manual", Nucleus.SearchType.StartsWith) + '|seta r_picmip_manual "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_spec", Nucleus.SearchType.StartsWith) + '|seta r_picmip_spec "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_specular", Nucleus.SearchType.StartsWith) + '|seta r_specular "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_zFeather", Nucleus.SearchType.StartsWith) + '|seta r_zFeather "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta sm_maxLights", Nucleus.SearchType.StartsWith) + '|seta sm_maxLights "4"'
      ];
      Context.ReplaceLinesInTextFile(txtPath, dict);
    }

    if (Graphics == "High") {
      var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium.cfg";
      var dict = [
        Context.FindLineNumberInTextFile(txtPath, "seta r_dof_enable", Nucleus.SearchType.StartsWith) + '|seta r_dof_enable "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_aaSamples", Nucleus.SearchType.StartsWith) + '|seta r_aaSamples "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta sm_enable", Nucleus.SearchType.StartsWith) + '|seta sm_enable "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta ragdoll_enable", Nucleus.SearchType.StartsWith) + '|seta ragdoll_enable "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_picmip", Nucleus.SearchType.StartsWith) + '|seta r_picmip "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_bump", Nucleus.SearchType.StartsWith) + '|seta r_picmip_bump "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_manual", Nucleus.SearchType.StartsWith) + '|seta r_picmip_manual "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_spec", Nucleus.SearchType.StartsWith) + '|seta r_picmip_spec "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_specular", Nucleus.SearchType.StartsWith) + '|seta r_specular "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_zFeather", Nucleus.SearchType.StartsWith) + '|seta r_zFeather "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta sm_maxLights", Nucleus.SearchType.StartsWith) + '|seta sm_maxLights "4"'
      ];
      Context.ReplaceLinesInTextFile(txtPath, dict);
    }

    if (Graphics == "Extra") {
      var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium.cfg";
      var dict = [
        Context.FindLineNumberInTextFile(txtPath, "seta r_dof_enable", Nucleus.SearchType.StartsWith) + '|seta r_dof_enable "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_aaSamples", Nucleus.SearchType.StartsWith) + '|seta r_aaSamples "4"',
        Context.FindLineNumberInTextFile(txtPath, "seta sm_enable", Nucleus.SearchType.StartsWith) + '|seta sm_enable "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta ragdoll_enable", Nucleus.SearchType.StartsWith) + '|seta ragdoll_enable "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_picmip", Nucleus.SearchType.StartsWith) + '|seta r_picmip "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_bump", Nucleus.SearchType.StartsWith) + '|seta r_picmip_bump "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_manual", Nucleus.SearchType.StartsWith) + '|seta r_picmip_manual "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_spec", Nucleus.SearchType.StartsWith) + '|seta r_picmip_spec "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_specular", Nucleus.SearchType.StartsWith) + '|seta r_specular "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_zFeather", Nucleus.SearchType.StartsWith) + '|seta r_zFeather "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta sm_maxLights", Nucleus.SearchType.StartsWith) + '|seta sm_maxLights "4"'
      ];
      Context.ReplaceLinesInTextFile(txtPath, dict);
    }

    if (Context.AspectRatioDecimal < 1.2) {
      Game.DontResize = false;
      Game.DontRemoveBorders = true;
      Game.DontReposition = false;
      Game.ResetWindows = true;

      var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium.cfg";
      var dict = [
        Context.FindLineNumberInTextFile(txtPath, "seta name", Nucleus.SearchType.StartsWith) + '|seta name "' + Context.Nickname + '"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_mode", Nucleus.SearchType.StartsWith) + '|seta r_mode "' + Context.Width + "x" + Context.Height + '"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_customMode", Nucleus.SearchType.StartsWith) + '|seta r_customMode "' + Context.Width + "x" + Context.Height + '"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_fullscreen", Nucleus.SearchType.StartsWith) + '|seta r_fullscreen "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_aspectRatio", Nucleus.SearchType.StartsWith) + '|seta r_aspectRatio "auto"',
        Context.FindLineNumberInTextFile(txtPath, "seta vid_ypos", Nucleus.SearchType.StartsWith) + '|seta vid_ypos "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta cg_fov", Nucleus.SearchType.StartsWith) + '|seta cg_fov "95"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_noborder", Nucleus.SearchType.StartsWith) + '|seta r_noborder "1"'
      ];
      Context.ReplaceLinesInTextFile(txtPath, dict);
    } else {
      Game.DontResize = false;
      Game.DontRemoveBorders = true;
      Game.DontReposition = false;
      Game.ResetWindows = true;

      var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium.cfg";
      var dict = [
        Context.FindLineNumberInTextFile(txtPath, "seta name", Nucleus.SearchType.StartsWith) + '|seta name "' + Context.Nickname + '"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_mode", Nucleus.SearchType.StartsWith) + '|seta r_mode "' + Context.Width + "x" + Context.Height + '"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_customMode", Nucleus.SearchType.StartsWith) + '|seta r_customMode "' + Context.Width + "x" + Context.Height + '"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_fullscreen", Nucleus.SearchType.StartsWith) + '|seta r_fullscreen "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_aspectRatio", Nucleus.SearchType.StartsWith) + '|seta r_aspectRatio "auto"',
        Context.FindLineNumberInTextFile(txtPath, "seta vid_ypos", Nucleus.SearchType.StartsWith) + '|seta vid_ypos "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_noborder", Nucleus.SearchType.StartsWith) + '|seta r_noborder "1"'
      ];
      Context.ReplaceLinesInTextFile(txtPath, dict);
    }
  }

  if (mode == "Multiplayer") {
    Game.Hook.ForceFocusWindowName = "Plutonium T4 Multiplayer (r3553)";
    Game.ExecutableName = "plutonium-bootstrapper-win32.exe";
    Game.LauncherExe = "Plutonium T4 Multiplayer (r3553)";

    var Skill = Context.Options["Skill"];
    var Bots = Context.Options["Bots"];

    if (Bots == "-") {
      if (Player.IsRawKeyboard) {
        var Bat = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\launch.bat";
        var lines = ['"bin\\plutonium-bootstrapper-win32.exe" t4mp "%~dp0.." -name "' + Context.Nickname + '" -lan'];
        Context.WriteTextFile(Bat, lines);
      } else {
        var Bat = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\launch.bat";
        var lines = [
          'CALL "' +
            Context.GetFolder(Nucleus.Folder.InstancedGameFolder) +
            '\\Plutonium\\winject32.exe" d3d9.dll -s "bin\\plutonium-bootstrapper-win32.exe" t4mp "%~dp0.." -name "' +
            Context.Nickname +
            '" -lan'
        ];
        Context.WriteTextFile(Bat, lines);
      }
    }
    if (Bots >= "0") {
      if (Player.IsRawKeyboard) {
        var Bat = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\launch.bat";
        var lines = [
          '"bin\\plutonium-bootstrapper-win32.exe" t4mp "%~dp0.." -name "' +
            Context.Nickname +
            '" -lan +set fs_game mods/mp_bots +set fs_game mods/mp_bots +set bots_skill "' +
            Skill +
            '" +set bots_manage_fill "' +
            Bots +
            '" +set bots_main_waitForHostTime 360 +exec z_svr_bots.cfg'
        ];
        Context.WriteTextFile(Bat, lines);
      } else {
        var Bat = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\launch.bat";
        var lines = [
          'CALL "' +
            Context.GetFolder(Nucleus.Folder.InstancedGameFolder) +
            '\\Plutonium\\winject32.exe" d3d9.dll -s "bin\\plutonium-bootstrapper-win32.exe" t4mp "%~dp0.." -name "' +
            Context.Nickname +
            '" -lan +set fs_game mods/mp_bots +set bots_skill "' +
            Skill +
            '" +set bots_manage_fill "' +
            Bots +
            '" +set bots_main_waitForHostTime 360 +exec z_svr_bots.cfg'
        ];
        Context.WriteTextFile(Bat, lines);
      }
    }

    if (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\mods\\mp_bots\\z_svr_bots.iwd")) {
      var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\mods\\mp_bots\\z_svr_bots.iwd");
      var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "Bots mod\\z_svr_bots.iwd");
      System.IO.File.Copy(savePkgOrigin, savePath, true);
    }

    var lan = Context.Options["lan"];
    if (lan == "-") {
      Context.RunAdditionalFiles([Context.ScriptFolder + "\\F2 Host MP.exe"], false, 10);
    }

    if (lan >= 0) {
      Context.RunAdditionalFiles([Context.ScriptFolder + "\\F2 Guest.exe"], false, 10);

      var txtPath = Game.Folder + "\\Local IP.txt";
      var dict = ["192.168.1." + lan + "      "];
      Context.WriteTextFile(txtPath, dict);
    }

    var Graphics = Context.Options["Graphics"];
    if (Graphics == "Low") {
      var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium_mp.cfg";
      var dict = [
        Context.FindLineNumberInTextFile(txtPath, "seta r_dof_enable", Nucleus.SearchType.StartsWith) + '|seta r_dof_enable "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_aaSamples", Nucleus.SearchType.StartsWith) + '|seta r_aaSamples "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta sm_enable", Nucleus.SearchType.StartsWith) + '|seta sm_enable "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta ragdoll_enable", Nucleus.SearchType.StartsWith) + '|seta ragdoll_enable "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_picmip", Nucleus.SearchType.StartsWith) + '|seta r_picmip "3"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_bump", Nucleus.SearchType.StartsWith) + '|seta r_picmip_bump "3"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_manual", Nucleus.SearchType.StartsWith) + '|seta r_picmip_manual "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_spec", Nucleus.SearchType.StartsWith) + '|seta r_picmip_spec "3"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_specular", Nucleus.SearchType.StartsWith) + '|seta r_specular "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_zFeather", Nucleus.SearchType.StartsWith) + '|seta r_zFeather "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta sm_maxLights", Nucleus.SearchType.StartsWith) + '|seta sm_maxLights "4"'
      ];
      Context.ReplaceLinesInTextFile(txtPath, dict);
    }

    if (Graphics == "Med") {
      var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium_mp.cfg";
      var dict = [
        Context.FindLineNumberInTextFile(txtPath, "seta r_dof_enable", Nucleus.SearchType.StartsWith) + '|seta r_dof_enable "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_aaSamples", Nucleus.SearchType.StartsWith) + '|seta r_aaSamples "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta sm_enable", Nucleus.SearchType.StartsWith) + '|seta sm_enable "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta ragdoll_enable", Nucleus.SearchType.StartsWith) + '|seta ragdoll_enable "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_picmip", Nucleus.SearchType.StartsWith) + '|seta r_picmip "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_bump", Nucleus.SearchType.StartsWith) + '|seta r_picmip_bump "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_manual", Nucleus.SearchType.StartsWith) + '|seta r_picmip_manual "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_spec", Nucleus.SearchType.StartsWith) + '|seta r_picmip_spec "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_specular", Nucleus.SearchType.StartsWith) + '|seta r_specular "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_zFeather", Nucleus.SearchType.StartsWith) + '|seta r_zFeather "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta sm_maxLights", Nucleus.SearchType.StartsWith) + '|seta sm_maxLights "4"'
      ];
      Context.ReplaceLinesInTextFile(txtPath, dict);
    }

    if (Graphics == "High") {
      var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium_mp.cfg";
      var dict = [
        Context.FindLineNumberInTextFile(txtPath, "seta r_dof_enable", Nucleus.SearchType.StartsWith) + '|seta r_dof_enable "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_aaSamples", Nucleus.SearchType.StartsWith) + '|seta r_aaSamples "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta sm_enable", Nucleus.SearchType.StartsWith) + '|seta sm_enable "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta ragdoll_enable", Nucleus.SearchType.StartsWith) + '|seta ragdoll_enable "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_picmip", Nucleus.SearchType.StartsWith) + '|seta r_picmip "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_bump", Nucleus.SearchType.StartsWith) + '|seta r_picmip_bump "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_manual", Nucleus.SearchType.StartsWith) + '|seta r_picmip_manual "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_spec", Nucleus.SearchType.StartsWith) + '|seta r_picmip_spec "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_specular", Nucleus.SearchType.StartsWith) + '|seta r_specular "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_zFeather", Nucleus.SearchType.StartsWith) + '|seta r_zFeather "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta sm_maxLights", Nucleus.SearchType.StartsWith) + '|seta sm_maxLights "4"'
      ];
      Context.ReplaceLinesInTextFile(txtPath, dict);
    }

    if (Graphics == "Extra") {
      var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium_mp.cfg";
      var dict = [
        Context.FindLineNumberInTextFile(txtPath, "seta r_dof_enable", Nucleus.SearchType.StartsWith) + '|seta r_dof_enable "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_aaSamples", Nucleus.SearchType.StartsWith) + '|seta r_aaSamples "4"',
        Context.FindLineNumberInTextFile(txtPath, "seta sm_enable", Nucleus.SearchType.StartsWith) + '|seta sm_enable "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta ragdoll_enable", Nucleus.SearchType.StartsWith) + '|seta ragdoll_enable "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_picmip", Nucleus.SearchType.StartsWith) + '|seta r_picmip "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_bump", Nucleus.SearchType.StartsWith) + '|seta r_picmip_bump "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_manual", Nucleus.SearchType.StartsWith) + '|seta r_picmip_manual "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_picmip_spec", Nucleus.SearchType.StartsWith) + '|seta r_picmip_spec "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_specular", Nucleus.SearchType.StartsWith) + '|seta r_specular "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_zFeather", Nucleus.SearchType.StartsWith) + '|seta r_zFeather "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta sm_maxLights", Nucleus.SearchType.StartsWith) + '|seta sm_maxLights "4"'
      ];
      Context.ReplaceLinesInTextFile(txtPath, dict);
    }

    if (Context.AspectRatioDecimal < 1.2) {
      Game.DontResize = false;
      Game.DontRemoveBorders = true;
      Game.DontReposition = false;
      Game.ResetWindows = true;

      var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium_mp.cfg";
      var dict = [
        Context.FindLineNumberInTextFile(txtPath, "seta name", Nucleus.SearchType.StartsWith) + '|seta name "' + Context.Nickname + '"',
        Context.FindLineNumberInTextFile(txtPath, "seta com_maxfps", Nucleus.SearchType.StartsWith) + '|seta com_maxfps "' + FPS + '"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_mode", Nucleus.SearchType.StartsWith) + '|seta r_mode "' + Context.Width + "x" + Context.Height + '"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_customMode", Nucleus.SearchType.StartsWith) + '|seta r_customMode "' + Context.Width + "x" + Context.Height + '"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_fullscreen", Nucleus.SearchType.StartsWith) + '|seta r_fullscreen "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_aspectRatio", Nucleus.SearchType.StartsWith) + '|seta r_aspectRatio "auto"',
        Context.FindLineNumberInTextFile(txtPath, "seta vid_ypos", Nucleus.SearchType.StartsWith) + '|seta vid_ypos "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta cg_fov", Nucleus.SearchType.StartsWith) + '|seta cg_fov "95"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_noborder", Nucleus.SearchType.StartsWith) + '|seta r_noborder "1"'
      ];
      Context.ReplaceLinesInTextFile(txtPath, dict);
    } else {
      Game.DontResize = false;
      Game.DontRemoveBorders = true;
      Game.DontReposition = false;
      Game.ResetWindows = true;

      var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium_mp.cfg";
      var dict = [
        Context.FindLineNumberInTextFile(txtPath, "seta name", Nucleus.SearchType.StartsWith) + '|seta name "' + Context.Nickname + '"',
        Context.FindLineNumberInTextFile(txtPath, "seta com_maxfps", Nucleus.SearchType.StartsWith) + '|seta com_maxfps "' + FPS + '"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_mode", Nucleus.SearchType.StartsWith) + '|seta r_mode "' + Context.Width + "x" + Context.Height + '"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_customMode", Nucleus.SearchType.StartsWith) + '|seta r_customMode "' + Context.Width + "x" + Context.Height + '"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_fullscreen", Nucleus.SearchType.StartsWith) + '|seta r_fullscreen "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_aspectRatio", Nucleus.SearchType.StartsWith) + '|seta r_aspectRatio "auto"',
        Context.FindLineNumberInTextFile(txtPath, "seta vid_ypos", Nucleus.SearchType.StartsWith) + '|seta vid_ypos "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta r_noborder", Nucleus.SearchType.StartsWith) + '|seta r_noborder "1"'
      ];
      Context.ReplaceLinesInTextFile(txtPath, dict);
    }
  }

  var pscontrollers = Context.Options["pscontrollers"];
  if (pscontrollers == "Default") {
  }
  if (pscontrollers == "Yes") {
    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium_mp.cfg";
    var dict = [
      Context.FindLineNumberInTextFile(txtPath, "bind BUTTON_LSHLDR", Nucleus.SearchType.StartsWith) + '|bind BUTTON_LSHLDR "+speed_throw"',
      Context.FindLineNumberInTextFile(txtPath, "bind BUTTON_RSHLDR", Nucleus.SearchType.StartsWith) + '|bind BUTTON_RSHLDR "+attack"',
      Context.FindLineNumberInTextFile(txtPath, "bind BUTTON_LTRIG", Nucleus.SearchType.StartsWith) + '|bind BUTTON_LTRIG "+smoke"',
      Context.FindLineNumberInTextFile(txtPath, "bind BUTTON_RTRIG", Nucleus.SearchType.StartsWith) + '|bind BUTTON_RTRIG "+frag"',
      Context.FindLineNumberInTextFile(txtPath, "seta gpad_buttonsConfig", Nucleus.SearchType.StartsWith) + '|seta gpad_buttonsConfig "buttons_default_alt"'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);

    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium.cfg";
    var dict = [
      Context.FindLineNumberInTextFile(txtPath, "bind BUTTON_LSHLDR", Nucleus.SearchType.StartsWith) + '|bind BUTTON_LSHLDR "+speed_throw"',
      Context.FindLineNumberInTextFile(txtPath, "bind BUTTON_RSHLDR", Nucleus.SearchType.StartsWith) + '|bind BUTTON_RSHLDR "+attack"',
      Context.FindLineNumberInTextFile(txtPath, "bind BUTTON_LTRIG", Nucleus.SearchType.StartsWith) + '|bind BUTTON_LTRIG "+smoke"',
      Context.FindLineNumberInTextFile(txtPath, "bind BUTTON_RTRIG", Nucleus.SearchType.StartsWith) + '|bind BUTTON_RTRIG "+frag"',
      Context.FindLineNumberInTextFile(txtPath, "seta gpad_buttonsConfig", Nucleus.SearchType.StartsWith) + '|seta gpad_buttonsConfig "buttons_default_alt"'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);
  }

  var pscontrollers = Context.Options["pscontrollers"];
  if (pscontrollers == "No") {
    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium_mp.cfg";
    var dict = [
      Context.FindLineNumberInTextFile(txtPath, "bind BUTTON_LSHLDR", Nucleus.SearchType.StartsWith) + '|bind BUTTON_LSHLDR "+smoke"',
      Context.FindLineNumberInTextFile(txtPath, "bind BUTTON_RSHLDR", Nucleus.SearchType.StartsWith) + '|bind BUTTON_RSHLDR "+frag"',
      Context.FindLineNumberInTextFile(txtPath, "bind BUTTON_LTRIG", Nucleus.SearchType.StartsWith) + '|bind BUTTON_LTRIG "+speed_throw"',
      Context.FindLineNumberInTextFile(txtPath, "bind BUTTON_RTRIG", Nucleus.SearchType.StartsWith) + '|bind BUTTON_RTRIG "+attack"'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);

    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium.cfg";
    var dict = [
      Context.FindLineNumberInTextFile(txtPath, "bind BUTTON_LSHLDR", Nucleus.SearchType.StartsWith) + '|bind BUTTON_LSHLDR "+smoke"',
      Context.FindLineNumberInTextFile(txtPath, "bind BUTTON_RSHLDR", Nucleus.SearchType.StartsWith) + '|bind BUTTON_RSHLDR "+frag"',
      Context.FindLineNumberInTextFile(txtPath, "bind BUTTON_LTRIG", Nucleus.SearchType.StartsWith) + '|bind BUTTON_LTRIG "+speed_throw"',
      Context.FindLineNumberInTextFile(txtPath, "bind BUTTON_RTRIG", Nucleus.SearchType.StartsWith) + '|bind BUTTON_RTRIG "+attack"'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);
  }

  var Mus = Context.Options["Mus"];
  if (Mus == "Default") {
  }
  if (Mus == "Yes") {
    if (Context.PlayerID == 0) {
      var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium_mp.cfg";
      var dict = [
        Context.FindLineNumberInTextFile(txtPath, "seta snd_menu_music", Nucleus.SearchType.StartsWith) + '|seta snd_menu_music "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta snd_menu_voice", Nucleus.SearchType.StartsWith) + '|seta snd_menu_voice "1"'
      ];
      Context.ReplaceLinesInTextFile(txtPath, dict);

      var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium.cfg";
      var dict = [
        Context.FindLineNumberInTextFile(txtPath, "seta snd_menu_music", Nucleus.SearchType.StartsWith) + '|seta snd_menu_music "1"',
        Context.FindLineNumberInTextFile(txtPath, "seta snd_menu_voice", Nucleus.SearchType.StartsWith) + '|seta snd_menu_voice "1"'
      ];
      Context.ReplaceLinesInTextFile(txtPath, dict);
    } else {
      var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium_mp.cfg";
      var dict = [
        Context.FindLineNumberInTextFile(txtPath, "seta snd_menu_music", Nucleus.SearchType.StartsWith) + '|seta snd_menu_music "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta snd_menu_voice", Nucleus.SearchType.StartsWith) + '|seta snd_menu_voice "0"'
      ];
      Context.ReplaceLinesInTextFile(txtPath, dict);

      var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium.cfg";
      var dict = [
        Context.FindLineNumberInTextFile(txtPath, "seta snd_menu_music", Nucleus.SearchType.StartsWith) + '|seta snd_menu_music "0"',
        Context.FindLineNumberInTextFile(txtPath, "seta snd_menu_voice", Nucleus.SearchType.StartsWith) + '|seta snd_menu_voice "0"'
      ];
      Context.ReplaceLinesInTextFile(txtPath, dict);
    }
  }
  if (Mus == "No") {
    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium_mp.cfg";
    var dict = [
      Context.FindLineNumberInTextFile(txtPath, "seta snd_menu_music", Nucleus.SearchType.StartsWith) + '|seta snd_menu_music "1"',
      Context.FindLineNumberInTextFile(txtPath, "seta snd_menu_voice", Nucleus.SearchType.StartsWith) + '|seta snd_menu_voice "1"'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);

    var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium.cfg";
    var dict = [
      Context.FindLineNumberInTextFile(txtPath, "seta snd_menu_music", Nucleus.SearchType.StartsWith) + '|seta snd_menu_music "1"',
      Context.FindLineNumberInTextFile(txtPath, "seta snd_menu_voice", Nucleus.SearchType.StartsWith) + '|seta snd_menu_voice "1"'
    ];
    Context.ReplaceLinesInTextFile(txtPath, dict);
  }

  var Unlock = Context.Options["Unlock"];
  if (Unlock == "No") {
    var txtPath = Game.Folder + "\\unlockall.txt";
    var dict = [Context.FindLineNumberInTextFile(txtPath, "unlo", Nucleus.SearchType.StartsWith) + "|unlo      "];
    Context.ReplaceLinesInTextFile(txtPath, dict);
  }
  if (Unlock == "Yes") {
    var txtPath = Game.Folder + "\\unlockall.txt";
    var dict = [Context.FindLineNumberInTextFile(txtPath, "unlo", Nucleus.SearchType.StartsWith) + "|unlockall      "];
    Context.ReplaceLinesInTextFile(txtPath, dict);
  }

  var Players = Context.Options["Players"];

  var txtPath = Game.Folder + "\\Players.txt";
  var dict = ["sp_minplayers " + Players + "      "];
  Context.WriteTextFile(txtPath, dict);

  var Bat = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Registry.bat";
  var lines = [
    "@ECHO OFF",
    "set %~dp0=",
    'REG ADD "HKCU\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AppCompatFlags\\Layers" /v "' +
      Context.GetFolder(Nucleus.Folder.InstancedGameFolder) +
      '\\Plutonium\\bin\\plutonium-bootstrapper-win32.exe" /t REG_SZ /d "HIGHDPIAWARE" /f',
    "exit"
  ];
  Context.WriteTextFile(Bat, lines);

  Context.RunAdditionalFiles(["all|" + Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Registry.bat"], false, 0, true, false);

  if (Player.IsRawKeyboard) {
    if (System.IO.File.Exists((Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\d3d9.dll"))) {
      System.IO.File.Delete((Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\d3d9.dll"));
    }
  }
  if (Player.IsRawKeyboard) {
    Game.PauseBetweenProcessGrab = 5;
    Game.PauseBetweenStarts = 10;
    Game.InjectHookXinput = true;
    Game.ProtoInput.InjectStartup = false;
    Game.ProtoInput.InjectRuntime_RemoteLoadMethod = false;
    Game.ProtoInput.InjectRuntime_EasyHookMethod = true;
    Game.ProtoInput.InjectRuntime_EasyHookStealthMethod = false;
    Game.ProtoInput.FindWindowHook = true;
    Game.ProtoInput.RegisterRawInputHook = true;
    Game.ProtoInput.GetRawInputDataHook = false;
    Game.ProtoInput.MessageFilterHook = true;
    Game.ProtoInput.GetCursorPosHook = false;
    Game.ProtoInput.SetCursorPosHook = false;
    Game.ProtoInput.GetKeyStateHook = false;
    Game.ProtoInput.GetAsyncKeyStateHook = false;
    Game.ProtoInput.GetKeyboardStateHook = false;
    Game.ProtoInput.CursorVisibilityHook = true;
    Game.ProtoInput.ClipCursorHook = true;
    Game.ProtoInput.FocusHooks = false;
    Game.ProtoInput.DrawFakeCursor = false;
    Game.ProtoInput.RawInputFilter = false;
    Game.ProtoInput.MouseMoveFilter = false;
    Game.ProtoInput.MouseActivateFilter = false;
    Game.ProtoInput.WindowActivateFilter = false;
    Game.ProtoInput.WindowActvateAppFilter = false;
    Game.ProtoInput.MouseWheelFilter = false;
    Game.ProtoInput.MouseButtonFilter = false;
    Game.ProtoInput.KeyboardButtonFilter = true;
    Game.ProtoInput.SendMouseWheelMessages = true;
    Game.ProtoInput.SendMouseButtonMessages = true;
    Game.ProtoInput.SendMouseMovementMessages = true;
    Game.ProtoInput.SendKeyboardButtonMessages = true;

    Game.ProtoInput.EnableFocusMessageLoop = false;
    Game.ProtoInput.FocusLoopIntervalMilliseconds = 0;
    Game.ProtoInput.FocusLoop_WM_ACTIVATE = true;
    Game.ProtoInput.FocusLoop_WM_ACTIVATEAPP = true;
    Game.ProtoInput.FocusLoop_WM_NCACTIVATE = true;
    Game.ProtoInput.FocusLoop_WM_SETFOCUS = true;
    Game.ProtoInput.FocusLoop_WM_MOUSEACTIVATE = true;
    Game.ProtoInput.BlockedMessages = [];
    Game.ProtoInput.RenameHandlesHook = false;
    Game.ProtoInput.RenameHandles = [];
    Game.ProtoInput.RenameNamedPipes = [];
  } else {
    Game.PauseBetweenProcessGrab = 5;
    Game.PauseBetweenStarts = 10;
  }

  Game.ProtoInput.OnInputLocked = function() {
    if (Context.HasKeyboardPlayer) {
      for (var i = 0; i < PlayerList.Count; i++) {
        var player = PlayerList[i];
        ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.FocusHooksHookID);
        ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.GetCursorPosHookID);
        ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.SetCursorPosHookID);
        ProtoInput.InstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.CursorVisibilityStateHookID);

        ProtoInput.StartFocusMessageLoop(player.ProtoInputInstanceHandle, 5, true, true, true, true, true);
        System.Threading.Thread.Sleep(1000);
        ProtoInput.SetRawInputBypass(player.ProtoInputInstanceHandle, false);
        ProtoInput.StopFocusMessageLoop(player.ProtoInputInstanceHandle);

        ProtoInput.EnableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.RawInputFilterID);
        ProtoInput.EnableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.KeyboardButtonFilterID);
        ProtoInput.EnableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.MouseButtonFilterID);
        ProtoInput.EnableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.WindowActivateFilterID);
        ProtoInput.EnableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.MouseWheelFilterID);
      }
    }
  };
  Game.ProtoInput.OnInputUnlocked = function() {
    for (var i = 0; i < PlayerList.Count; i++) {
      var player = PlayerList[i];
      ProtoInput.UninstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.FocusHooksHookID);
      ProtoInput.UninstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.GetCursorPosHookID);
      ProtoInput.UninstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.SetCursorPosHookID);
      ProtoInput.UninstallHook(player.ProtoInputInstanceHandle, ProtoInput.Values.CursorVisibilityStateHookID);

      ProtoInput.SetDrawFakeCursor(player.ProtoInputInstanceHandle, false);
      ProtoInput.SetRawInputBypass(player.ProtoInputInstanceHandle, true);

      ProtoInput.DisableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.RawInputFilterID);
      ProtoInput.DisableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.WindowActivateFilterID);
      ProtoInput.DisableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.MouseWheelFilterID);
      ProtoInput.DisableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.MouseButtonFilterID);
      ProtoInput.DisableMessageFilter(player.ProtoInputInstanceHandle, ProtoInput.Values.KeyboardButtonFilterID);
    }
  };
};