You are viewing a potentially older version of this package. View all versions.
JensenHuangTeam-CustomFOV-1.0.0 icon

CustomFOV

A Field of View slider in Content Warning's own Settings menu (Graphics). The helmet HUD stays in place at wide FOV. Client-side only, works with vanilla lobbies.

Date uploaded 2 hours ago
Version 1.0.0
Download link JensenHuangTeam-CustomFOV-1.0.0.zip
Downloads 9
Dependency string JensenHuangTeam-CustomFOV-1.0.0

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2100 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2100

README

Custom FOV

A Field of View slider for Content Warning, right in the game's own Settings menu.

Client-side only: you don't need the other players to have it, it works in vanilla lobbies.

Features

  • Settings -> Graphics -> Field of View (RU: «Поле зрения (FOV)»), from 50 to 120, default 70 (the vanilla value). It is saved like every other setting and works with a controller too (steps of 5).
  • The HUD stays in place. The helmet HUD is a tilted 3D panel, so a wide FOV would stretch it off the screen. While your FOV is not 70, the HUD is drawn by a separate camera that keeps the vanilla FOV. TVs, shop screens and other world screens are not touched.
  • Main menu always uses the vanilla FOV.
  • VR: switched off while VR (CWVR) is on, since VR controls the camera.

Config

BepInEx/config/com.ddk.cwfov.cfg (appears after the first launch):

  • Enabled - turn the whole mod off (vanilla FOV and HUD) without removing it.
  • FixHud - turn off only the separate HUD camera. Use it if the mod conflicts with another camera / HUD mod (the HUD will stretch at a wide FOV again).

If the HUD fix fails three times in a row, it turns itself off for the rest of the session.

For mod authors

Custom FOV has a small public API so your mod can play nicely with it. You do not need to depend on it hard: use a soft dependency, or call it through reflection.

// 1. Your mod needs the camera for itself (a free cam, a cutscene, VR-like view...):
//    switch Custom FOV off while you need it. Use your own unique key.
CustomFovApi.SetSuspended("your.mod.guid", true);   // off
CustomFovApi.SetSuspended("your.mod.guid", false);  // on again

// 2. You put your own UI under the helmet HUD (HelmetUI) and it must keep its own layer/camera:
CustomFovApi.ExcludeFromHud(myTransform);           // Custom FOV leaves it and its children alone

// 3. Read the FOV the player chose:
float fov = CustomFovApi.CurrentFov;

Without a reference to the DLL (works even if Custom FOV is not installed):

var api = System.Type.GetType("CustomFovApi, CWFov");
api?.GetMethod("SetSuspended")?.Invoke(null, new object[] { "your.mod.guid", true });

Add [BepInDependency("com.ddk.cwfov", BepInDependency.DependencyFlags.SoftDependency)] to your plugin if you reference the DLL.

CHANGELOG

Changelog

1.0.0

The first release.

  • Field of View slider (50-120, default 70) in Settings -> Graphics.
  • The main menu always keeps the vanilla FOV.
  • The helmet HUD is drawn by a separate camera at the vanilla FOV while your FOV is changed, so it does not stretch. World screens (TV, shop) are not affected.
  • Switched off automatically while VR (CWVR) is on.
  • Config: Enabled and FixHud switches; the HUD fix turns itself off after repeated errors.
  • Public API for other mods (CustomFovApi): suspend the mod, exclude your own HUD objects, read the FOV. See README.