SkyProc

Skyrim Mod:SkyProc/How to List/Flattening

The UESPWiki – Your source for The Elder Scrolls since 1995
Jump to: navigation, search

Related SkyProc Classes[edit]

  • Mod - An object representing a complete Skyrim mod.

How To[edit]

Flatten a load order into one set of unique records[edit]

NOTE: If you are using SkyProc's starter program, this is already done for you. This tutorial is only for programmers starting a project from scratch.

// Import code

Mod merger = new Mod("MergerTmp.esp");
merger.addAsOverrides(SPGlobal.getDB());

This will merge all GRUPs from all Mods in the database into the patch. Conflicting records will be replaced by mods later in the list (exactly how it is done by Bethesda). What results is a temporary Mod object with a single "load order winner" version of each record in the database.

You can then access the records from merger to get the most "up-to-date" version of every record.