Nintendo Switch Skyrim NIF Optimizer
- NIF lib from https://github.com/ousnius/BodySlide-and-Outfit-Studio
- Command line parser from https://github.com/jarro2783/cxxopts
- Install https://code.visualstudio.com
- Install https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2017
- Install https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools (https://github.com/microsoft/vscode-cpptools)
- Open Visual Studio Developer Command Prompt
- Navigate to Project folder and run
code .
- Adjust
.vscode/.c_cpp_properties.json
with correct CL path - Build (Ctrl-Shift-B)
Usage:
nswnifopt.exe [OPTION...]
--remove-editor-marker remove Editor Marker
--pretty-sort-blocks pretty sort blocks
--trim-textures-path trim textures path
--mirror-shape-x mirror shape over x axis
--mirror-shape-y mirror shape over y axis
--mirror-shape-z mirror shape over z axis
--rotate-shape-x arg rotate shape over x axis by ARG angle
--rotate-shape-y arg rotate shape over y axis by ARG angle
--rotate-shape-z arg rotate shape over z axis by ARG angle
--scale-shape-x arg scale shape on x axis by factor ARG
--scale-shape-y arg scale shape on y axis by factor ARG
--scale-shape-z arg scale shape on z axis by factor ARG
--offset-shape-x arg offset shape over x axis by ARG distance
--offset-shape-y arg offset shape over y axis by ARG distance
--offset-shape-z arg offset shape over z axis by ARG distance
--optimize-for-sse optimize NIF for SSE (modifiers below)
--is-head-part ONLY for parts like head, ear, mouth and hair
--no-remove-parallax don't remove parallax flags and meshes
--no-calc-bounds don't calculate new bounds spheres for meshes
--force-optimization force optimization if NIF on SSE format
-i, --input arg input file
-o, --output arg ouptput file
Create a batch file with this content (replace %% with % if copying and pasting directly to command prompt):
for /d %%F in ("<SOME_FOLDER_WITH_NIFS_IN_SUBFOLDERS>") go (
nswnifopt.exe -i "%%F" -o "%%F" <WHATEVER-MODIFICATION-PARAMETERS-YOU-FEEL-LIKE>
)
-
Optimize head part mesh
nswnifopt.exe -i head.nif -o head.nif --optimize-for-sse -is-head-part
-
Optimize regular mesh
nswnifopt.exe -i standard.nif -o standard.nif --optimize-for-sse
-
Apply Skyrim SSE standards to textures paths
nswnifopt.exe -i standard.nif -o standard.nif --trim-textures-path
-
Remove Editor Markers from Meshes as they create purple artifacts
nswnifopt.exe -i standard.nif -o standard.nif --remove-editor-marker
-
You can mix and match commands
nswnifopt.exe -i standard.nif -o standard.nif --remove-editor-marker --optimize-for-sse --trim-textures-path