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

Grid 2 · handler “GRID 2”

Version 14 (current)

Release notes

inadvertently uploaded the handler of another game. this is now the correct one.

Released
Size
910 KB
Downloads
690
Check
Verified
SHA-256
319f363df0b2d11cfdfb484c2925b638d1c560ad5f6c280e4ea5ed536f08daa0
Download v14 (.nc)All versions

Files 83

PathSize
handler/cars/models/177/cameras.xml261 KB
handler/cars/models/190/cameras.xml250 KB
handler/cars/models/300/cameras.xml260 KB
handler/cars/models/320/cameras.xml268 KB
handler/cars/models/37r/cameras.xml260 KB
handler/cars/models/a4c/cameras.xml267 KB
handler/cars/models/a8c/cameras.xml261 KB
handler/cars/models/ato/cameras.xml261 KB
handler/cars/models/b1m/cameras.xml250 KB
handler/cars/models/bac/cameras.xml261 KB
handler/cars/models/bm3/cameras.xml269 KB
handler/cars/models/bos/cameras.xml268 KB
handler/cars/models/brz/cameras.xml250 KB
handler/cars/models/bug/cameras.xml261 KB
handler/cars/models/c63/cameras.xml250 KB
handler/cars/models/cat/cameras.xml261 KB
handler/cars/models/cha/cameras.xml260 KB
handler/cars/models/crt/cameras.xml250 KB
handler/cars/models/crz/cameras.xml209 KB
handler/cars/models/css/cameras.xml262 KB
handler/cars/models/e30/cameras.xml269 KB
handler/cars/models/foc/cameras.xml268 KB
handler/cars/models/gen/cameras.xml269 KB
handler/cars/models/giu/cameras.xml250 KB
handler/cars/models/gol/cameras.xml250 KB
handler/cars/models/ind/cameras.xml261 KB
handler/cars/models/koe/cameras.xml268 KB
handler/cars/models/ktm/cameras.xml261 KB
handler/cars/models/mac/cameras.xml284 KB
handler/cars/models/mf1/cameras.xml247 KB
handler/cars/models/mp4/cameras.xml260 KB
handler/cars/models/nsx/cameras.xml210 KB
handler/cars/models/pag/cameras.xml261 KB
handler/cars/models/r8l/cameras.xml261 KB
handler/cars/models/rs5/cameras.xml260 KB
handler/cars/models/rx1/cameras.xml260 KB
handler/cars/models/s15/cameras.xml250 KB
handler/cars/models/s20/cameras.xml268 KB
handler/cars/models/s60/cameras.xml261 KB
handler/cars/models/scr/cameras.xml269 KB
handler/cars/models/sky/cameras.xml260 KB
handler/cars/models/sl6/cameras.xml260 KB
handler/cars/models/slr/cameras.xml261 KB
handler/cars/models/sls/cameras.xml261 KB
handler/cars/models/ttr/cameras.xml260 KB
handler/cars/models/van/cameras.xml268 KB
handler/cars/models/vip/cameras.xml269 KB
handler/cars/models/xkr/cameras.xml260 KB
handler/cars/models/z06/cameras.xml260 KB
handler/cars/models/z28/cameras.xml250 KB
handler/cars/models/zag/cameras.xml265 KB
handler/cars/models/zen/cameras.xml261 KB
handler/hardware_settings_config_High.xml2.1 KB
handler/hardware_settings_config_Low.xml2.1 KB
handler/hardware_settings_config_Med.xml2.1 KB
handler/mods/Cockpit Cam Mod/cars/models/240/cameras.xml250 KB
handler/mods/Cockpit Cam Mod/cars/models/370/cameras.xml260 KB
handler/mods/Cockpit Cam Mod/cars/models/722/cameras.xml261 KB
handler/mods/Cockpit Cam Mod/cars/models/b12/cameras.xml250 KB
handler/mods/Cockpit Cam Mod/cars/models/bz4/cameras.xml250 KB
handler/mods/Cockpit Cam Mod/cars/models/cam/cameras.xml262 KB
handler/mods/Cockpit Cam Mod/cars/models/ccg/cameras.xml268 KB
handler/mods/Cockpit Cam Mod/cars/models/civ/cameras.xml250 KB
handler/mods/Cockpit Cam Mod/cars/models/cr2/cameras.xml250 KB
handler/mods/Cockpit Cam Mod/cars/models/e32/cameras.xml269 KB
handler/mods/Cockpit Cam Mod/cars/models/evx/cameras.xml268 KB
handler/mods/Cockpit Cam Mod/cars/models/go2/cameras.xml250 KB
handler/mods/Cockpit Cam Mod/cars/models/gtr/cameras.xml261 KB
handler/mods/Cockpit Cam Mod/cars/models/ind/cameras.xml247 KB
handler/mods/Cockpit Cam Mod/cars/models/ma2/cameras.xml284 KB
handler/mods/Cockpit Cam Mod/cars/models/mpg/cameras.xml260 KB
handler/mods/Cockpit Cam Mod/cars/models/r32/cameras.xml250 KB
handler/mods/Cockpit Cam Mod/cars/models/r3b/cameras.xml250 KB
handler/mods/Cockpit Cam Mod/cars/models/rx2/cameras.xml260 KB
handler/mods/Cockpit Cam Mod/cars/models/srs/cameras.xml250 KB
handler/mods/Cockpit Cam Mod/cars/models/stk/cameras.xml250 KB
handler/mods/Cockpit Cam Mod/cars/models/utf/cameras.xml250 KB
handler/mods/Cockpit Cam Mod/cars/models/wrx/cameras.xml268 KB
handler/mods/Cockpit Cam Mod/cars/models/z22/cameras.xml250 KB
handler/mods/Cockpit Cam Mod/cars/models/zig/cameras.xml250 KB
handler/mods/Cockpit Cam Mod/cars/models/zon/cameras.xml261 KB
handler/mods/configuration.xml57 B
handler.js11 KB

handler.js

Plain text
Hub.Handler.Version = 14; // Released at https://hub.splitscreen.me/ on Fri Oct 25 2024 16:34:36 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"];
var answers4 = ["Default", "Low", "Med", "High"];
Game.AddOption("Select preferred graphic settings", "Select Default to load default or previously selected setting", "Graphics", answers4);
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.FileSymlinkCopyInstead = [
  "bink2w32.dll",
  "car_monitor_setup.xml",
  "example_benchmark.xml",
  "example_benchmark_attract.xml",
  "modifications.txt",
  "raceload.jpk",
  "surface_materials.xml",
  "wet_materials_remap.xml"
];
Game.HandlerInterval = 100;
Game.UseGoldberg = true;
Game.GoldbergNoLocalSave = true;
Game.UseNucleusEnvironment = true;
Game.GoldbergLanguage = "english";
Game.PlayerSteamIDs = [
  "76561199023125438",
  "76561199023125438",
  "76561199023125438",
  "76561199023125438",
  "76561199023125438",
  "76561199023125438",
  "76561199023125438",
  "76561199023125438",
  "76561199023125438",
  "76561199023125438"
];
Game.KeepSymLinkOnExit = true;
Game.SymlinkExe = false;
Game.SymlinkGame = true;
Game.SymlinkFolders = true;
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.BinariesFolder = "";
Game.LauncherTitle = "";
Game.HideTaskbar = false;
Game.Hook.ForceFocus = true;
Game.Hook.ForceFocusWindowName = "GRID 2";
Game.HookFocus = true;
Game.FakeFocus = true;
Game.FakeFocusSendActivate = false;
Game.PreventWindowDeactivation = 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.XInputPlusDll = ["XInput1_3.dll"];
Game.DocumentsConfigPath = "My Games\\Grid 2\\hardwaresettings";
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_Med.xml");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  var Graphics = Context.Options["Graphics"];
  if (Graphics == "Default") {
  }
  if (Graphics == "Low") {
    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_Low.xml");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }
  if (Graphics == "Med") {
    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_Med.xml");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }
  if (Graphics == "High") {
    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_High.xml");
    System.IO.File.Copy(savePkgOrigin, savePath, true);
  }

  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 savePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\XinputPlus.ini";
    Context.ModifySaveFile(savePath, savePath, Nucleus.SaveType.INI, [
      new Nucleus.IniSaveInfo("ControllerNumber", "Controller1", "" + Context.GamepadId + ""),
      new Nucleus.IniSaveInfo("ControllerNumber", "Controller2", ""),
      new Nucleus.IniSaveInfo("ControllerNumber", "Controller3", ""),
      new Nucleus.IniSaveInfo("ControllerNumber", "Controller4", "")
    ]);
  }

  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"];
  Game.PlayerSteamIDs = [
    "765611990231254" + id + "" + Context.PlayerID + "",
    "765611990231254" + id + "" + Context.PlayerID + "",
    "765611990231254" + id + "" + Context.PlayerID + "",
    "765611990231254" + id + "" + Context.PlayerID + "",
    "765611990231254" + id + "" + Context.PlayerID + "",
    "765611990231254" + id + "" + Context.PlayerID + "",
    "765611990231254" + id + "" + Context.PlayerID + "",
    "765611990231254" + id + "" + Context.PlayerID + "",
    "765611990231254" + id + "" + Context.PlayerID + "",
    "765611990231254" + id + "" + Context.PlayerID + ""
  ];
};