0 of 0

File information

Last updated

Original upload

Created by

tkhquang

Uploaded by

tkhquang

Virus scan

Safe to use

About this mod

This mod allows you to toggle between first-person and third-person views with a customizable hotkey (default: F3). Configuration is simple through an INI file.

Permissions and credits
Changelogs
Donations
Kingdom Come: Deliverance II - Third Person View Toggle

Description
This mod enables toggling between first-person and third-person camera views in Kingdom Come: Deliverance II using customizable hotkeys, giving you a new perspective on the medieval world of Bohemia.

Key Features
  • Toggle between first-person and third-person views with a keypress (default: F3)
  • Dedicated keys for forcing first-person or third-person view
  • Automatic camera switching when menus/dialogs open
  • Custom Field of View (FOV) setting for third-person view
  • Fully customizable settings through INI configuration
  • Open-source with full transparency


Requirements
  • Kingdom Come: Deliverance II (Steam version)


Installation
1. Extract all files from the archive to your game directory:
  <KC:D 2 installation folder>/Bin/Win64MasterMasterSteamPGO/
2. Launch the game and press F3 (default) to toggle the camera view

Installation Folder Structure

What you'll download:
KCD2_TPVToggle.zip
├── KCD2_TPVToggle.asi    # The mod itself
├── KCD2_TPVToggle.ini    # Configuration file
├── dinput8.dll           # Ultimate ASI Loader (included for convenience)
├── KCD2_TPVToggle_Readme.txt            # Documentation
└── KCD2_TPVToggle_Acknowledgements.txt # Third-party license information

Where to place the files:
Kingdom Come: Deliverance II installation
└── Bin
   └── Win64MasterMasterSteamPGO     # Copy all files here
       ├── KCD2_TPVToggle.asi        ✓
       ├── KCD2_TPVToggle.ini        ✓
       ├── dinput8.dll               ✓
       ├── KingdomCome.exe           (original game file)
       └── ...                       (other game files)


Dependencies
This mod relies critically on the Ultimate ASI Loader by ThirteenAG, which is included in the download package. This essential component:
  • Allows the mod to be injected into the game as an ASI plugin
  • Handles the loading and execution of the mod when the game starts
  • Makes installation simple by just placing files in the game directory


Configuration
The mod can be configured by editing the KCD2_TPVToggle.ini file:

[Settings]
; Keys that toggle between first-person and third-person view (comma-separated, in hex)
; F3 = 0x72, F4 = 0x73, E = 0x45, etc.
; If set to empty (ToggleKey = ), no toggle keys will be monitored.
ToggleKey = 0x72

; Keys that will always switch to first-person view (comma-separated, in hex)
; These keys never toggle - they only force first-person view
; If set to empty (FPVKey = ), no first-person view keys will be monitored.
; M, P, I, J, N = 0x4D,0x50,0x49,0x4A,0x4E
FPVKey = 0x4D,0x50,0x49,0x4A,0x4E

; Keys that will always switch to third-person view (comma-separated, in hex)
; These keys never toggle - they only force third-person view
; If set to empty (TPVKey = ), no third-person view keys will be monitored.
TPVKey =

; Logging level: DEBUG, INFO, WARNING, ERROR
LogLevel = INFO

; Optional Features
; Enable overlay detection and automatic camera switching
EnableOverlayFeature = true

; Custom FOV for third-person view (degrees)
; Valid range: 0-180 degrees, or empty to use default
TpvFovDegrees = 68.75


Using with Controllers
This mod is designed to work with keyboard inputs directly. For controller support:

  • JoyToKey: Map your controller buttons to keyboard keys configured in the INI file.
  • Steam Input: If playing through Steam, use Steam's controller configuration to map controller buttons to keyboard keys.


Both options allow you to map any controller button to the F3 key (or your preferred toggle key).

Default FPV Keys Explained
The default FPV keys (M, P, I, J, N) were specifically chosen because they correspond to important in-game UI interactions. These keys automatically switch the view to first-person when pressed because many game UI elements and menus can appear buggy or non-functional when accessed in third-person view.

