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

RimWorld · handler “RimWorldMP”

Version 3

Release notes

Automatically assigns usernames based on the Nicknames in Nucleus. Sets alternate zoom keys to use.

Released
Size
1.4 KB
Downloads
688
Check
Verified
SHA-256
f76c7091a98561a8040a23fafbd2ffd17a6e3a9e6fb2e61cafc8e582b2d16d33
Download v3 (.nc)All versions

Files 1

PathSize
handler.js3.5 KB

handler.js

Plain text
Hub.Handler.Version = 3; // Released at https://hub.splitscreen.me/ on Wed Apr 08 2020 22:32:34 GMT+0000 (UTC).
Hub.Handler.Id = "na3aDgXqrb96b5Gb4";
Hub.Maintainer.Name = "The Shnazberry";
Hub.Maintainer.Id = "sBteBrsSMrrE7gMjj";

Game.NeedsSteamEmulation = false;
Game.HandlerInterval = 100;
Game.SymlinkGame = false;
Game.SymlinkExe = false;
Game.SupportsKeyboard = false;
Game.ExecutableName = "RimWorldWin64.exe";
Game.UserProfileConfigPath = "AppData\\LocalLow\\Ludeon Studios\\RimWorld by Ludeon Studios\\Config";
Game.SteamID = "427520";
Game.GUID = "RimWorld";
Game.GameName = "RimWorld";
Game.MaxPlayers = 4;
Game.MaxPlayersOneMonitor = 4;
Game.ForceFinishOnPlay = true;
Game.SupportsPositioning = true;
Game.StartArguments = "-popupwindow";
Game.Hook.ForceFocus = false;
Game.Hook.ForceFocusWindowName = "RimWorld by Ludeon Studios";
Game.Hook.DInputEnabled = false;
Game.Hook.DInputForceDisable = true;
Game.Hook.XInputEnabled = false;
Game.Hook.XInputReroute = false;
Game.Hook.CustomDllEnabled = false;
Game.FakeFocus = true;
Game.HookFocus = true;
Game.SetWindowHook = true;
Game.ResetWindows = true;
Game.SetForegroundWindowElsewhere = true;
Game.PauseBetweenStarts = 25;
Game.Description =
  "Make sure the RimWorld Multiplayer mod (By Swept, Charlotte, and Parexy) is active in the modlist before using, and make sure your modlist works before using. Sets the alternate keys for zooming to PageUp and PageDown due to the scrollwheel not functioning";

Game.SupportsMultipleKeyboardsAndMice = true;

Game.HookSetCursorPos = true;
Game.HookGetCursorPos = true;
Game.HookGetKeyState = true;
Game.HookGetAsyncKeyState = true;
Game.HookGetKeyboardState = true;
Game.HookFilterRawInput = false;
Game.HookFilterMouseMessages = true;
Game.HookUseLegacyInput = false;

Game.SendNormalMouseInput = true;
Game.SendNormalKeyboardInput = true;
Game.SendScrollWheel = true;
Game.DrawFakeMouseCursor = true;
Game.LockInputAtStart = true;
Game.LockInputToggleKey = 0x23;

Game.Play = function() {
  var username = System.Environment.UserName;
  var modSettingsPath = "C:\\Users\\" + username + "\\AppData\\LocalLow\\Ludeon Studios\\RimWorld by Ludeon Studios\\Config\\Mod_1752864297_MultiplayerMod.xml";
  var keySettingsPath = "C:\\Users\\" + username + "\\AppData\\LocalLow\\Ludeon Studios\\RimWorld by Ludeon Studios\\Config\\KeyPrefs.xml";

  var usernameLine = Context.FindLineNumberInTextFile(modSettingsPath, "<username>", Nucleus.SearchType.Contains);
  var zoomInLine = Context.FindLineNumberInTextFile(keySettingsPath, "<key>MapZoom_In</key>", Nucleus.SearchType.Contains) + 3;
  var zoomOutLine = Context.FindLineNumberInTextFile(keySettingsPath, "<key>MapZoom_Out</key>", Nucleus.SearchType.Contains) + 3;

  Context.ReplaceLinesInTextFile(modSettingsPath, [usernameLine + "|<username>" + Context.Nickname + "</username>"]);
  Context.ReplaceLinesInTextFile(keySettingsPath, [zoomInLine + "|<keyBindingB>PageUp</keyBindingB>", zoomOutLine + "|<keyBindingB>PageDown</keyBindingB>"]);

  Context.EditRegKey("HKEY_CURRENT_USER", "SOFTWARE\\Ludeon Studios\\RimWorld by Ludeon Studios", "Screenmanager Is Fullscreen mode_h3981298716", 3, Nucleus.RegType.DWord);
  Context.EditRegKey("HKEY_CURRENT_USER", "SOFTWARE\\Ludeon Studios\\RimWorld by Ludeon Studios", "Screenmanager Resolution Height_h2627697771", Context.Height, Nucleus.RegType.DWord);
  Context.EditRegKey("HKEY_CURRENT_USER", "SOFTWARE\\Ludeon Studios\\RimWorld by Ludeon Studios", "Screenmanager Resolution Width_h182942802", Context.Width, Nucleus.RegType.DWord);
};