Compatibility Patching

From Nexus Mods Wiki
Revision as of 04:10, 15 November 2018 by Dubiousintent (talk | contribs) (Added 'Category:Mod_Creation')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Overview

This is a written description of the Making a Feature Patch 6:31 minute video tutorial by Roy Batty (just because I prefer to refer to written instructions. I made the written version slightly more "generic" than the video).

A "feature patch" is pretty much the same thing as a basic "compatibility patch" to make more than one mod work with each other. There is a technical difference: a "feature patch" is primarily adding or changing something (typically a "new" or extensive number of items) from one plugin into another, giving it different (often radically so) results from the original. A "compatibility patch" is primarily changing the "statistics" or "capabilities" of items already present in both to reconcile the differences between the plugin versions. Obviously either can do both to greater and lessor extents. (They are not constrained to "items". They could be altering the landscape or placement of features, but the most common use is for items.) In both instances, the "patch" file is an "override" and still has to load after the "master" files and should not be "merged" into a "merge plugin".

For any sort of patch: You have to create a new plugin ("new filename" when you save) with the original plugin as a master. You can do this with either the GECK (if you are adding completely new stuff such as assets or scripts) or FNVEdit (if you are simply editing existing record values or copying records from another master file).

If the original plugin your patch applies to is an ESP, then you need to use FNVEdit to set the "Master" flag in the original plugin's "file header" record. (This is often called "ESMifying".) Do not change the filename. It needs to remain as an ESP. This will then let you use that file as a master for your new patch plugin. Once you are done creating and saving your patch plugin, you should change the original plugin file header record back by removing the "master" flag again.

Details

A word about "record selection" in xEdit: You may find a number of desired "selection blocks" of records of various types. Unlike standard Windows editors, xEdit provides a mechanism allowing you to select multiple "selection blocks" and chain them together using the standard Windows <Shift+Click> and <Ctrl+Click> selection commands. This means once some selection of records has been made, you can add an additional group of records by:

  • <Ctrl+Click> on the first record of the next range, (the <Ctrl> key adds that record to the existing selections), then;
  • <Ctrl+Shift+Click> on the last record of that new range to extend and "chain" the "block" selection to those previously selected, or use <Ctrl+Click> to add each new individual record.
  • If you do not use the <Ctrl> key to combine the new selection with those previous ones, you are starting a new, separate selection which discards all those previous selections.

Procedure

  • Open xEdit (e.g. FNVEdit) with the just the plugins you are making compatible or combining features from.
  • Expand the record types of the earlier loading (higher placed) of the plugins you are concerned with by "< Left-clicking >" on the "+" to the left of the plugin filename.
  • Look for the record types they have in common (e.g. weapons", "Form Lists", etc.).
You're primarily going to be concerned with "red" records that have been changed from earlier loading mods, first. Any "green" or "yellow" background records will be carried forward from the original plugins automatically.
  • Select these records using "< Ctrl >" while clicking on individuals and adding "< Shift >" to add blocks of them to the existing selected list.
  • Now work your way down through any remaining plugins you need to add "features" from or make "compatibile" into your "patch file. Again, repeat the same selection process of "red" backgrounds, using "< Shift >" to add these new selections to those previously selected in the earlier plugin.
  • Hover your cursor over one of the records you have selected, and "< Right-click >" which will bring up the "context menu".
    • In this context menu, select "Copy as Override into ..." (which will display a list of destination filenames).
    • Choose the "New File" destination and click on the "OK" button.
    • Give it the name for your "feature" or "compatibility" patch, which reflects all the files it is combining features from.
    • It will now ask if you want to add all the "masters" to this new file. Respond "Yes".
    • Scroll down in the left pane and you should see the "new file" you just created.
    • Expand the "File Header" record and check that all the necessary "masters" have been added.
      • If any "masters" are missing, "< Right-click >" on the filename and select "Add Masters" from the "context menu". Select the missing "masters", and the "OK" button when ready.
    • Now "< Right-click >" on the filename again, and select "Sort Masters" so they are the same as in your "load order". NOTE: This load order should conform to standard practice needed when playing the game. Don't "settle" for just any order as it will cause problems when actually used in the game.
  • Once the "masters" have been added and sorted, "exit" xEdit so the new file you just created gets saved.
  • Re-open xEdit with just the new file you just saved (at the bottom of the list of plugins in "Data") selected. As all the other needed plugins are now "masters" to it, they will automatically be loaded before it.
  • "< Left-Click >" on the "+" to the left of the last plugin which will expand all of the recrods we just added to that file.
  • "< Left-Click >" the first record in the last plugin and then click on the "View" tab in the right-hand pane of xEdit so we will see the various plugins which contain the same record: listed as columns.
  • In the right-hand pane, look for the record fields with a "red" background. These are the "overrides" or conflicts between the plugins. We need to select one of these conflicting versions of the field and drag it to the same row of the right-most column which is our newly created "compatibility patch" plugin. This will be the "winner" among these conflicts and it will turn into a "yellow" or "green" background when done.
  • Repeat, working down through the fields for the remainder of the record.
  • Sometimes the right-most column has a value you want to be "empty" instead, or completely different from any of the prior plugins. You can "< Right-click >" in that field (the same row in the column of that plugin) and select "Edit" or "Remove" from the "context menu" that pops up instead.
  • Sometimes you want to combine different effects from two plugins together in a record where only one exists at present. Drag the new, not-existing effect to the empty field of the row identifying the sub-record category (e.g. a specific "RCIL - Effect" under "Ammo Effects" for "Ammunition" records) and drop it there. The added "effect" will be added to a new row below the existing one.
  • Repeat for all the records added to the "patch" file.
  • You may find that some fields won't let you change their value. This usually indicates the value comes from a "master" file record that has not been added to the "patch" file. You will need to identify which record that value comes from and copy the record as an "override" from the source plugin into the "patch" file first just as you did at the beginning of this process.
  • When you are done there should not be any "red" background records.
  • Finally exit xEdit and save the "patch" file.

Summary

"Feature" and "compatibility" patch files are not just something a mod author needs to concern themselves with. The number of combinations are incalcuable. A player can find the capability useful to achieve some desired "custom" results that are more personal than a mod creator's more generalied approach is going to consider. While it might be a bit time consuming depending upon the scall ofthe patch, that process is actually relatively simple.


References