Skip to content

Repository files navigation

Dev Mode QoL

Quality of life fixes for SULFUR's developer overlay (F3, developer mode only).

Built against SULFUR v0.18.5 and BepInEx 5.

Features

1. The free camera keeps the view direction

Vanilla copies the player camera rotation onto the dev camera when the overlay turns on, but the camera controller keeps its own pitch/yaw state and overwrites the transform on the next frame, so the free camera actually starts at whatever direction it was left at. Leaving the overlay caches the player's look direction and then never restores it.

This mod makes the hand-over work in both directions:

Situation View direction on the way back
Entering the free camera (F3) Continues from the direction the player was looking at.
Leaving the free camera after a teleport (T) The player looks where the free camera was looking at the moment the overlay closed.
Leaving the free camera without a teleport Unchanged - the player returns to the original spot and keeps the original view direction.

The teleport flag is per free camera session: it is cleared every time the overlay turns on.

Directions are applied through the game's own RotateTowardDirection, which also updates the controller's internal pitch/yaw, and are clamped to the target controller's own vertical limits so the first mouse movement afterwards does not snap the camera back.

The player direction is read from the transform the player's camera controller rotates - the same one Player.DirectionLooking reads through cameraControls - and not from Player.cameraRoot, which the game samples when it places the dev camera but which only carries the animated camera bob.

2. Escape leaves the developer overlay

Vanilla only closes the overlay with F3. Escape now peels off one layer at a time:

  1. Level select list open - closed by the game's own cancel handling (unchanged).
  2. Spawn menu open - Escape closes the spawn menu.
  3. Free camera only - Escape closes the overlay, exactly like F3.

Gamepad cancel behaviour is unchanged.

Configuration

BepInEx/config/ryuka.sulfur.dev_mode_qol.cfg

Key Default Meaning
1 - Free Camera / InheritOrientationOnEnter true Inherit the player view direction when entering the free camera.
1 - Free Camera / InheritOrientationOnExit true Hand the free camera direction back to the player after a teleport.
2 - Menu / CloseWithEscape true Escape closes the spawn menu / the overlay.
3 - Diagnostics / VerboseLogging false Log each hand-over. Diagnostics only.

Building

The project is a legacy-style C# project targeting .NET Framework 4.7.2 and is built with MSBuild.

Paths are resolved through Directory.Build.props and can be overridden on the command line:

msbuild "Dev Mode QoL.csproj" /p:Configuration=Release
msbuild "Dev Mode QoL.csproj" /p:Configuration=Release /p:DeployToSulfurProfile=true
Property Default
SulfurGameDir D:\SteamLibrary\steamapps\common\SULFUR
SulfurGaleProfileDir the Gale profile used for mod development

DeployToSulfurProfile=true copies the built assembly into the BepInEx profile and the Thunderstore folder.

Notes

  • Developer mode only. Without it the overlay never turns on and the mod stays inert.
  • Everything is driven by the dev tools lifecycle (TurnOn, TurnOff, TeleportPlayer, ShowOptions, HideOptions, SpecialCancel); no polling and no scene or object name guessing.
  • The two private fields the plugin reads (cameraController, levelPanel) are optional: if a future game build renames them the affected step degrades instead of failing.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages