Camera views
The views the camera button steps through on the map and indoors, and how to add, change or remove one.
The camera button on the top right of the HUD (and the V key) steps through the camera views offered where the player is. Each view is one entry in a .ulviews file, so a mod can add a view, retune one or remove it.
Files live in Camera/ in your mod, for example MyMod/Camera/views.ulviews. They are read in load order: a later mod replaces a view with the same id, and it only needs to name the fields it changes.
What a view can do
The engine has three kinds of camera. Mods decide which ones exist, in what order, and all their numbers.
kind |
What it does |
|---|---|
free |
The camera flies: WASD pans, Q/E and right-drag turn it in place, R/F tilt. This is the original birdview. |
orbit |
The camera turns around what it looks at and the wheel moves it closer or further. Indoors this is the room editor's view: from outside the room, looking at its centre, with the near walls, the ceiling and the ceiling lights cut away. |
pov |
Through the player's eyes. The player's head and hair are hidden, and right-drag looks around. It needs the player's body, so it is only offered indoors. |
The scene camera inside a sex scene is separate and is not affected by these files.
Example
json{
"views": [
{ "id": "free", "label": "Free camera", "icon": "MapControls/camera_view", "kind": "free", "contexts": ["map", "room"] },
{ "id": "orbit", "label": "Orbit", "icon": "MapControls/rotate", "kind": "orbit", "contexts": ["map", "room"],
"map_distance": [1200, 100000], "map_start_distance": 0, "map_start_pitch": -38, "map_fov": 55, "room_distance": [120, 6000], "room_fov": 40, "room_start_pitch": -35,
"pitch": [-85, -8], "pitch_far": -70, "pitch_near": -20, "zoom_step": 0.85 },
{ "id": "eyes", "label": "Through my eyes", "icon": "UI/eye", "kind": "pov", "contexts": ["room"],
"bone": "head", "offset": [10, 0, 5], "fov": 80, "look_yaw": [-110, 110], "look_pitch": [-70, 60], "hide_bone": "neckLower" }
],
"default": { "map": "free", "room": "orbit" }
}
Fields
All distances are in centimetres and all angles in degrees.
| Field | Views | Meaning |
|---|---|---|
id |
all | Unique name. Reusing an id from an earlier mod replaces that view. |
label |
all | Tooltip on the camera button. |
icon |
all | Group/name of a PNG under Map/Icons/, as everywhere on the map HUD. |
kind |
all | free, orbit or pov. |
contexts |
all | Where the view is offered: map, room. A pov view on the map is ignored. |
disabled |
all | true removes a view an earlier mod added. |
map_distance |
orbit | [min, max] distance to the point turned around, on the map. |
map_start_distance, map_start_pitch, map_fov |
orbit | Where switching to the orbit puts the camera on the map: its distance from the point looked at (0 keeps the current distance), its tilt and its lens. |
room_distance |
orbit | The same indoors. |
room_fov |
orbit | Indoor lens. A narrow lens keeps walls close to parallel. |
room_start_pitch |
orbit | Indoor tilt when the view is switched on. |
room_pivot_height |
orbit | Height above the floor of the point turned around indoors. |
pitch |
orbit | [lowest, highest] tilt allowed. |
pitch_far, pitch_near |
orbit | When both are set, zooming on the map also tilts: steep when far, flatter when close. |
zoom_step |
orbit | Distance multiplier per wheel notch (0.3 to 0.98). |
bone |
pov | Bone the eyes sit on. |
offset |
pov | [forward, right, up] from that bone, along the way the body faces. |
fov |
pov | Lens. |
look_yaw, look_pitch |
pov | How far the player can look around, as [min, max]. |
hide_bone |
pov | Hidden with its children, together with the hair, while looking through the eyes. "" hides nothing. |
default names the view used on the map and indoors until the player picks another one. After that, the game remembers the player's choice separately for the map and for rooms, across sessions.