Rain World

Rain World

Aim Anywhere
Ohanno_Barghest 28 Jun, 2024 @ 3:09am
How to set custom keybinds (As of June 2024)
So in-case anyone, like me, uses another mod like 'Mouse Drag' or 'Beast Master' and finds the controls overlapping annoying:
There isn't *currently* anything in the mod options to disable or change these keybinds, however if you're not afraid to edit some code it's not hard once you got the tools, trust me i don't really mod anything so it was hard to figure out for me too.

Here's the basic steps:
Get DnSpy (find it in the modding wiki)

+ Open the mod, and open as many of its dependencies as you can
(They are listed inside the mod)
- The modding guide shows where most are but you can just search for their name in the 'Steamapps/Common/Rainworld' folder on your PC

+ Once you got all that setup in DnSpy go to PlayerInputPCPatch > PlayerInputPC, in the lines (17 - 21) You can find the binded keys there next to <input.GetKey>
- Btw, if you look below that line you can see which one does what. one is 'thrw' (throw) and the other 'pckp' is the pickup key
- If they are just a set of numbers, those are C# keyCodes, you can lookup a list of them online if they are not showing up automatically

+ R-Click in the area where you see the code, click 'Edit Class'

+ You should now be able to edit the text, if you see 'Mouse0' try just typing in the key you want, like "F" for example. (Case Sensitive)
- If you have the number codes like '232' try '102' (F, again you can look up what these values are online)
- Make your changes, then hit compile. if you have an error you likely are missing a dependency or typed in your changes wrong

+ Now to finish go up to top middle (you should see the C# box) and click the Save All. This will save a new .dll (Please backup the original one)
- Then BOOM keys rebinded!

A note:
If you don't have the default key disabling the mod (one of the few settings the mod actually has),
i recommend just setting the coded key bind to whatever and changing your games original in-game keybinding. makes it easier to prototype schemes.
< >
Showing 1-3 of 3 comments
喵椰Nyanyay 16 Aug, 2024 @ 1:26pm 
Cannot compile (even without changes) at this step: "Make your changes, then hit compile."
Only 1 error: CS0117 'RWInput' does not contain a definition for 'PlayerRecentController', which is in the code of the class "PlayerInputPC" at line 6, RWInput.PlayerRecentController(playerNumber);

The environment contains all 7 dependencies: "Assembly-CSharp,BepInEx,HOOKS-Assembly-CSharp, mscorlib, Rewired_Core,UnityEngine.CoreModule,UnityEngine.InputLegacyModule"

It looks like the dependency "On.RWInput" doesn't have a "PlayerRecentController" method, is this related to the game dlc? What's it missing? Do you have the DLC Rain World: Downpour?
Ohanno_Barghest 17 Aug, 2024 @ 3:26am 
Originally posted by 喵椰Nyanyay:
Cannot compile (even without changes) at this step: "Make your changes, then hit compile." [/b]

I do have Downpour.
On my end i checked that very line
"Controller newController = global::RWInput.PlayerRecentController(playerNumber);"
And found no issues. I also tried to save/compile and no issues.
I would recommend you make sure all your references are correct. perhaps try the whole thing over again with a fresh version of the mod?

I also inspected the Static of "RWInput.PlayerRecentController" and it was right there in Assembly-CSharp, so perhaps that dependency for you was imported wrong, or is the wrong version?

Here's the names off all the references you need: (looks like you got them all, but ima list then again anyway)

Assembly-CSharp
BepinEx
HOOKS-Assembly-CSharp
mscorlib
Rewired_Core
UnityEngine.CoreModule
UnityEngine.InputLegacyModule

Make sure you're also getting these references FROM the game files not from their parent Repo. In the modding wiki for Rainworld they show you where to find about half of these. the others are around in the files as well

If nothing i said helps and you manage to fix the issue please post your fix in the thread here!
Last edited by Ohanno_Barghest; 17 Aug, 2024 @ 3:26am
喵椰Nyanyay 18 Aug, 2024 @ 7:10am 
Happy to report that the problem is solved whether the DLC is included or not. I imported too many dependencies with the same name. The DLL prioritized from here is faulty and should be removed :“Rain World\RainWorld_Data\Managed\Assembly-CSharp.dll”.

Keep only “Rain World\BepInEx\utils\PUBLIC-Assembly-CSharp.dll” and “Rain World\BepInEx\plugins\HOOKS-Assembly-CSharp.dll”.
< >
Showing 1-3 of 3 comments
Per page: 1530 50