Call of Duty: World at War · handler “Call of Duty World at War”
Version 33
Release notes
Added 'unlockall' launch option, fixed gamepad hotkeys, it is now possible to play with both gamepads and mice/keyboard, fixed FOV aim down sight issue, replaced the mouse move loop autoit script with PowerShell
- Released
- Size
- 424 KB
- Downloads
- 32
- Check
- Verified
- SHA-256
- a630affed640346b986edb0b0ccfa1e18bd35a54dd1060bff71e5cfd2b8dcbbf
Files 35
| Path | Size |
|---|---|
| handler/Bots mod/z_svr_bots.iwd | 366 KB |
| handler/CoD profile.cfg | 1.2 KB |
| handler/Config files/plutonium.cfg | 16 KB |
| handler/Config files/plutonium_mp.cfg | 15 KB |
| handler/Config files/unlockstats | 8.0 KB |
| handler/F2Guest.au3 | 1.3 KB |
| handler/F2Guest.bat | 48 B |
| handler/F2Host.au3 | 1.2 KB |
| handler/F2Host.bat | 47 B |
| handler/F2HostMP.au3 | 884 B |
| handler/F2HostMP.bat | 49 B |
| handler/F3Restart.au3 | 349 B |
| handler/F3Restart.bat | 50 B |
| handler/GamepadMenu.au3 | 2.1 KB |
| handler/GamepadMenu.bat | 52 B |
| handler/JoyToKey.ini | 1.6 KB |
| handler/JoyToKey.log | 2.8 KB |
| handler/launch_gamepad.bat | 238 B |
| handler/launch_keyboard.bat | 231 B |
| handler/Local IP.txt | 19 B |
| handler/MouseMoveLoop.au3 | 288 B |
| handler/MouseMoveLoop.bat | 109 B |
| handler/MouseMoveLoop.ps1 | 1.3 KB |
| handler/osd.ini | 4.6 KB |
| handler/Players.txt | 23 B |
| handler/SpecialK/d3d9.ini | 4.3 KB |
| handler/startmultiplayer.au3 | 2.3 KB |
| handler/startmultiplayer.bat | 57 B |
| handler/startsingleplayer.au3 | 2.3 KB |
| handler/startsingleplayer.bat | 58 B |
| handler/Unlockall/Multiplayer/mpdata | 8.3 KB |
| handler/Unlockall/Multiplayer/mpdatabk0000 | 8.3 KB |
| handler/Unlockall/Zombies/mpdata | 8.3 KB |
| handler/Unlockall/Zombies/mpdatabk0000 | 8.3 KB |
| handler.js | 71 KB |
handler.js
Plain textHub.Handler.Version = 33; // Released at https://hub.splitscreen.me/ on Mon Aug 18 2025 13:17:46 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 Rezurrection",
"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"];
var answers12 = ["-", "1", "1.1", "1.2", "1.3", "1.4", "1.5"];
var answers13 = ["Default", "Yes"];
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", "Select the hyphen to load default or previously selected settings", "Bots", answers8);
Game.AddOption("Select the bot skill level for Multiplayer", "", "Skill", answers9);
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.AddOption("Select your preferred FOV scale", "Select the hyphen to load default settings", "FOV", answers12);
Game.AddOption("Would you like to unlock all in both Campaign and Multiplayer", "Default will not make any changes and keep the previous selected settings", "Unlock", answers13);
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 = false;
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 = false;
Game.SetWindowHookStart = false;
Game.PreventWindowDeactivation = false;
Game.KeyboardPlayerSkipPreventWindowDeactivate = false;
Game.SetForegroundWindowElsewhere = true;
Game.HideTaskbar = false;
Game.SetTopMostAtEnd = true;
Game.KillProcessesOnClose = ["connect", "cmd", "JoyToKey", "MouseMoveLoop", "AutoIt3", "Powershell"];
Game.Description =
"For best compatibility it is advisable to close Steam.\n\nSupports up to 4 gamepads as well as mice/keyboards. When playing with both gamepads and mice/Keyboards, make sure to assign your gamepad to the first instance.\n\nYou will need to download the complementary files from the following link: https://www.mediafire.com/file/n5qzlfk1zidrl7c/handler_files.zip/file and extract the zipped content (password is 1234) to your Call of Duty World at War handler folder located under NucleusCo-op/handlers/Call of Duty World at War/.\n\nFor Campaign/Zombies, prior to launching your instances, choose the number of players under the launch options in Nucleus.\n\nOnce 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 the SELECT+X buttons simultaneously on your gamepad to launch the match and to automatically connect all instances (please be patient as this can take some time).\n\nPress F3 or press the SELECT+Y buttons simultaneously on your gamepad to quickly restart match.\n\nTo 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. You will then need to run Nucleus as Administrator.\n\nFor Multiplayer, launch your instances and have the first player host a match.\n\nOnce in game, press F2 or press the SELECT+X buttons simultaneously on your gamepad to have all the other instances connect automatically.\n\nTo quickly restart your match press F3 or press the SELECT+Y buttons simultaneously on your gamepad.\n\nTo 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 the SELECT+X buttons simultaneously on your gamepad to connect all the guest instances to the host PC.\n\nPartial menu support has been added only for gamepads and after 1 second of mouse inactivity, the mouse pointer will be moved to the right top corner - this is required for menus to function properly.\n\nThe MouseMoveLoop powershell script will close automatically upon exiting Nucleus, you can press ctrl+q to quickly close Nucleus and all instances.\n\nThe winject32.exe may be blocked or flagged by windows defender as a potential viruses/threats, but I can guarantee it is none other than a false/positive as I got the injector from the following link https://www.unknowncheats.me/forum/general-programming-and-reversing/518833-winject-windows-injector.html and has been analyzed and cleared by one of their moderators.\n\nLast 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 + "\\F3Restart.bat"], 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\\players\\mods");
System.IO.Directory.CreateDirectory(filePath);
var filePath = (Context.filePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\mods\\mp_bots");
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, "OverrideRes=", Nucleus.SearchType.StartsWith) + "|OverrideRes=" + (Context.Width - 2) + "x" + (Context.Height),
Context.FindLineNumberInTextFile(txtPath, "SlotReassignment=", Nucleus.SearchType.StartsWith) + "|SlotReassignment=" + (Context.GamepadId - 1) + ""
];
Context.ReplaceLinesInTextFile(txtPath, dict);
Game.DontResize = true;
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") {
Context.RunAdditionalFiles([Context.ScriptFolder + "\\startsingleplayer.bat"], false, 10);
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\\launcher.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\\launcher.bat";
var lines = ['CALL "winject32.exe" d3d9.dll -s "bin\\plutonium-bootstrapper-win32.exe" t4sp "%~dp0.." -name "' + Context.Nickname + '" -lan'];
Context.WriteTextFile(Bat, lines);
Context.RunAdditionalFiles(["all|" + Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\launcher.bat"], false, 0);
// }
}
if (Mod > "-") {
var Bat = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\launcher.bat";
var lines = ['CALL "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);
Context.RunAdditionalFiles(["all|" + Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\launcher.bat"], false, 0);
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, false, false);
}
var lan = Context.Options["lan"];
if (lan == "-") {
Context.RunAdditionalFiles([Context.ScriptFolder + "\\F2Host.bat"], false, 10);
}
if (lan >= 0) {
Context.RunAdditionalFiles([Context.ScriptFolder + "\\F2Guest.bat"], 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);
}
var FOV = Context.Options["FOV"];
if (FOV >= "0") {
var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium.cfg";
var dict = [Context.FindLineNumberInTextFile(txtPath, "seta cg_fovScale", Nucleus.SearchType.StartsWith) + '|seta cg_fovScale "' + FOV + '"'];
Context.ReplaceLinesInTextFile(txtPath, dict);
}
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 - 2) + "x" + Context.Height + '"',
Context.FindLineNumberInTextFile(txtPath, "seta r_customMode", Nucleus.SearchType.StartsWith) + '|seta r_customMode "' + (Context.Width - 2) + "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 r_noborder", Nucleus.SearchType.StartsWith) + '|seta r_noborder "1"'
];
Context.ReplaceLinesInTextFile(txtPath, dict);
}
if (mode == "Multiplayer") {
Context.RunAdditionalFiles([Context.ScriptFolder + "\\startmultiplayer.bat"], false, 10);
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 (!System.IO.File.Exists(Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\launcher.bat")) {
var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\launcher.bat");
var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "launch_gamepad.bat");
System.IO.File.Copy(savePkgOrigin, savePath, true);
}
var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\launcher.bat";
var dict = [
Context.FindLineNumberInTextFile(
txtPath,
'CALL "winject32.exe" d3d9.dll -s "bin\\plutonium-bootstrapper-win32.exe" t4mp "%~dp0.." +set bots_manage_fill "18" -name',
Nucleus.SearchType.StartsWith
) +
'|CALL "winject32.exe" d3d9.dll -s "bin\\plutonium-bootstrapper-win32.exe" t4mp "%~dp0.." +set bots_manage_fill "18" -name "' +
Context.Nickname +
'" -lan +set fs_game mods/mp_bots +set bots_skill "2" +set bots_main_waitForHostTime 360 +set bots_manage_fill_kick 1 +set bots_team_force 1 +exec z_svr_bots.cfg'
];
Context.ReplaceLinesInTextFile(txtPath, dict);
var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\launcher.bat";
var dict = [
Context.FindLineNumberInTextFile(txtPath, '"bin\\plutonium-bootstrapper-win32.exe" t4mp "%~dp0.." +set bots_manage_fill "18" -name', Nucleus.SearchType.StartsWith) +
'|CALL "winject32.exe" d3d9.dll -s "bin\\plutonium-bootstrapper-win32.exe" t4mp "%~dp0.." +set bots_manage_fill "18" -name "' +
Context.Nickname +
'" -lan +set fs_game mods/mp_bots +set bots_skill "2" +set bots_main_waitForHostTime 360 +set bots_manage_fill_kick 1 +set bots_team_force 1 +exec z_svr_bots.cfg'
];
Context.ReplaceLinesInTextFile(txtPath, dict);
var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\launcher.bat";
var dict = [
Context.FindLineNumberInTextFile(txtPath, 'CALL "winject32.exe" d3d9.dll -s "bin\\plutonium-bootstrapper-win32.exe" t4sp', Nucleus.SearchType.StartsWith) +
'|CALL "winject32.exe" d3d9.dll -s "bin\\plutonium-bootstrapper-win32.exe" t4mp "%~dp0.." +set bots_manage_fill "18" -name "' +
Context.Nickname +
'" -lan +set fs_game mods/mp_bots +set bots_skill "2" +set bots_main_waitForHostTime 360 +set bots_manage_fill_kick 1 +set bots_team_force 1 +exec z_svr_bots.cfg'
];
Context.ReplaceLinesInTextFile(txtPath, dict);
var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\launcher.bat";
var dict = [
Context.FindLineNumberInTextFile(txtPath, '"bin\\plutonium-bootstrapper-win32.exe" t4sp', Nucleus.SearchType.StartsWith) +
'|CALL "winject32.exe" d3d9.dll -s "bin\\plutonium-bootstrapper-win32.exe" t4mp "%~dp0.." +set bots_manage_fill "18" -name "' +
Context.Nickname +
'" -lan +set fs_game mods/mp_bots +set bots_skill "2" +set bots_main_waitForHostTime 360 +set bots_manage_fill_kick 1 +set bots_team_force 1 +exec z_svr_bots.cfg'
];
Context.ReplaceLinesInTextFile(txtPath, dict);
Context.RunAdditionalFiles(["all|" + Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\launcher.bat"], false, 0);
}
if (Bots == "0") {
var Bat = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\launcher.bat";
var lines = ['CALL "winject32.exe" d3d9.dll -s "bin\\plutonium-bootstrapper-win32.exe" t4mp "%~dp0.." -name "' + Context.Nickname + '" -lan'];
Context.WriteTextFile(Bat, lines);
Context.RunAdditionalFiles(["all|" + Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\launcher.bat"], false, 0);
}
if (Bots >= "1") {
var Bat = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\launcher.bat";
var lines = [
'CALL "winject32.exe" d3d9.dll -s "bin\\plutonium-bootstrapper-win32.exe" t4mp "%~dp0.." +set bots_manage_fill "' +
Bots +
'" -name "' +
Context.Nickname +
'" -lan +set fs_game mods/mp_bots +set bots_skill "' +
Skill +
'" +set bots_main_waitForHostTime 360 +set bots_manage_fill_kick 1 +set bots_team_force 1 +exec z_svr_bots.cfg'
];
Context.WriteTextFile(Bat, lines);
Context.RunAdditionalFiles(["all|" + Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\launcher.bat"], false, 0);
}
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 + "\\F2HostMP.bat"], false, 10);
}
if (lan >= 0) {
Context.RunAdditionalFiles([Context.ScriptFolder + "\\F2Guest.bat"], 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);
}
var FOV = Context.Options["FOV"];
if (FOV >= "0") {
var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium_mp.cfg";
var dict = [Context.FindLineNumberInTextFile(txtPath, "seta cg_fovScale", Nucleus.SearchType.StartsWith) + '|seta cg_fovScale "' + FOV + '"'];
Context.ReplaceLinesInTextFile(txtPath, dict);
}
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 - 2) + "x" + Context.Height + '"',
Context.FindLineNumberInTextFile(txtPath, "seta r_customMode", Nucleus.SearchType.StartsWith) + '|seta r_customMode "' + (Context.Width - 2) + "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 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") {
var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium_mp.cfg";
var dict = [Context.FindLineNumberInTextFile(txtPath, "seta sd_xa2_device_guid", Nucleus.SearchType.StartsWith) + '|seta sd_xa2_device_guid ""'];
Context.ReplaceLinesInTextFile(txtPath, dict);
}
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.FindLineNumberInTextFile(txtPath, "seta sd_xa2_device_guid", Nucleus.SearchType.StartsWith) + '|seta sd_xa2_device_guid ""'
];
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.FindLineNumberInTextFile(txtPath, "seta sd_xa2_device_guid", Nucleus.SearchType.StartsWith) + '|seta sd_xa2_device_guid ""'
];
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.FindLineNumberInTextFile(txtPath, "seta sd_xa2_device_guid", Nucleus.SearchType.StartsWith) + '|seta sd_xa2_device_guid ""'
];
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.FindLineNumberInTextFile(txtPath, "seta sd_xa2_device_guid", Nucleus.SearchType.StartsWith) + '|seta sd_xa2_device_guid ""'
];
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.FindLineNumberInTextFile(txtPath, "seta sd_xa2_device_guid", Nucleus.SearchType.StartsWith) + '|seta sd_xa2_device_guid ""'
];
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.FindLineNumberInTextFile(txtPath, "seta sd_xa2_device_guid", Nucleus.SearchType.StartsWith) + '|seta sd_xa2_device_guid ""'
];
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);
Context.EditRegKey(
"HKEY_CURRENT_USER",
"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AppCompatFlags\\Layers",
"" + Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\bin\\plutonium-bootstrapper-win32.exe",
"HIGHDPIAWARE",
Nucleus.RegType.String
);
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"));
// }
}
var Unlock = Context.Options["Unlock"];
if (Unlock == "Default") {
}
if (Unlock == "Yes") {
var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\mods\\mp_bots\\mpdata");
var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "Unlockall\\Multiplayer\\mpdata");
System.IO.File.Copy(savePkgOrigin, savePath, true);
var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\mods\\mp_bots\\mpdatabk0000");
var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "Unlockall\\Multiplayer\\mpdatabk0000");
System.IO.File.Copy(savePkgOrigin, savePath, true);
var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\mpdata");
var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "Unlockall\\Zombies\\mpdata");
System.IO.File.Copy(savePkgOrigin, savePath, true);
var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\mpdatabk0000");
var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "Unlockall\\Zombies\\mpdatabk0000");
System.IO.File.Copy(savePkgOrigin, savePath, true);
}
if (Player.IsRawKeyboard) {
Game.PauseBetweenProcessGrab = 10;
Game.PauseBetweenStarts = 10;
Game.InjectHookXinput = false;
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 = [];
}
if (Context.HasKeyboardPlayer == true) {
if (Player.IsController) {
Game.HookFocus = false;
Game.FakeFocus = true;
Game.PauseBetweenProcessGrab = 10;
Game.PauseBetweenStarts = 10;
Context.RunAdditionalFiles([Context.ScriptFolder + "\\GamepadMenu.bat"], false, 0);
}
}
if (Context.HasKeyboardPlayer == false) {
if (Player.IsController) {
Game.HookFocus = false;
Game.FakeFocus = true;
Game.PauseBetweenProcessGrab = 10;
Game.PauseBetweenStarts = 10;
Context.RunAdditionalFiles([Context.ScriptFolder + "\\GamepadMenu.bat"], false, 0);
Context.RunAdditionalFiles([Context.ScriptFolder + "\\MouseMoveLoop.bat"], false, 0);
}
}
var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium_mp.cfg";
var dict = [
Context.FindLineNumberInTextFile(txtPath, "seta vid_xpos", Nucleus.SearchType.StartsWith) + '|seta vid_xpos "' + Context.PosX + '"',
Context.FindLineNumberInTextFile(txtPath, "seta vid_ypos", Nucleus.SearchType.StartsWith) + '|seta vid_ypos "' + Context.PosY + '"'
];
Context.ReplaceLinesInTextFile(txtPath, dict);
var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Plutonium\\storage\\t4\\players\\plutonium.cfg";
var dict = [
Context.FindLineNumberInTextFile(txtPath, "seta vid_xpos", Nucleus.SearchType.StartsWith) + '|seta vid_xpos "' + Context.PosX + '"',
Context.FindLineNumberInTextFile(txtPath, "seta vid_ypos", Nucleus.SearchType.StartsWith) + '|seta vid_ypos "' + Context.PosY + '"'
];
Context.ReplaceLinesInTextFile(txtPath, dict);
Game.ResetWindows = false;
Game.DontReposition = false;
Game.DontRemoveBorders = false;
Game.DontResize = false;
Game.ProtoInput.OnInputLocked = function() {
if (Player.IsRawKeyboard) {
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);
}
};
};