Grid 2 · handler “GRID 2”
Version 7
Release notes
added cockpit cam mod and fixed a focus loss issue
- Released
- Size
- 908 KB
- Downloads
- 8
- Check
- Verified
- SHA-256
- c5ef7f1d8fa6b48c09f74ebee7b72ce395683e01af814ca021cdddc0fd86f271
Files 81
| Path | Size |
|---|---|
| handler/cars/models/177/cameras.xml | 261 KB |
| handler/cars/models/190/cameras.xml | 250 KB |
| handler/cars/models/300/cameras.xml | 260 KB |
| handler/cars/models/320/cameras.xml | 268 KB |
| handler/cars/models/37r/cameras.xml | 260 KB |
| handler/cars/models/a4c/cameras.xml | 267 KB |
| handler/cars/models/a8c/cameras.xml | 261 KB |
| handler/cars/models/ato/cameras.xml | 261 KB |
| handler/cars/models/b1m/cameras.xml | 250 KB |
| handler/cars/models/bac/cameras.xml | 261 KB |
| handler/cars/models/bm3/cameras.xml | 269 KB |
| handler/cars/models/bos/cameras.xml | 268 KB |
| handler/cars/models/brz/cameras.xml | 250 KB |
| handler/cars/models/bug/cameras.xml | 261 KB |
| handler/cars/models/c63/cameras.xml | 250 KB |
| handler/cars/models/cat/cameras.xml | 261 KB |
| handler/cars/models/cha/cameras.xml | 260 KB |
| handler/cars/models/crt/cameras.xml | 250 KB |
| handler/cars/models/crz/cameras.xml | 209 KB |
| handler/cars/models/css/cameras.xml | 262 KB |
| handler/cars/models/e30/cameras.xml | 269 KB |
| handler/cars/models/foc/cameras.xml | 268 KB |
| handler/cars/models/gen/cameras.xml | 269 KB |
| handler/cars/models/giu/cameras.xml | 250 KB |
| handler/cars/models/gol/cameras.xml | 250 KB |
| handler/cars/models/ind/cameras.xml | 261 KB |
| handler/cars/models/koe/cameras.xml | 268 KB |
| handler/cars/models/ktm/cameras.xml | 261 KB |
| handler/cars/models/mac/cameras.xml | 284 KB |
| handler/cars/models/mf1/cameras.xml | 247 KB |
| handler/cars/models/mp4/cameras.xml | 260 KB |
| handler/cars/models/nsx/cameras.xml | 210 KB |
| handler/cars/models/pag/cameras.xml | 261 KB |
| handler/cars/models/r8l/cameras.xml | 261 KB |
| handler/cars/models/rs5/cameras.xml | 260 KB |
| handler/cars/models/rx1/cameras.xml | 260 KB |
| handler/cars/models/s15/cameras.xml | 250 KB |
| handler/cars/models/s20/cameras.xml | 268 KB |
| handler/cars/models/s60/cameras.xml | 261 KB |
| handler/cars/models/scr/cameras.xml | 269 KB |
| handler/cars/models/sky/cameras.xml | 260 KB |
| handler/cars/models/sl6/cameras.xml | 260 KB |
| handler/cars/models/slr/cameras.xml | 261 KB |
| handler/cars/models/sls/cameras.xml | 261 KB |
| handler/cars/models/ttr/cameras.xml | 260 KB |
| handler/cars/models/van/cameras.xml | 268 KB |
| handler/cars/models/vip/cameras.xml | 269 KB |
| handler/cars/models/xkr/cameras.xml | 260 KB |
| handler/cars/models/z06/cameras.xml | 260 KB |
| handler/cars/models/z28/cameras.xml | 250 KB |
| handler/cars/models/zag/cameras.xml | 265 KB |
| handler/cars/models/zen/cameras.xml | 261 KB |
| handler/hardware_settings_config.xml | 2.1 KB |
| handler/mods/Cockpit Cam Mod/cars/models/240/cameras.xml | 250 KB |
| handler/mods/Cockpit Cam Mod/cars/models/370/cameras.xml | 260 KB |
| handler/mods/Cockpit Cam Mod/cars/models/722/cameras.xml | 261 KB |
| handler/mods/Cockpit Cam Mod/cars/models/b12/cameras.xml | 250 KB |
| handler/mods/Cockpit Cam Mod/cars/models/bz4/cameras.xml | 250 KB |
| handler/mods/Cockpit Cam Mod/cars/models/cam/cameras.xml | 262 KB |
| handler/mods/Cockpit Cam Mod/cars/models/ccg/cameras.xml | 268 KB |
| handler/mods/Cockpit Cam Mod/cars/models/civ/cameras.xml | 250 KB |
| handler/mods/Cockpit Cam Mod/cars/models/cr2/cameras.xml | 250 KB |
| handler/mods/Cockpit Cam Mod/cars/models/e32/cameras.xml | 269 KB |
| handler/mods/Cockpit Cam Mod/cars/models/evx/cameras.xml | 268 KB |
| handler/mods/Cockpit Cam Mod/cars/models/go2/cameras.xml | 250 KB |
| handler/mods/Cockpit Cam Mod/cars/models/gtr/cameras.xml | 261 KB |
| handler/mods/Cockpit Cam Mod/cars/models/ind/cameras.xml | 247 KB |
| handler/mods/Cockpit Cam Mod/cars/models/ma2/cameras.xml | 284 KB |
| handler/mods/Cockpit Cam Mod/cars/models/mpg/cameras.xml | 260 KB |
| handler/mods/Cockpit Cam Mod/cars/models/r32/cameras.xml | 250 KB |
| handler/mods/Cockpit Cam Mod/cars/models/r3b/cameras.xml | 250 KB |
| handler/mods/Cockpit Cam Mod/cars/models/rx2/cameras.xml | 260 KB |
| handler/mods/Cockpit Cam Mod/cars/models/srs/cameras.xml | 250 KB |
| handler/mods/Cockpit Cam Mod/cars/models/stk/cameras.xml | 250 KB |
| handler/mods/Cockpit Cam Mod/cars/models/utf/cameras.xml | 250 KB |
| handler/mods/Cockpit Cam Mod/cars/models/wrx/cameras.xml | 268 KB |
| handler/mods/Cockpit Cam Mod/cars/models/z22/cameras.xml | 250 KB |
| handler/mods/Cockpit Cam Mod/cars/models/zig/cameras.xml | 250 KB |
| handler/mods/Cockpit Cam Mod/cars/models/zon/cameras.xml | 261 KB |
| handler/mods/configuration.xml | 57 B |
| handler.js | 11 KB |
handler.js
Plain textHub.Handler.Version = 7; // Released at https://hub.splitscreen.me/ on Thu Nov 17 2022 01:29:41 GMT+0000 (Coordinated Universal Time).
Hub.Handler.Id = "3zcxvWqWQqnJCKCWA";
Hub.Maintainer.Name = "Perserveruz";
Hub.Maintainer.Id = "nFAYvHKj75jAFRAgt";
var answers = ["Yes", "No"];
var answers1 = ["-", "0", "1", "2", "3", "4", "5", "6", "7", "8"];
var answers2 = ["No", "720p", "1080p"];
var answers3 = ["No", "Yes"];
Game.AddOption("Apply customized config for low end PCs?", "", "Config", answers3);
Game.AddOption("Apply Cockpit Cam Mod", "", "Mod", answers3);
Game.AddOption("Apply 720p or 1080p resolution and fullscreen for low-end PC (no splitscreen)", "", "resolution", answers2);
Game.AddOption("Enable music only in the first instance?", "", "Music", answers);
Game.AddOption("PC-ID", "If you are playing with other PCs in LAN, be sure to have different IDs", "id", answers1);
Game.KillMutex = ["Codemasters GRID 2"];
Game.FileSymlinkExclusions = ["steam_api.dll", "steam_appid.txt", "steam_interfaces.txt"];
Game.HandlerInterval = 100;
Game.UseGoldberg = true;
Game.GoldbergLanguage = "english";
Game.GoldbergNoLocalSave = true;
Game.UseNucleusEnvironment = true;
Game.SymlinkExe = false;
Game.HardlinkGame = true;
Game.KeepSymLinkOnExit = true;
Game.SymlinkFolders = false;
Game.SupportsKeyboard = false;
Game.ExecutableName = "grid2_avx.exe";
Game.SteamID = "44350";
Game.GUID = "GRID 2";
Game.GameName = "GRID 2";
Game.MaxPlayers = 4;
Game.MaxPlayersOneMonitor = 4;
Game.HideTaskbar = false;
Game.Hook.ForceFocus = true;
Game.Hook.ForceFocusWindowName = "GRID 2";
Game.HookFocus = false;
Game.FakeFocus = false;
Game.PreventWindowDeactivation = true;
Game.Hook.DInputEnabled = false;
Game.Hook.DInputForceDisable = true;
Game.Hook.XInputEnabled = true;
Game.Hook.XInputReroute = false;
Game.Hook.UseAlpha8CustomDll = false;
Game.Hook.CustomDllEnabled = false;
Game.XInputPlusDll = ["xinput1_3.dll"];
Game.UserProfileSavePath = "AppData\\Roaming\\Goldberg SteamEmu Saves\\44350";
Game.PauseBetweenProcessGrab = 10;
Game.PauseBetweenProcessStarts = 10;
Game.ResetWindows = true;
Game.Description =
"Once prompted, select the grid2_avx.exe. Once in game, launch an online event session (ignore the connection refused message as the online match will work regardless of this). Once the session has been created, have the other instances connect to the session by selecting quick match. To play with multiple PCs over LAN, (only) the connecting PCs will need to edit one of the lines of the GRID 2 script. The line is Game.PlayerSteamIDs and the last two digits of each of the four sets of numbers must be changed so that each PC has its own unique sets of numbers. The game supports AI in multiplayer mode and has native split screen in offline mode. Have fun!";
Game.Play = function() {
var Mod = Context.Options["Mod"];
if (Mod == "No") {
}
if (Mod == "Yes") {
Context.CopyScriptFolder(Context.GetFolder(Nucleus.Folder.InstancedGameFolder));
var Args = "-mod" + Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\mods\\configuration.xml";
Context.StartArguments = Args;
}
var txtPath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\Xinputplus.ini";
var dict = ["16|LB=RSB", "19|RSB=LB"];
Context.ReplaceLinesInTextFile(txtPath, dict);
var autoExec = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\steam_interfaces.txt";
var lines = [
"SteamClient012",
"SteamGameServer011",
"SteamGameServerStats001",
"SteamUser016",
"SteamFriends013",
"SteamUtils005",
"SteamMatchMaking009",
"SteamMatchMakingServers002",
"STEAMUSERSTATS_INTERFACE_VERSION011",
"STEAMAPPS_INTERFACE_VERSION005",
"SteamNetworking005",
"STEAMREMOTESTORAGE_INTERFACE_VERSION010",
"STEAMSCREENSHOTS_INTERFACE_VERSION002",
"STEAMHTTP_INTERFACE_VERSION002",
"STEAMUNIFIEDMESSAGES_INTERFACE_VERSION001"
];
Context.WriteTextFile(autoExec, lines);
var filePath = Context.EnvironmentPlayer + "\\Documents";
System.IO.Directory.CreateDirectory(filePath);
var filePath = Context.EnvironmentPlayer + "\\Documents\\My Games";
System.IO.Directory.CreateDirectory(filePath);
var filePath = Context.EnvironmentPlayer + "\\Documents\\My Games\\Grid 2";
System.IO.Directory.CreateDirectory(filePath);
var filePath = Context.EnvironmentPlayer + "\\Documents\\My Games\\Grid 2\\hardwaresettings";
System.IO.Directory.CreateDirectory(filePath);
if (!System.IO.File.Exists(Context.EnvironmentPlayer + "\\Documents\\My Games\\Grid 2\\hardwaresettings\\hardware_settings_config.xml")) {
var savePath = Context.EnvironmentPlayer + "\\Documents\\My Games\\Grid 2\\hardwaresettings\\hardware_settings_config.xml";
var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "hardware_settings_config.xml");
System.IO.File.Copy(savePkgOrigin, savePath, true);
}
var Config = Context.Options["Config"];
if (Config == "Yes") {
var savePath = Context.EnvironmentPlayer + "\\Documents\\My Games\\Grid 2\\hardwaresettings\\hardware_settings_config.xml";
var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "hardware_settings_config.xml");
System.IO.File.Copy(savePkgOrigin, savePath, true);
}
if (Config == "No") {
}
var resolution = Context.Options["resolution"];
if (resolution == "No") {
var path = Context.EnvironmentPlayer + "\\Documents\\My Games\\Grid 2\\hardwaresettings\\hardware_settings_config.xml";
Context.ChangeXmlAttributeValue(path, "//resolution", "width", Context.Width);
Context.ChangeXmlAttributeValue(path, "//resolution", "height", Context.Height);
Context.ChangeXmlAttributeValue(path, "//resolution", "fullscreen", "false");
}
var resolution = Context.Options["resolution"];
if (resolution == "720p") {
Game.DontResize = true;
Game.DontReposition = true;
Game.DontRemoveBorders = true;
Game.PreventWindowDeactivation = false;
var path = Context.EnvironmentPlayer + "\\Documents\\My Games\\Grid 2\\hardwaresettings\\hardware_settings_config.xml";
Context.ChangeXmlAttributeValue(path, "//resolution", "width", 1280);
Context.ChangeXmlAttributeValue(path, "//resolution", "height", 720);
Context.ChangeXmlAttributeValue(path, "//resolution", "fullscreen", "true");
var savePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\XinputPlus.ini";
Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [
new Nucleus.IniSaveInfo("ControllerNumber", "Controller1", "1"),
new Nucleus.IniSaveInfo("ControllerNumber", "Controller2", "2"),
new Nucleus.IniSaveInfo("ControllerNumber", "Controller3", "3"),
new Nucleus.IniSaveInfo("ControllerNumber", "Controller4", "4")
]);
}
var resolution = Context.Options["resolution"];
if (resolution == "1080p") {
Game.DontResize = true;
Game.DontReposition = true;
Game.DontRemoveBorders = true;
Game.PreventWindowDeactivation = false;
var path = Context.EnvironmentPlayer + "\\Documents\\My Games\\Grid 2\\hardwaresettings\\hardware_settings_config.xml";
Context.ChangeXmlAttributeValue(path, "//resolution", "width", 1920);
Context.ChangeXmlAttributeValue(path, "//resolution", "height", 1080);
Context.ChangeXmlAttributeValue(path, "//resolution", "fullscreen", "true");
var savePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\XinputPlus.ini";
Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [
new Nucleus.IniSaveInfo("ControllerNumber", "Controller1", "1"),
new Nucleus.IniSaveInfo("ControllerNumber", "Controller2", "2"),
new Nucleus.IniSaveInfo("ControllerNumber", "Controller3", "3"),
new Nucleus.IniSaveInfo("ControllerNumber", "Controller4", "4")
]);
}
var Music = Context.Options["Music"];
if (Music == "Yes") {
if (Context.PlayerID == 0) {
} else {
var path = Context.EnvironmentPlayer + "\\Documents\\My Games\\Grid 2\\hardwaresettings\\hardware_settings_config.xml";
Context.ChangeXmlAttributeValue(path, "//music", "level", "0.00");
Context.ChangeXmlAttributeValue(path, "//speech", "level", "0.00");
}
}
if (Music == "No") {
var path = Context.EnvironmentPlayer + "\\Documents\\My Games\\Grid 2\\hardwaresettings\\hardware_settings_config.xml";
Context.ChangeXmlAttributeValue(path, "//music", "level", "100.00");
Context.ChangeXmlAttributeValue(path, "//speech", "level", "100.00");
}
var id = Context.Options["id"];
var idF = 33 * id + Context.PlayerID;
if (id != "-") {
}
if (id < 3) {
var UserID = Context.NucleusUserRoot + "\\NucleusCoop" + "\\" + Context.Nickname + "\\AppData\\Roaming\\Goldberg SteamEmu Saves\\settings\\user_steam_id.txt";
var IdNumber = ["765611979729000" + idF];
Context.WriteTextFile(UserID, IdNumber);
}
if (id == 3 && Context.PlayerID == 0) {
var UserID = Context.NucleusUserRoot + "\\NucleusCoop" + "\\" + Context.Nickname + "\\AppData\\Roaming\\Goldberg SteamEmu Saves\\settings\\user_steam_id.txt";
var IdNumber = ["765611979729000" + idF];
Context.WriteTextFile(UserID, IdNumber);
}
if (id == 3 && Context.PlayerID > 0) {
var UserID = Context.NucleusUserRoot + "\\NucleusCoop" + "\\" + Context.Nickname + "\\AppData\\Roaming\\Goldberg SteamEmu Saves\\settings\\user_steam_id.txt";
var IdNumber = ["76561197972900" + idF];
Context.WriteTextFile(UserID, IdNumber);
}
if (id > 3 && id < 30) {
var UserID = Context.NucleusUserRoot + "\\NucleusCoop" + "\\" + Context.Nickname + "\\AppData\\Roaming\\Goldberg SteamEmu Saves\\settings\\user_steam_id.txt";
var IdNumber = ["76561197972900" + idF];
Context.WriteTextFile(UserID, IdNumber);
}
if (id == 30 && Context.PlayerID < 11) {
var UserID = Context.NucleusUserRoot + "\\NucleusCoop" + "\\" + Context.Nickname + "\\AppData\\Roaming\\Goldberg SteamEmu Saves\\settings\\user_steam_id.txt";
var IdNumber = ["76561197972900" + idF];
Context.WriteTextFile(UserID, IdNumber);
}
if (id == 30 && Context.PlayerID > 10) {
var UserID = Context.NucleusUserRoot + "\\NucleusCoop" + "\\" + Context.Nickname + "\\AppData\\Roaming\\Goldberg SteamEmu Saves\\settings\\user_steam_id.txt";
var IdNumber = ["7656119797290" + idF];
Context.WriteTextFile(UserID, IdNumber);
}
if (id > 30) {
var UserID = Context.NucleusUserRoot + "\\NucleusCoop" + "\\" + Context.Nickname + "\\AppData\\Roaming\\Goldberg SteamEmu Saves\\settings\\user_steam_id.txt";
var IdNumber = ["7656119797290" + idF];
Context.WriteTextFile(UserID, IdNumber);
}
};