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

V Rising · handler “V Rising”

Version 2

Release notes

removed some lines, added Dedicated server compatibility

Released
Size
680 KB
Downloads
1,164
Check
Verified
SHA-256
d797a1b3cc6c03f41addae7ae6750e9b59b32e06b350627014988a2785f41f29
Download v2 (.nc)All versions

Files 3

PathSize
handler.js10 KB
V Rising/checknucleus.bat841 B
V Rising/steam_api64.dll1.8 MB

handler.js

Plain text
Hub.Handler.Version = 2; // Released at https://hub.splitscreen.me/ on Sun Jul 10 2022 19:07:42 GMT+0000 (Coordinated Universal Time).
Hub.Handler.Id = "7cS2MybpctbnuntvQ";
Hub.Maintainer.Name = "Vlxst";
Hub.Maintainer.Id = "wZTsDsXZnJhD4fwfz";

var answers = ["Default/No!", "Yes!"];
Game.AddOption("Host a local dedicated server?", "always use LAN option when connecting to any server.", "select", answers);

Game.ExecutableContext = ["VRising_Data"];
Game.DirSymlinkExclusions = ["VRising_Data\\Plugins\\x86_64", "VRising_Server\\VRisingServer_Data\\Plugins\\x86_64"];
Game.FileSymlinkExclusions = ["steam_api64.dll", "steam_appid.txt"];
Game.FileSymlinkCopyInstead = ["VRisingServer.exe", "ServerGameSettings.json", "ServerHostSettings.json", "UnityCrashHandler64.exe"];
Game.GameName = "V Rising";
Game.HandlerInterval = 100;
Game.SteamID = "1604030";
Game.CreateSteamAppIdByExe = true;
Game.GUID = "V Rising";
Game.SymlinkExe = false;
Game.SymlinkGame = true;
Game.SymlinkFolders = true;
Game.ExecutableName = "VRising.exe";
Game.MaxPlayersOneMonitor = 4;
Game.MaxPlayers = 4;
Game.UseGoldberg = true;
Game.LauncherTitle = "";
Game.Hook.ForceFocus = true;
Game.Hook.ForceFocusWindowName = "VRising";
Game.FakeFocus = true;
Game.FakeFocusInterval = 40000;
Game.SendFakeFocusMsg = true;
Game.SetWindowHook = false;
Game.ResetWindows = true;
Game.SetForegroundWindowElsewhere = true;
Game.IgnoreWindowBorderCheck = true;
Game.Hook.DInputEnabled = false;
Game.Hook.XInputEnabled = false;
Game.Hook.XInputReroute = false;
Game.Hook.CustomDllEnabled = false;
Game.UserProfileSavePath = "AppData\\LocalLow\\Stunlock Studios\\VRising";
Game.UserProfileConfigPath = "AppData\\LocalLow\\Stunlock Studios\\VRising\\Settings";
Game.UserProfileSavePathNoCopy = true;
Game.Description =
  "IMPORTANT: Run your main game, change some graphics settings and close it before launching this. You need to add custom resolutions in your AMD/Nvidia/Intel panel (for example if you have a 1920x1080 monitor add custom resolutions like: 960x1080, 1920x540, 960x540 etc.) !!!NOT ALL VERTICAL RESOLUTIONS ARE SUPPORTED, SO CHANGE THE LAYOUT TO HORIZONTAL!!!. so the game can see and use them and for the instances to resize correctly. After all the instances have launched, resized and positioned correctly, press the END key once to lock the input for all instances to have their own cursor. You need to left click each mouse to make the emulated cursors appear after locking the input. Press the END key again to unlock the input when you finish playing. You can also use CTRL+Q to close Nucleus and all its instances when the input is unlocked. Alt-Tab to the Nucleus window before locking the input to balance fps. Multiple keyboards/mice only as the game lacks native gamepad support.";
Game.PauseBetweenProcessGrab = 5;
Game.PauseBetweenStarts = 25;
Game.KillProcessesOnClose = ["cmd", "VRisingServer"];

//USS 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.InjectHookXinput = false;

