Development - rollingrock/Fallout-4-VR-Body GitHub Wiki
Prerequisites:
- Install Visual Studio 2022 community edition
- Let's define
\root\
to be the root folder we will use (example:\root\
for me isC:\Dev\Modding\
)
- Download Fallout 4 Script Extender (F4SE)
- Extract content of
f4sevr_0_6_21
folder into\root\f4sevr
- Override changed files
- Git clone
Fallout-4-VR-Body
- Should be
\root\Fallout-4-VR-Body\
for later
- Should be
- Extract files in
\root\Fallout-4-VR-Body\f4se_updates_add_to_your_f4se_library\f4se_updates.zip
tof4sevr\src\f4sevr\f4se
(overwrite)
- Git clone
- Git clone
Fallout-4-VR-Body
(if not already from building "f4sevr")- Should be
\root\Fallout-4-VR-Body\
- Should be
- Open
Fallout-4-VR-Body
in Visual Studio- Double click
\root\Fallout-4-VR-Body\Fallout4VR_Body.sln
- Double click
- Change target dropdown from "Debug" to "Release"
- Setup post build copy environment variable
setx FRIK_MOD_PATH "C:\[myModsLocation]\FRIK\F4SE\Plugins"
- Restart VS2022 to load the envar
- Build > Build Solution
- Find
\root\Fallout-4-VR-Body\x64\Release\FRIK.dll
- Do all the steps in setup
f4sevr
- Open
f4sevr
solution in Visual Studio- Double click
C:\Stuff\github\f4sevr\src\f4sevr\f4sevr.sln
- Ignore all source control warnings
- Confirm retarget project to latest
- Solution was configured for VS 2012 (v110), we can retarget it to latest 2022 (v143)
- Double click
- Fix compilation error due to more strict C++
- Open
PapyrusObjectReference.cpp
- Go to line 558
- Add
const
to the end of the function declaration (just before the{
bracket)bool operator()(const std::pair<BGSMaterialSwap::MaterialSwap*,float> lhs, const std::pair<BGSMaterialSwap::MaterialSwap*,float> rhs) const {
- Open
- Change target dropdown from "Debug" to "Release"
- Change
f4se
project output configuration to Static Library- Right click on
f4se
project; click Properties - Configuration Properties > General;
- Change "Configuration Type" from "Dynamic Library (.dll)" to "Static Library (.lib)"
- close
- Right click on
- Build > Build Solution
- Ignore 3 post build errors to copy output files
- Find the 3
.lib
files\root\f4sevr\src\f4sevr\x64\Release\f4se_common.lib
\root\f4sevr\src\f4sevr\x64\Release\f4sevr_1_2_72.lib
\root\f4sevr\src\f4sevr\x64_vc11\Release\common_vc11.lib
All FRIK configuration files are located in %USERPROFILE%\Documents\My Games\Fallout4VR\FRIK_Config
.
This folder is shared across all versions and instances of FRIK.
Using a shared location was necessary due to two constraints: configuration files cannot be included in the mod distributable (ZIP file), and Mod Organizer 2 (MO2) restricts write access to the mods folder (details, more details).
We avoid including config files in the distributable to prevent user configuration from being overwritten during upgrades. Instead, FRIK.dll includes a default configuration, which is used if no existing config is found on disk. However, since MO2 does not allow writing to the mods folder and instead redirects all writes to its "overwrite" folder, this causes config files to be stored in an unexpected location. To avoid this confusion, we chose to use the standard %USERPROFILE%\Documents\My Games\Fallout4VR\FRIK_Config path, which is consistent and accessible outside of MO2’s virtual file system.
-
Logs are found in
%USERPROFILE%\Documents\My Games\Fallout4VR\F4SE
-
Fallout4VRBody.log
for FRIK logs -
crash-<date time>.log
for crash logs - use
tail -f "%USERPROFILE%\Documents\My Games\Fallout4VR\F4SE\Fallout4VRBody.log"
to tail the log
-
-
Open win environment variables edit using
rundll32.exe sysdm.cpl,EditEnvironmentVariables
-
Don't keep more than one
.dll
file in the...\F4SE\Plugins
folder. For example, if you're backing upFRIK.dll
, avoid renaming it toFRIK_org.dll
in the same folder. This is becauseF4SEVR
loads all.dll
files in the directory, which results in the plugin being loaded twice. It appears to load plugins in alphabetical order, soFRIK_org.dll
will be loaded afterFRIK.dll
, potentially causing issues and making it unclear why your code isn't running.