This provides a seamless experience where pressing any UI key will automatically ensure you're in the correct camera mode for that interface. If you've remapped these keys in your game settings, you may want to update the FPV key settings to match your custom keybinds.

Optional Features
Overlay Detection:
When EnableOverlayFeature is set to true, the mod will:
  • Automatically switch to first-person view when menus/dialogs open
  • Restore the previous view when menus/dialogs close
  • Filter scroll wheel input during overlays to prevent camera movement


Custom FOV:
Set TpvFovDegrees to any value between 0-180 to override the default third-person field of view. Common values are 60-90 degrees (game default is approximately 68.75).

Hold-to-Scroll Feature:

Introducing an option that gives you precise control over mouse wheel scrolling in third-person view.

  • Completely optional hold-key mechanism for camera distance adjustment
  • Scrolling disabled by default when configured
  • Scroll ONLY when holding a specific key of your choice
  • Fully compatible with existing overlay detection system


Empty Key Settings
For each key type, you can leave the setting empty to disable that functionality:
  • Setting ToggleKey = will disable the toggle feature
  • Setting FPVKey = will disable automatic switching to first-person view
  • Setting TPVKey = will disable explicit switching to third-person view


If all three key settings are empty, the mod will still initialize but won't monitor any keys.

For a complete list of key codes, see Microsoft's Virtual Key Codes.

Known Issues and Limitations

Camera and View Limitations:
  • Camera may clip through objects in third-person view (no collision detection)
  • Some game events or menus may temporarily be buggy in third-person view (menus, map, dialog...)
    • Workaround: Use the default FPV keys (M, P, I, J, N) to automatically switch to first-person view when using these features, or enable the overlay detection feature
  • Camera distance may shift unexpectedly in certain game situations. This behavior is inherent to the experimental (debug) third person mode the game provides
  • Camera appears slightly tilted when riding a horse
  • Camera offset manipulation feature currently don't align with the interactive raycast (crosshair-dot will be misaligned)


Rare Camera Behavior in Specific Scene:

During the scene where Hans carries Henry (likely a story-critical moment from the game's opening), switching between first-person and third-person views can cause unexpected camera and character model behavior.

Detailed Behavior:
  • The scene uses a forced camera perspective with specific positioning
  • Switching to third-person view may rotate Henry's body incorrectly
  • Returning to first-person view might not restore the original camera positioning


Impact: This issue appears to be unique to this specific scripted sequence where the character positioning is tightly controlled by the game.

Recommended Approach:
  • Keep the game in first-person view during this specific scene
  • Avoid toggling camera views until the scene completes
  • If you accidentally switch views, you may need to reload the previous save
  • Temporary Solution: Simply rename KCD2_TPVToggle.asi to KCD2_TPVToggle.bak or remove it from your game directory


Note: This behavior seems limited to this particular story moment and does not represent a widespread mod issue.

General Limitations:
  • The third-person camera uses the game's experimental implementation and may not be perfect
  • Currently only tested with the Steam version of the game


Troubleshooting
If you encounter issues:
  • Set LogLevel = DEBUG in the INI file
  • Check the log file in your game directory (KCD2_TPVToggle.log)
  • If using JoyToKey or Steam Input, verify your controller mappings are correct
  • For memory pattern errors, the mod needs an update for the current game version


After a game update: The AOB (Array-of-Bytes) pattern scanning system automatically adapts to minor game changes, but major updates may require mod updates if core game functions have been modified.

Credits
  • ThirteenAG for the Ultimate ASI Loader
  • TsudaKageyu for MinHook
  • Brodie Thiesfield for SimpleIni
  • Frans 'Otis_Inf' Bouma for his camera tools and inspiration
  • Warhorse Studios for creating this amazing game


Source Code
All my Kingdom Come: Deliverance II mods and tools can be found in this GitHub repository. Feel free to contribute or suggest improvements!