Skyrim Mod:SkyProc/How to List/Exporting

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

Related SkyProc Classes[edit]

  • Mod - An object representing a complete Skyrim mod.

How To[edit]

Export a patch[edit]

NOTE: This is already handled for you if you are using the SkyProc Starter project. You should not export yourself unless you're doing a custom project from scratch.

    Mod outputPatch = new Mod ("myOutputPatch", false);

      ... Code adding modified records to patch ...

    outputPatch.export();

Exporting is meant to be simple and easy. Once the desired records have been added to a patch, just call its export() function and everything is handled by SkyProc.

Only Export Modified GRUPs[edit]

An important part of modding is having each patch only affect records it modifies (not having copies of unmodified records).

There is an easy standard you can use to keep only modified records when creating SkyProc patches.

Use a temporary merger patch[edit]

The most efficient way is to use two separate Mod objects:

  1. A merger mod object to merge all imported records to a flattened "load order winner" setup.
  2. An output mod/patch to add modified records to and export at the end.
// Import code

Mod merger = new Mod("TemporaryMerger", false);
merger.addAsOverrides(SPGlobal.getDB());

Mod patch = new Mod("myPatch", false);

   ... your logic code that uses merger to access imported records ...

// A record was modified, so we want to export it by adding it to patch.
patch.addRecord(someModifiedRecord);

   ... more custom code ...

patch.export();

With a separated setup, you can iterate over the merger to access all the GRUPs imported, but then add desired (modified) records to the output patch explicitly, leaving an optimally clean patch.


Related Articles[edit]