Quick Toggle Compass and UI Visibility
A simple quality of life mod to toggle the compass on or off while keeping the rest of the UI enabled, or turn off all of the UI entirely. For those who want to only use the compass in certain instances while keeping the rest of the HUD on screen or turn off the whole UI without entering the options menu.
Pressing the END key on your keyboard will toggle the compass on or off by default.
Pressing the INSERT key on your keyboard will toggle the whole UI on or off by default.
Requires:
UE4SS Latest Version
Installation:
1. Download the latest release of UE4SS from GitHub. The current file to download as of 11/22/2024 is UE4SS_v3.0.1.zip
2. Navigate to the Win64 Binaries folder of your Stalker 2 install, e.g:
[YourSteamOrGamePassDirectory]…\S.T.A.L.K.E.R. 2 Heart of Chornobyl\Stalker2\Binaries\Win64
3. Extract the contents of the UE4SS zip file to the Win64 Binaries folder (folder in above step) of your Stalker 2 install.
4. Download the mod file and extract it to the newly created Mods folder in your Win64 Binaries folder, eg:
[YourSteamOrGamePassDirectory]…\S.T.A.L.K.E.R. 2 Heart of Chornobyl\Stalker2\Binaries\Win64\Mods
5. You should be prompted to overwrite “mods.txt”. Click “Yes” to overwrite.
6. Launch the game and test.
7. If the mod doesn’t work: Inside of the Mods folder, open the mods.txt file and add the following line exactly as follows after the other entries in the file:
ToggleCompass: 1
If you get crashes
UE4SS may cause crashes. If they persist for you, you may not be able to use UE4SS/this mod on your system.
To uninstall UE4SS, remove the following files and folders from your[YourSteamOrGamePassDirectory]…\S.T.A.L.K.E.R. 2 Heart of Chornobyl\Stalker2\Binaries\Win64directory:
– Mods folder
– Changelog.md
– dwmapi.dll
– README.md
– UE4SS.dll
– UE4SS-settings.ini
Those are all of the files that come with UE4SS.
ADVANCED: Changing the Keybind for Toggling the Compass
If you want to change the keybind from the default setting of END on your keyboard, you will need to edit the Lua script for the mod. If you don’t know Lua, do this at your own risk:
1. Navigate to the ToggleCompass mod folder and open main.lua in the text editor of your choice:
[YourSteamOrGamePassDirectory]…\S.T.A.L.K.E.R. 2 Heart of Chornobyl\Stalker2\Binaries\Win64\Mods\ToggleCompass\scripts\main.lua
2. Find the following line of code:
RegisterKeyBind(Key.END, function()
3. Find the name of the key you want to bind in this data table: https://docs.ue4ss.com/lua-api/table-definitions/key.html
4. Change the value of the key after the Key. in the line of code. Example for changing the keybind to the F7 key:
RegisterKeyBind(Key.END, function() becomes
RegisterKeyBind(Key.F7, function()
5. Save the file and close it. If it doesn’t work, the key might be bound to something else in the game. I haven’t tested this with every key, so change at your own risk.