Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 52 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
# SOTF ModMenu

[![Thunderstore downloads](https://img.shields.io/github/downloads/Wolf11221/SOTF_ModMenu/total?label=Github%20downloads)](https://github.com/Wolf11221/SOTF_ModMenu/releases/latest)
[![Thunderstore downloads](https://img.shields.io/badge/dynamic/json?color=yellowgreen&label=Thunderstore%20downloads&query=total_downloads&url=https%3A%2F%2Fthunderstore.io%2Fapi%2Fexperimental%2Fpackage%2FWolf11221%2FSOTF_ModMenu%2F)](https://thunderstore.io/c/sons-of-the-forest/p/Wolf11221/SOTF_ModMenu/)

Press ` backquote ` to open the trainer.
To change your keybind, edit the config file in "BepInEx\config\SOTF ModMenu.cfg". Or download [BepInEx ConfigurationManager](https://thunderstore.io/c/sons-of-the-forest/p/faulty/BepInEx_ConfigurationManager/) to change keybinds without closing the game!
Maintained fork of the original [Wolf11221/SOTF_ModMenu](https://github.com/Wolf11221/SOTF_ModMenu) with performance fixes, cheat cleanup, and restored features for current Sons of the Forest / BepInEx 6 builds.

Press the configured hotkey to open the trainer (default: `Backslash` — on German keyboards this is the `^` key left of `1`).

Requires [BepInEx](https://thunderstore.io/c/sons-of-the-forest/p/BepInEx/BepInExPack_IL2CPP/)
To change your keybind, edit `BepInEx\config\SOTF_ModMenu.cfg`, or use [BepInEx ConfigurationManager](https://thunderstore.io/c/sons-of-the-forest/p/faulty/BepInEx_ConfigurationManager/) (SOTF Thunderstore pack recommended).

Recommended to allow keybind swaps ingame [BepInEx ConfigurationManager](https://thunderstore.io/c/sons-of-the-forest/p/faulty/BepInEx_ConfigurationManager/)
Requires [BepInEx IL2CPP](https://thunderstore.io/c/sons-of-the-forest/p/BepInEx/BepInExPack_IL2CPP/)

![SOTF ModMenu](https://i.imgur.com/Vfk7OQo.png)

## Features:
## Features

* God Mode
* Inf Heal
Expand All @@ -23,25 +25,59 @@ Recommended to allow keybind swaps ingame [BepInEx ConfigurationManager](https:/
* No Thirst
* Always Rested
* Instant Build
* infinite Logs
* Infinite Logs
* Infinite Ammo
* Infinite Build
* Item Spawner
* Cave Light
* SpeedRun
* ESP
* OG Menu Music
* Nice UI

And more to come!

## Installation:
## Installation

1. Download [BepInEx](https://thunderstore.io/c/sons-of-the-forest/p/BepInEx/BepInExPack_IL2CPP/)
2. Drag contents of the BepInEx zip file into Sons of the Forest game directory (right click in steam > browse local files)
3. Download SOTF_ModMenu.dll and drag it into BepInEx/plugins
4. Run game before trying to find and edit config files
4. Enjoy ;)
2. Drag the contents of the BepInEx zip into the Sons of the Forest game directory (Steam → Browse local files)
3. Download `SOTF_ModMenu.dll` and place it in `BepInEx/plugins`
4. Launch the game once so the config file is created
5. Enjoy

## Building

```bash
dotnet build SOTF_ModMenu/SOTF_ModMenu.csproj
```

Optional auto-copy after build: set `GamePluginsDir` in `SOTF_ModMenu.csproj` (or pass `-p:GamePluginsDir=...`) to your `BepInEx\plugins` folder. Copy only runs if that folder exists.

## Changelog (this fork)

### Fixes

* **Menu hotkey** — Reliable open/close on German layouts (`Backslash` / `BackQuote` / `Caret`). Input is checked before cheat updates and also in `OnGUI` so a cheat exception cannot block the menu.
* **IL2CPP lifecycle** — Proper `IntPtr` constructor for `SotfMain`, safer GameObject setup, startup logs for easier debugging.
* **Cheat cleanup on leave world** — Side effects are reverted (SpeedyRun console, Instant/Infinite Build, CaveLight, NoCold, NoFallDamage, GodMode health, held-item hack) instead of only clearing bool flags.
* **Infinite Ammo** — Restored via `RangedWeaponItemInstanceModule` magazine refill each frame.
* **Infinite Logs** — Restored via `HeldOnlyItemController.InfiniteHack` (synced with Infinite Build so the two toggles do not fight each other).
* **No Fall Damage** — Applied on toggle instead of polling every frame.

### Performance

* **ESP** — Early exit when no category is active; actor labels use lookup maps instead of large switches; shared `GUIContent` and cached distance strings to cut GC.
* **ESP UX** — Disabling the master ESP toggle no longer wipes category selections every frame.
* **Item ID window** — Filtered list is rebuilt only when the search query changes.
* **UI buttons** — Simplified color-tag formatting for toggle buttons.
* **Update loop** — Removed empty/broken update calls from the hot path; fall-damage no longer polled every frame.

### Quality of life

* Default hotkey and config docs aligned with German `^` = Unity `Backslash`.
* `[Broken]` labels removed from Ammo / Logs once restored.
* Optional post-build copy to the game plugins folder.

Made by Nie
## Credits

Custom input and config file made by Maalik
* Original mod by **Nie**
* Custom input and config by **Maalik**
* Upstream packaging by **Wolf11221**
* Maintenance / optimizations in this fork by **CrossiiDev-Studio**
Loading