VR Vanilla Fixes
Download on GitHub · Source code · Changelog
VR Vanilla Fixes corrects things the VR build of Fallout 4 and F4SEVR get wrong: weapon parts that should be invisible, aim that never recovers from recoil, a material swap script function that reads the wrong layout, and slow loading with a large load order. This page describes VR Vanilla Fixes 1.0.0. It needs no other mod and changes no plugin, record or save.
Requirements
- Fallout 4 VR 1.2.72.0. The plugin refuses any other game version.
- F4SEVR 0.6.21.
The plugin is Data/F4SE/Plugins/VRVanillaFixes.dll. Install the release zip with your mod manager.
What it fixes
Fallout 4 VR runs on an older engine build than flat Fallout 4, and F4SEVR shares code written for the flat game.
- Invisible weapon parts. Weapon mods hide parts with fully transparent materials (unused rails, stickers, alternate sights). Flat Fallout 4 does not draw them; Fallout 4 VR draws them as solid geometry. The fix hides those parts on equipped weapons, on weapons lying in the world and in the workbench preview, and shows them again when the material changes.
- Recoil that never recovers. A weapon whose aim model has a recoil spring of 0 keeps climbing after every shot and never returns. Such a weapon gets a spring of 150 while it is equipped, in either hand. Weak but nonzero springs are left as their author set them.
ObjectReference.ApplyMaterialSwap. F4SEVR 0.6.21's version of this script function reads the flat game's layouts, which differ in VR. The plugin replaces it with a version that uses the VR layouts and keeps F4SE's behaviour.- Loading time with many mods. After loading its data, the game asks for every weapon whether each leveled list holds it, and searches the same nested lists again on every path. Each list is now searched once and an answer is reused within a pass; the result is the same.
- Save loading time with many mods. A quest that stops on a save load removes the forms it created, and each removal scanned the whole form array one entry at a time. The scan now compares four entries per step. It needs a CPU with AVX2; without one the game's own scan stays.
Every fix checks the game's code before it changes anything. Where the code is not what it expects, that fix stays off and the log says which one.
Compatibility
- Mods that already hide the same weapon parts keep working: the plugin never shows a part another mod hid.
- When the hidden parts of a weapon change, the plugin sends the F4SE message
0x56564601(no payload, game thread), so a mod that builds collision from the weapon's visible parts can rebuild it. ROCK listens for it.
Configuration
Documents/My Games/Fallout4VR/Mods_Config/VR_Vanilla_Fixes/VR_Vanilla_Fixes.toml
The plugin creates the file with every option at its default the first time it starts, and later adds options a new version brings. Each option has its help above it as ## lines; your own # notes stay. Restart the game after changing it.
| Table | Option | Default | Purpose |
|---|---|---|---|
[Fixes] | WeaponMaterialVisibility | true | Hides weapon parts whose material makes them invisible |
RecoilRecovery | true | Gives a recoil spring of 150 to a weapon whose aim model has none |
The script function and the two loading fixes have no option. A first start after a version that used VR_Vanilla_Fixes.ini carries the options you changed into the TOML file and deletes the INI.
The log is Documents/My Games/Fallout4VR/F4SE/VRVanillaFixes.log.
For mod authors
A mod that shows its own copy of a weapon (a holster, a display, a preview) can ask the plugin to hide that copy's invisible parts, and can report a weapon reference it moved or rebuilt. The interface is WeaponScenes 1.0, in the repository's include/VRVanillaFixes/WeaponScenes.h. The header needs only the C++ standard library, and there is nothing to link.
#include <VRVanillaFixes/WeaponScenes.h>
const vvf::api::WeaponScenesV1* scenes{};
if (auto* module = GetModuleHandleW(L"VRVanillaFixes.dll")) {
if (auto query = reinterpret_cast<vvf::api::GetWeaponScenes>(GetProcAddress(module, vvf::api::kQueryExport)))
scenes = query(vvf::api::kMajor, vvf::api::kMinor, sizeof(vvf::api::WeaponScenesV1));
}
If the plugin is not loaded or the query returns null, skip the calls. The repository's WeaponScenes page has the full reference.
Licensed under GPL-3.0-only.