Skip to content

About

F4SE plugin that gives Fallout 4 weapons and armor a condition that wears down with use

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

Native Equipment Condition

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, 1 language file per language in publish/Translations, 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.

Requirements

  • XMake [3.0.0+]
  • C++23 Compiler (MSVC or Clang-CL)
  • Fallout 4 1.11.240 with a matching F4SE, or 1.10.163 (OG) with F4SE 0.6.23

Getting Started

git clone --recurse-submodules https://github.com/hxef/NativeEquipmentCondition
cd NativeEquipmentCondition

Build

To build the project, run the following command:

xmake build

Note: This will generate a build/windows/ directory in the project's root directory with the build output.

Build Output (Optional)

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_PATH or
  • Path to a Fallout 4 install folder: XSE_FO4_GAME_PATH

To copy the DLL, the PDB, NEC.ini, the language files 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"

Project Generation (Optional)

If you use Visual Studio, run the following command:

xmake project -k vsxmake

Note: 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_commands

Note: 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 the xmake extension if available to make building the project easier.

Upgrading Packages (Optional)

If you want to upgrade the project's dependencies, run the following commands:

xmake repo --update
xmake require --upgrade

Building from Linux (Optional)

A 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 build

Documentation

ARCHITECTURE.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.

License

GPL-3.0 with the modding exceptions CommonLibF4 carries.

About

F4SE plugin that gives Fallout 4 weapons and armor a condition that wears down with use

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages