About this mod
Skyrim Runtime Optimizer is a tool that intercepts the game's file loading calls to use the optimized assets that the mod creates.
- Requirements
- Permissions and credits
SSE NIF Optimizer
It achieves this by dynamically optimizing NIF (NetImmerse File, used for 3D models) and DDS (DirectDraw Surface, used for textures) files and intercepting the game's file loading calls to use these optimized versions.Here's a breakdown of its core functionalities:
- Asset Optimization:
- Background Scanning and Processing: The plugin initiates a background thread (
g_OptimizationThread
) after the game's data has loaded (SKSE::MessagingInterface::kDataLoaded
). This thread scans the game'sData
directory for.nif
and.dds
files. - External Tool Integration: It leverages external command-line tools,
SSE NIF Optimizer.exe
andMagick.exe
, which are expected to be present in the game's installation directory..nif
files are batch-processed usingSSE NIF Optimizer
to optimize the 3D models..dds
files (textures) are converted to the BC7/DX10 format, and resized by 50% usingMagick
, which is a modern and efficient compression format for textures, aiming to reduce VRAM usage and potentially improve loading times.
- Optimized Asset Storage: Optimized versions of the NIF and DDS files are saved to a dedicated
OptimizedAssets
folder within a user-configurable save directory (defaulting toC:\SkyrimLogs\OptimizedAssets
). This keeps the original game files untouched. - Caching System: To avoid re-optimizing files unnecessarily, the plugin maintains a cache (
g_OptimizedFileCache
). It stores the last modification timestamp of original files. If a file's timestamp hasn't changed since the last optimization, it's skipped. This significantly speeds up subsequent game launches. The cache is saved to and loaded fromRuntimeOptimizerCache.dat
.
- Background Scanning and Processing: The plugin initiates a background thread (
- The plugin uses MinHook to intercept Windows API calls related to file I/O, specifically
CreateFileW
andCreateFileA
. - When the game attempts to open a
.nif
or.dds
file, the plugin checks if an optimized version of that file exists in itsOptimizedAssets
directory. - If an optimized version is found, the plugin redirects the game's file request to the optimized file instead of the original. This ensures the game uses the performance-enhanced assets.
- The plugin integrates the Dear ImGui library to provide a lightweight, in-game overlay.
- It hooks into the DirectX 11
Present
function to render this UI. - The UI (
RenderUI
) displays the current status of the optimization process (g_ScanStatus
), indicates when the scan is complete, and shows the paths for the optimized assets and the configuration file. - Users can toggle the visibility of this UI by pressing the F1 key.
- Settings are loaded from and saved to
Data/SKSE/Plugins/RuntimeOptimizer.ini
. The primary configurable setting is thesSavePath
for logs, cache, and optimized assets. - Comprehensive logging (
Log
function) is implemented, writing timestamped messages toRuntimeOptimizer.log
within the configured save directory. This is crucial for debugging and monitoring the plugin's operations.
- How is this different from other traditional optimizers?
- This optimizer is different in that it doesn't overwrite your original game files at all, and doesn't have to be in the same instance as for example mod organizer to overwrite the pre existing assets as many optimizers require.
NOTE: PLEASE RUN SKYRIM RUNTIME OPTIMIZER FIRST THEN SKYRIM RUNTIME REDIRECTOR,
IMPORTANT: DO NOT RUN BOTH AT THE SAME TIME OTHERWISE THEY WILL CLASH WITH EACH OTHER.
IMPORTANT: PLEASE READ THE README.TXT THAT IS PROVIDED WITH SKYRIM RUNTIME OPTIMIZER FOR INSTRUCTIONS.