Game.SendNormalMouseInput = false;
Game.SendNormalKeyboardInput = false;
Game.SendScrollWheel = false;
Game.ForwardRawKeyboardInput = false;
Game.ForwardRawMouseInput = false;
Game.HookReRegisterRawInput = false;
Game.HookReRegisterRawInputMouse = false;
Game.HookReRegisterRawInputKeyboard = false;
Game.DrawFakeMouseCursor = false;

//ProtoInput:

Game.SupportsMultipleKeyboardsAndMice = true;

Game.ProtoInput.InjectStartup = false;
Game.ProtoInput.InjectRuntime_RemoteLoadMethod = false;
Game.ProtoInput.InjectRuntime_EasyHookMethod = true;
Game.ProtoInput.InjectRuntime_EasyHookStealthMethod = false;

Game.LockInputAtStart = false;
Game.LockInputSuspendsExplorer = true;
Game.ProtoInput.FreezeExternalInputWhenInputNotLocked = false;
Game.LockInputToggleKey = 0x23;

Game.ProtoInput.RenameHandlesHook = false;
Game.ProtoInput.RenameHandles = [];
Game.ProtoInput.RenameNamedPipes = [];

Game.ProtoInput.RegisterRawInputHook = true;
Game.ProtoInput.GetRawInputDataHook = true;
Game.ProtoInput.MessageFilterHook = true;
Game.ProtoInput.GetCursorPosHook = true;
Game.ProtoInput.SetCursorPosHook = true;
Game.ProtoInput.GetKeyStateHook = true;
Game.ProtoInput.GetAsyncKeyStateHook = true;
Game.ProtoInput.GetKeyboardStateHook = true;
Game.ProtoInput.CursorVisibilityHook = true;
Game.ProtoInput.ClipCursorHook = true;
Game.ProtoInput.FocusHooks = true;
Game.ProtoInput.DrawFakeCursor = true;
Game.ProtoInput.ClipCursorHookCreatesFakeClip = false;
Game.ProtoInput.EnableToggleFakeCursorVisibilityShortcut = false;
Game.ProtoInput.DontShowCursorWhenImageUpdated = false;
Game.ProtoInput.AutoHideTaskbar = false;
Game.HideDesktop = false;

Game.ProtoInput.RawInputFilter = true;
Game.ProtoInput.MouseMoveFilter = false;
Game.ProtoInput.MouseActivateFilter = true;
Game.ProtoInput.WindowActivateFilter = true;
Game.ProtoInput.WindowActvateAppFilter = true;
Game.ProtoInput.MouseWheelFilter = true;
Game.ProtoInput.MouseButtonFilter = true;
Game.ProtoInput.KeyboardButtonFilter = true;

Game.ProtoInput.SendMouseWheelMessages = true;
Game.ProtoInput.SendMouseButtonMessages = true;
Game.ProtoInput.SendMouseMovementMessages = true;
Game.ProtoInput.SendKeyboardButtonMessages = true;
Game.ProtoInput.XinputHook = false;
Game.ProtoInput.UseOpenXinput = false;
Game.ProtoInput.UseDinputRedirection = false;
Game.ProtoInput.DinputDeviceHook = false;
Game.ProtoInput.DinputHookAlsoHooksGetDeviceState = false;

Game.ProtoInput.EnableFocusMessageLoop = false;
//Game.ProtoInput.FocusLoopIntervalMilliseconds = 5;
//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 = [0x0008, 0x02a3, 0x02a1]; // Blocks WM_KILLFOCUS, WM_MOUSEHOVER and WM_MOUSELEAVE

Game.Play = function() {
  var Args = (Context.Args = " -screen-fullscreen 0 -popupwindow " + " -screen-width " + Context.Width + " -screen-height " + Context.Height);

  Context.StartArguments = Args;

  ///////////// settings the DLCs
  var filePath = (Context.filePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\VRising_Data\\Plugins\\x86_64\\steam_settings");
  System.IO.Directory.CreateDirectory(filePath);

  ///// New goldberg version
  var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\VRising_Data\\Plugins\\x86_64\\steam_api64.dll");
  var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "steam_api64.dll");
  System.IO.File.Copy(savePkgOrigin, savePath, true);

  var savePath = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\VRising_Server\\VRisingServer_Data\\Plugins\\x86_64\\steam_api64.dll");
  var savePkgOrigin = System.IO.Path.Combine(Game.Folder, "steam_api64.dll");
  System.IO.File.Copy(savePkgOrigin, savePath, true);

  /////////////  edit CLientSettings.json
  var txtPath = Context.NucleusUserRoot + "\\" + Context.UserProfileConfigPath + "\\ClientSettings.json";
  var dict = [
    Context.FindLineNumberInTextFile(txtPath, '      "x": ', Nucleus.SearchType.StartsWith) + '|      "x": ' + Context.Width + ",",
    Context.FindLineNumberInTextFile(txtPath, '      "y": ', Nucleus.SearchType.StartsWith) + '|      "y": ' + Context.Height,
    Context.FindLineNumberInTextFile(txtPath, '    "WindowMode": ', Nucleus.SearchType.StartsWith) + '|    "WindowMode": 3,',
    Context.FindLineNumberInTextFile(txtPath, '    "EnableGameAnalytics": ', Nucleus.SearchType.StartsWith) + '|    "EnableGameAnalytics": false,',
    Context.FindLineNumberInTextFile(txtPath, '    "HasSeenCinematic": ', Nucleus.SearchType.StartsWith) + '|    "HasSeenCinematic": true,',
    Context.FindLineNumberInTextFile(txtPath, '    "HasCompletedFirstStartup": ', Nucleus.SearchType.StartsWith) + '|    "HasCompletedFirstStartup": true'
  ];
  Context.ReplaceLinesInTextFile(txtPath, dict);

  ///////////// Registry edit
  Context.EditRegKey("HKEY_CURRENT_USER", "SOFTWARE\\Stunlock Studios\\VRising", "Screenmanager Fullscreen mode_h3630240806", 3, Nucleus.RegType.DWord);

  Context.EditRegKey("HKEY_CURRENT_USER", "SOFTWARE\\Stunlock Studios\\VRising", "Fullscreen_h2248877754", 0, Nucleus.RegType.DWord);

  Context.EditRegKey("HKEY_CURRENT_USER", "SOFTWARE\\Stunlock Studios\\VRising", "Screenmanager Resolution Height_h2627697771", Context.Height, Nucleus.RegType.DWord);

  Context.EditRegKey("HKEY_CURRENT_USER", "SOFTWARE\\Stunlock Studios\\VRising", "Screenmanager Resolution Width_h182942802", Context.Width, Nucleus.RegType.DWord);

  Context.EditRegKey("HKEY_CURRENT_USER", "SOFTWARE\\Stunlock Studios\\VRising", "Screenmanager Resolution Use Native_h1405027254", 0, Nucleus.RegType.DWord);

  Context.EditRegKey("HKEY_CURRENT_USER", "SOFTWARE\\Stunlock Studios\\VRising", "Screenmanager Resolution Use Native Default_h1405981789", 0, Nucleus.RegType.DWord);

  if (Context.AspectRatioDecimal > 1.8) {
  } else if (Context.AspectRatioDecimal < 1.2) {
    Game.KeepMonitorAspectRatio = true;
    Game.ResetWindows = false;
  } else {
  }

  //select a option
  var res = Context.Options["select"];
  if (res == "Default/No!") {
  }

  if (res == "Yes!") {
    //create .bat file
    var Bat = (Context.SavePath = Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\VRising_Server\\Dedicated Server on NucleuCoop.bat");
    var lines = [
      "@echo off",
      "TITLE V Rising Dedicated Server",
      "set SteamAppId=1604030",
      'if not DEFINED IS_MINIMIZED set IS_MINIMIZED=1 && start "" /min "%~dpnx0" %* && exit',
      'echo "Starting V Rising Dedicated Server - PRESS CTRL-C to exit"',
      "@echo on",
      'VRisingServer.exe -lanMode true -listing true -secure false -serverName "V Rising Dedicated Server NucleuCoop" -saveName "nucleuscoopWold"'
    ];
    Context.WriteTextFile(Bat, lines);

    Context.RunAdditionalFiles(["1|" + Context.GetFolder(Nucleus.Folder.InstancedGameFolder) + "\\VRising_Server\\Dedicated Server on NucleuCoop.bat"], false, 1, false, false);
    Context.RunAdditionalFiles(["1|" + Game.Folder + "\\checknucleus.bat"], false, 1, true, false);
  }
};