The Forest

The Forest

Not enough ratings
How to fix high Mouse Sensitivity
By LNX
Many people have the problem that the mouse sensitivity in The Forest is way too high, even at 0%. Since this problem bothered me as well, I was looking for a fix, which I present here.
   
Award
Favorite
Favorited
Unfavorite
Introduction
In this guide, I will show you how to fix the high mouse sensitivity in The Forest for the camera and UI cursor.
Even at 0% it's way too high, which spoils the fun for some players like me.
A workaround was to simply change the Windows Mouse Sensitivity setting or changing the DPI on the mouse. But this isn't ideal and can be quite annoying.
Installing dnSpy
To fix the mouse sensitivity, you'll have to edit the game files and change up the code.
This can be done with dnSpy[github.com].

Simply visit the latest Release[github.com] and scroll all the way down to the download links. Click dnSpy-net-win64.zip and extract all files to a folder of your choice. You can delete these files again after you're done with the fix.

Now you'll have to start dnSpy.exe and continue with the next steps.
Opening the game files
We're now going to open the game file that needs to be edited.
Open your "The Forest" game directory and navigate to: The Forest/TheForest_Data/Managed.
(You can open the game directory by right clicking on The Forest in Steam -> Properties -> Local Files -> Browse...)

In the Managed folder you'll see a lot of .dll files. You only have to edit Assembly-CSharp.dll though.
Drag and drop this file into dnSpy to open it.

Fixing the camera Sensitivity
Here come's the tricky part. We're going to edit the code that turns the mouse input into actual camera movement.

First of all you'll need to find the correct class that processes the mouse input. This class is called "SimpleMouseRotator".

You can find this class on the left side of dnSpy under "Assembly-CSharp" -> "Assembly-CSharp.dll" -> "{ } -" -> "SimpleMouseRotator"


Now you have to decompile/edit the method GetInput(). To do this, expand the SimpleMouseRotator and right click on GetInput(). Now select Edit Method (C#)... from the context menu.


In the new popup window you're now able to edit the code. You only need to change some numbers that are shown here:


This means that the new minimum sensitivity (0% in the settings) is actually 0 and the maximum sensitivity (100% in the settings) is also way lower.

After you've edited these values, click "Compile" on the bottom right of the popup.
The last thing you'll have to do is saving the changes. Simply click on the save button in the toolbar as shown here:


And click OK on the upcoming dialog:

Fixing the inventory Sensitivity
This step is optional. You only need to do this step, if the mouse sensitivity in the inventory is too high for you.

To fix the UI / Inventory sensitivity, you'll need to open a different class inside dnSpy. This time we need the "VirtualCursor" class. You can find this under "Assembly-CSharp" -> "Assembly-CSharp.dll" -> "TheForest.UI" -> "VirtualCursor". You might need to scroll down a bit to find TheForest.UI and VirtualCursor.

Now you have to decompile/edit the method LateUpdate(). To do this, expand the VirtualCursor and right click on LateUpdate(). Now select Edit Method (C#)... from the context menu.


In the popup, you'll need to edit the code again. Scroll a bit down until you find these lines:


Edit these two values to your desire. I'd recommend trying 1.0f first, as it should be equal to the windows mouse sensitivity. The default value is 1.5f. Remember to only edit the number! Keep the f; after the number!

After you're done, click Compile on the bottom right. Now save the file just like you did in the previous step (Fixing the camera Sensitivity).
Done!
That's it! The mouse sensitivity slider in the game should now be fixed.
You're now able to use values over 0% without the mouse being way too fast.
7 Comments
Redern Oct 28, 2023 @ 6:49am 
Thank you, it really helped :steamhappy:
ucmh May 9, 2023 @ 11:55pm 
Works like a charm? Do you (or anyone) know what thing one should edit to change the inventory sens?
tomyakki Mar 1, 2023 @ 9:39pm 
It work 10/10
Awptimal Sep 4, 2022 @ 3:24pm 
If you'd rather hard patch a number to change the value even further (float num = 1f; in the picture), here's some python code for that:

import numpy as np # pip install numpy
sens_number = np.float(.25) # default 1
the_forest_dll = open("Assembly-CSharp.dll", "r+b") # open file in read/write binary mode
the_forest_dll.seek(0x0021955B) # offset of float num = 1f;
the_forest_dll.write(sens_number) # write float32 (4 bytes)
the_forest_dll.close()
Vititas Aug 14, 2022 @ 8:36pm 
That worked! Thanks for this genious guide! :steamthumbsup:
DOGO May 15, 2022 @ 6:03pm 
i use 400 dpi and its still too high lol
Timotheeee1 Jul 8, 2021 @ 11:17am 
tip: just use a default DPI of 400 so this issue doesn't happen with every other game.