An F4SE plugin that gives Fallout 4 weapons and armor a condition that wears
down with use, built on CommonLibF4.
It is one DLL, NEC.dll, its settings file, NEC.ini,
which says what every setting does, and the Mod Configuration Menu page,
config.json. Put your own changes in
NEC_custom.ini beside NEC.ini. For what it does in game, see
publish/README.txt.
git clone --recurse-submodules https://github.com/hxef/NativeEquipmentCondition
cd NativeEquipmentConditionTo build the project, run the following command:
xmake buildNote: This will generate a
build/windows/directory in the project's root directory with the build output.
If you want to redirect the build output, set one of the following environment variables:
- Path to a Mod Manager mods folder:
XSE_FO4_MODS_PATHor - Path to a Fallout 4 install folder:
XSE_FO4_GAME_PATH
To copy the DLL, the PDB, NEC.ini and the MCM config.json into a mod folder after every build instead, point deploy_dir at it once:
xmake f --deploy_dir="C:/MO2/mods/Native Equipment Condition"If you use Visual Studio, run the following command:
xmake project -k vsxmakeNote: This will generate a
vsxmakeXXXX/directory in the project's root directory using the latest version of Visual Studio installed on the system.
Alternatively, if you do not use Visual Studio, you can generate a compile_commands.json file for use with a language server like clangd in any code editor that supports it, like vscode:
xmake project -k compile_commandsNote: You must have a language server extension installed to make use of this file. I recommend
clangd. Do not have more than one installed at a time as they will conflict with each other. I also recommend installing thexmakeextension if available to make building the project easier.
If you want to upgrade the project's dependencies, run the following commands:
xmake repo --update
xmake require --upgradeA Linux host cross compiles the DLL through the contrib/linux-cross submodule, see its README for the setup:
xmake f -p windows -a x64 -m releasedbg --toolchain=xwin-clang-cl
xmake buildARCHITECTURE.md is the layout. Every header says what the game does there and what the plugin does about it. legacy/ holds the Papyrus scripts, the ESP and the sources that need them, kept for reference and never built.
GPL-3.0 with the modding exceptions CommonLibF4 carries.