Skip to content

Compare: Patch Ordering

Showing with 7 additions and 6 deletions.
  1. +7 −6 Patch-Ordering.md
13 changes: 7 additions & 6 deletions Patch-Ordering.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,16 @@ You can control how module manager applies patches through these six directives,

Patches are applied in the following order:
1. Nodes with no operator ('insert') are loaded by the KSP GameDatabase first.
2. Patches for _modname_ values in NEEDS, BEFORE, AFTER that don't exist are removed.
3. All patches with :FIRST are applied.
4. All patches without an ordering directive (:FIRST, :BEFORE, :FOR, :AFTER, :LAST, :FINAL) are applied.
5. For each item in the Unicode-sorted list of _modname_ values:
2. All tags declared on :FOR are harvested, no matter what the `:NEEDS` says.
3. Patches for _modname_ values in NEEDS, BEFORE, AFTER that don't exist are removed.
4. All patches with :FIRST are applied.
5. All patches without an ordering directive (:FIRST, :BEFORE, :FOR, :AFTER, :LAST, :FINAL) are applied.
6. For each item in the Unicode-sorted list of _modname_ values:
* All patches with :BEFORE are applied
* All patches with :FOR are applied
* All patches with :AFTER are applied
6. All patches with :LAST are applied in order
7. All patches with :FINAL are applied
7. All patches with :LAST are applied in order
8. All patches with :FINAL are applied

## Nodes with no operator
At the top-level node, INSERT operations take place prior to module manager being run. So a new node is created before any patches ever execute.
Expand Down