Skip to content

Releases

sf-load-order 0.4.1

Choose a tag to compare

@github-actions github-actions released this 04 Dec 09:57

What's new

A fix-up release for 0.4.0. No command or option was removed or renamed, the exit codes are the same, and no report.json key was removed or renamed. report.json gains recommend.verified and recommend.score_checked in the results summary.

  • The recommended order no longer flips back and forth. When no order keeps every record, each check used to recommend moves that the next check undid, because a flipped pair's cost was known only in part. Now a recommendation that rests on such estimated costs is checked first: sf-load-order runs sf-mod-check conflict once on the recommended order (about 2 more minutes on a 150-plugin order), and the moves stand only when the exact score is lower by at least the near-tie threshold. Otherwise your order is kept, and a note gives both exact scores. When no check is possible (for example with a --conflicts file made for another load order), only exactly known savings move a plugin, a note says how many possible moves were left out, and a failed check run adds a caution with its reason. A re-check of an applied recommendation no longer leads back to the order you had. sort is unchanged.
  • --log can't empty your saved copies. It is refused anywhere inside an --orders folder and for any file named like a copy that keep wrote.
  • Shorter, clearer reports. Skipped order files are grouped by reason (a Vortex export folder gave 165 notes, now 3); match-saves names the first 5 plugins in the save only and in the file only; from-save calls places marked sort or guessed "unsure" (report.json keys are unchanged); --quiet still prints the note for an --orders folder that doesn't exist.
  • from-save without --data now takes .esm and .esl files (and plugins the save loads before one) as master plugins, and keeps an official plugin that isn't in the tool's own list in the save's order.
  • A merged patch that sf-mod-check reports as inactive (exit 2, patch-off) is shown as not enabled.

Example

A made-up load order where ExampleCrew.esm and ExampleCompanion.esm change the same companion records, so no order keeps every change. On this order, 0.4.0 recommended loading ExampleCompanion.esm after ExampleCrew.esm on an estimated saving, and the check after that recommended moving it back. 0.4.1 runs sf-mod-check on the moved order first. The move would save only 3 points, under the near-tie threshold of 10, so the "Suggested order" part of report.txt keeps your order:

Loss score (lower is better): your current order (LOOT's if you just sorted) 60, recommended 60.
The moves an estimate suggested were checked with sf-mod-check on the moved order (loss score 57) and weren't
worth it, so they were left out.
The suggested order is the same as your current order, so there is nothing to change.
  * Pairs kept in their current order: 1.
      - ExampleCompanion.esm loses to ExampleCrew.esm (checked with sf-mod-check on the recommended order: they
        would save 3, under the near-tie threshold of 10 (loss score 60 now, 57 after the moves; lower is better))

When the checked move does clear the threshold, the report says "The recommended score was checked: sf-mod-check ran on the recommended order.", and a check after you apply it keeps the new order.

Check each download against its .sha256 file.

sf-load-order 0.4.0

Choose a tag to compare

@github-actions github-actions released this 29 Nov 17:26

What's new

Three new commands, for a player who has a save but has lost the load order that went with it. No existing option was removed or renamed, the exit codes of the existing commands are the same, and no report.json key was added, removed or renamed. The new commands need sf-save-reader, which reads the save for them. They only read: they write to the folders you name.

  • match-saves ranks your saved order files against your saves. For each save it lists the best matches with a set % (the share of plugins in common, the game's own and BlueprintShips- files left out; the text gives the counts in the save only and in the file only, and --json names them) and an order % (the share of shared plugin pairs in the same order, counted inside each of the save's three lists). It takes a .sfs file or a folder searched with its subfolders, --top N, --json and --csv. A save it can't read is listed with the reason and doesn't stop the run.
  • from-save makes a plugins.txt and/or a Vortex load order file (--format plugins-txt|vortex|both) from one save, in sf-load-order-from-save unless --out says otherwise. The save keeps its three lists (full, medium, light) in order, but not how they mix; that is estimated, with each order file in --orders casting a vote and the plugins' masters from --data as rules. The report marks how sure each place is and ends with What you need: each plugin installed, a Creation (with its name, to get from the game's Creations menu) or not found; with --vortex-profile it names the Vortex mod that holds each plugin not found in Data, and says when that mod isn't enabled in the profile. --json writes the same facts to from-save.json.
  • keep saves a dated copy of the live Plugins.txt (and, with --vortex-loadorder, a Vortex load order file) into a folder, as plugins-YYYYMMDD-HHMMSS.txt and vortex-loadorder-YYYYMMDD-HHMMSS.json. Run it before each play session and the other two commands have your own history to work from. It skips a copy that equals the newest one, never overwrites or deletes, and makes the folder if it is missing.
  • Order files are read from folders each run: Plugins.txt copies, Vortex load order .json files, and sf-log-collector zips (only appdata\Plugins.txt inside is read, with a size limit, and nothing is unpacked to disk). There is no database or cache.
  • A walk-through for a player with only these tools is in the README ("Working from a save"), and new lines in "Known limits" say what a save can't tell.

Example

match-saves over one made-up save and three made-up order files kept on three days, on a PC set to UTC-5 (the stamp in a file's name is local time; the output shows UTC):

> .\sf-load-order.cmd match-saves saves --orders "C:\Example\orders"
Save saves\Quicksave0.sfs
  Player Example Pilot, level 12, saved 2026-03-03T01:15:00Z; 4 plugins besides the game's own
  best match: C:\Example\orders\plugins-20260302-190000.txt
      set 100.0%, order 100.0% (plugins-txt, 2026-03-03T00:00:00Z); 4 shared, 0 in the save only, 0 in the file only
  #2: C:\Example\orders\plugins-20260301-181500.txt
      set 75.0%, order 100.0% (plugins-txt, 2026-03-01T23:15:00Z); 3 shared, 1 in the save only, 0 in the file only
  #3: C:\Example\orders\plugins-20260303-090000.txt
      set 50.0%, order 100.0% (plugins-txt, 2026-03-03T14:00:00Z, after the save); 2 shared, 2 in the save only, 0 in the file only

RESULT: 1 save(s) matched against 3 order file(s)

The file made on 2026-03-02 at 19:00 local time holds the plugins the save has, so it is the best match. The file of 2026-03-03 is later than the save, so it is marked "after the save".

Check each download against its .sha256 file.

sf-load-order 0.3.4

Choose a tag to compare

@github-actions github-actions released this 28 Nov 03:56

What's new

A fix-up release for 0.3.3. No option was removed or renamed, the exit codes are the same, and no report.json key was removed or renamed. report.json gains one key: hoisted_by in the data of a "loads before its master" problem (the master plugin that makes the game load the plugin early).

  • A master plugin that another master plugin needs is no longer reported when it is listed below it. The game loads it just before the first master plugin in the list that needs it (the rule LOOT and Vortex use), so a list such as ExampleQuestsPatch.esm, ExampleQuests.esm, with the patch needing ExampleQuests.esm, is fine in game. 0.3.3 called it a problem with a move that changed nothing.
  • Every "loads before its master" fix is checked before it is given. The tool tries the move it suggests against the game's rules. When moving the plugin down doesn't help, it suggests moving the master up above the master plugin that makes the game load the plugin early, or, when the master is itself loaded early for another master plugin, moving that master plugin up. When no order helps (a plain plugin that a master plugin needs, whose own master is a plain plugin no master plugin needs), the problem says so and names the master plugin to disable or the author to ask.
  • The archives section picks each file's winner in the order the game loads the plugins. A plain plugin listed above a master plugin loads after it, so its archived files win. 0.3.3 used the list's order there and could name the wrong winner. When the loser loads with the master plugins and the winner doesn't, the fix says the list's order can't change it.
  • Clearer reasons. A plain plugin that the game loads with the master plugins is no longer called "a master plugin" in sort, rules explain and the recommended order; the reason names the master plugin that needs it. A recommended move for a master the game already loads first gives the "lists it where the game loads it" reason instead of "it must load after its master".
  • --depth heavy shows its progress. The cleaning check runs sf-mod-check once per plugin and can take many minutes. It now prints one line per plugin on stderr ([records] sf-mod-check check 3/40: ExampleQuests.esm), so a long run doesn't look hung. Stdout still holds only the RESULT line, and --quiet turns the lines off.
  • Clearer cautions. The caution about record data made for another load order tells you to leave out --conflicts only when you gave that file; after a run where sf-mod-check ran in this run, it says what to do instead. The caution about plugins sf-mod-check loaded from an MO2 profile names only the ones the game drops. The skip text for an sf-mod-check older than 0.16.0 under MO2 now also offers --conflicts.
  • report.html lists the game's load order. The folded list "The order the game loads" now shows the order the game really uses (master plugins first), not the order of your list.
  • --log refuses the wrong file. A --log path that is an input file named on the command line, a load order file name (Plugins.txt, loadorder.txt, modlist.txt or a Vortex export), a plugin or archive name, a stream name or a link now stops with exit 2 and a message that names --log, instead of writing over the file.
  • Master names in a plugin's header are escaped when printed, so a damaged or hostile header can't put control characters, line breaks or text-reversing (bidi) characters in the report or terminal. Joiners, soft hyphens and direction marks, which real names use, are kept, so such a master still matches its plugin.
  • The Vortex route in the README starts with the Plugins.txt that Vortex writes when it deploys. The Modlist Backup extension stays the option for --vortex-loadorder and --vortex-profile. The old text told you to click an Export button on Vortex's Load Order page, which could not be confirmed, so the claim is gone from the README, AGENTS.md, --help and the error messages.
  • A "Known limits" section in the README lists what is known and left as it is.
  • Five shared test sets now run in the tests (output paths, damaged input files, damaged plugins, terminal text, paths and programs). The cases that are left as known limits are in tests/shared/ADOPTION.json.

Example

The sort run of the README on its made-up load order. ExampleQuestsPatch.esm is listed above its master ExampleQuests.esm; 0.3.3 counted that as a problem, but the game loads ExampleQuests.esm first, so the run now has no problem. The sort still lists the master first.

> .\sf-load-order.cmd sort --plugins-txt Plugins.txt --data Data --depth light --no-state --no-loot --rules my-rules.json
sf-load-order 0.3.4 by Richard Bejtlich - GPL-3.0 - https://github.com/taosecurity/sf-load-order
RESULT: 0 problem(s), 1 caution(s), 1 note(s) (report: out\report.txt)

The "Sorted order" part of the report:

Sorting moves 2 plugins; the order wasn't rated (no record-conflict data).
Moves (2):
   1. Load ExampleArmor.esm after ExampleLights.esm. Why: Your rule (my-rules.json, entry 1) says
      ExampleArmorRetexture.esm loads after ExampleArmor.esm.
   2. Load ExampleQuests.esm after ExampleArmorRetexture.esm. Why: ExampleQuestsPatch.esm has ExampleQuests.esm as a
      master.
Rules not met (1):
   1. Your rule (my-rules.json, entry 2) says ExampleQuests.esm loads after ExampleQuestsPatch.esm, but
      ExampleQuestsPatch.esm has ExampleQuests.esm as a master. The rule wasn't used.

Check each download against its .sha256 file.

sf-load-order 0.3.3

Choose a tag to compare

@github-actions github-actions released this 27 Nov 21:51

What's new

A fix-up release for 0.3.2. No option was removed or renamed, the exit codes are the same, and report.json has no new keys.

  • A mod's own plugin order no longer overrides the game's master rules. When a mod lists a patch above its master, the recommended order now puts the master first and still applies your picks. The mod's other plugins keep their order wherever the game's rules allow. Before, that mod got no recommendation and its picks were judged against an order the game never uses.
  • The recommended order never puts a master plugin (an .esm, .esl or a plugin with the master flag) below a plain one. The game loads master plugins first whatever the list says, so such a move never changed anything. A move made only for that rule says the game loads the plugin there anyway.
  • The order check judges the order the game really loads. A plain plugin listed above its master plugin is no longer reported as "loads before its master". A plain plugin that a master plugin needs counts as loading just before that master plugin, as the game loads it (the rule LOOT and Vortex use), so it is never reported either, and sort no longer calls it a game rule it can't keep. The recommended order, its loss scores and its caution about archived files whose winner changes use the same game order.
  • Programs are found only on PATH, or at a path you give. sf-mod-check, 7z and taskkill were looked up in a way that could find a file of that name in the folder you started the tool from. Now the tool walks PATH itself, skips empty, . and relative entries, and never looks in the current folder. A path given with --sf-mod-check or a full path still works as before. taskkill runs from %SystemRoot%\System32, and so does cmd.exe (used for a .cmd wrapper) when the ComSpec setting is missing. With --verbose the log says which program path was used.

Example

The same made-up sort run as 0.3.2's; only the version in the byline differs.

> .\sf-load-order.cmd sort --plugins-txt Plugins.txt --data Data --depth light --no-state --no-loot --rules my-rules.json
sf-load-order 0.3.3 by Richard Bejtlich - GPL-3.0 - https://github.com/taosecurity/sf-load-order
RESULT: 1 problem(s), 1 caution(s), 1 note(s) (report: out\report.txt)

The "Sorted order" part of the report:

Sorting moves 2 plugins; the order wasn't rated (no record-conflict data).
Moves (2):
   1. Load ExampleArmor.esm after ExampleLights.esm. Why: Your rule (my-rules.json, entry 1) says
      ExampleArmorRetexture.esm loads after ExampleArmor.esm.
   2. Load ExampleQuests.esm after ExampleArmorRetexture.esm. Why: ExampleQuestsPatch.esm has ExampleQuests.esm as a
      master.
Rules not met (1):
   1. Your rule (my-rules.json, entry 2) says ExampleQuests.esm loads after ExampleQuestsPatch.esm, but
      ExampleQuestsPatch.esm has ExampleQuests.esm as a master. The rule wasn't used.

Second example: the order check

A made-up Data folder holds ExampleBase.esm (a master plugin) and ExamplePatch.esp (a plain plugin that has ExampleBase.esm as a master). Plugins.txt lists the patch first:

ExamplePatch.esp
ExampleBase.esm

Run on it:

> .\sf-load-order.cmd --plugins-txt Plugins.txt --data Data --depth light --no-state

0.3.2 ended with RESULT: 1 problem(s), 0 caution(s), 1 note(s) and the top finding

1. [Problem] ExamplePatch.esp loads before its master ExampleBase.esm.
   Fix: Move ExamplePatch.esp below ExampleBase.esm in the load order.

0.3.3 ends with RESULT: 0 problem(s), 0 caution(s), 1 note(s): the game loads the master plugin first anyway, so the order is fine.

How it works

The recommend step ranks its ordering rules the way sort does: master edges first, then master plugins before plain ones, then each mod's own plugin order (an edge that contradicts those is dropped). The order check reads the list in the game's real order. Program lookup is one small PATH walk shared by the sf-mod-check and 7-Zip lookups.

Check each download against its .sha256 file.

sf-load-order 0.3.2

Choose a tag to compare

@taosecurity taosecurity released this 25 Nov 16:15

What's new

A small release. No option was removed or renamed, the exit codes are the same, and report.json has one new key, load_order.mo2_instance (the MO2 instance folder, or null when sf-mod-check can't be given it on this system).

  • MO2 record check without --conflicts. With --mo2, mods outside the Data folder and sf-mod-check 0.16.0 or newer, the record check runs sf-mod-check conflict --mo2 <instance folder> --profile <profile> --data <Data>, so sf-mod-check reads MO2's mod folders itself. Before, plugins kept in MO2's mod folders made the check skip unless you started sf-load-order from MO2 or passed --conflicts by hand. Started from MO2 (every plugin in Data), the check works as in 0.3.1. With an older sf-mod-check the check still skips, and the message says why and to update it. sf-mod-check builds the load order from the profile itself, so it may load a plugin that doesn't load in the game (a name the game drops); then the record check skips with a caution naming those plugins. --depth heavy's per-plugin sf-mod-check check and the merged-patch check still need sf-load-order started from MO2, and candidate is unchanged (still start it from MO2).
  • A ModOrganizer.ini copied from Windows works on Linux. Folder settings such as mod_directory=..\\MO2\\mods are split at the backslashes on Linux, where 0.3.1 read them as one odd folder name. sf-mod-check doesn't do that, so on Linux such an instance isn't handed to it with --mo2, and the record check works as in 0.3.1.

Example

The same made-up sort run as 0.3.1's; only the version in the byline differs. (The MO2 change shows in the log: with --verbose, a run under MO2 logs the sf-mod-check conflict --mo2 <instance folder> --profile <profile> command line it starts.)

> .\sf-load-order.cmd sort --plugins-txt Plugins.txt --data Data --depth light --no-state --no-loot --rules my-rules.json
sf-load-order 0.3.2 by Richard Bejtlich - GPL-3.0 - https://github.com/taosecurity/sf-load-order
RESULT: 1 problem(s), 1 caution(s), 1 note(s) (report: out\report.txt)

The "Sorted order" part of the report:

Sorting moves 2 plugins; the order wasn't rated (no record-conflict data).
Moves (2):
   1. Load ExampleArmor.esm after ExampleLights.esm. Why: Your rule (my-rules.json, entry 1) says
      ExampleArmorRetexture.esm loads after ExampleArmor.esm.
   2. Load ExampleQuests.esm after ExampleArmorRetexture.esm. Why: ExampleQuestsPatch.esm has ExampleQuests.esm as a
      master.
Rules not met (1):
   1. Your rule (my-rules.json, entry 2) says ExampleQuests.esm loads after ExampleQuestsPatch.esm, but
      ExampleQuestsPatch.esm has ExampleQuests.esm as a master. The rule wasn't used.

How it works

Nothing changed in the design: under MO2 the record check hands the instance folder and profile to sf-mod-check instead of a written Plugins.txt, and a folder value from an ini is read with backslashes as separators on every system.

SHA-256 of sf-load-order-0.3.2.zip: c2f2742ccfea28687f7cf979dea428988c46bde52457aa0cc739074ea2929a1d

sf-load-order 0.3.1

Choose a tag to compare

@taosecurity taosecurity released this 25 Nov 10:56

What's new

A fix-up release for 0.3.0. No option was removed or renamed, the exit codes are the same, and report.json only gained keys. A normal run (no sort, no rules) writes the same order files and report as 0.3.0.

  • sort keeps what the climb found. The restarts of the record-conflict climb start from the best order so far, and Vortex's tie-break trials start from the climbed order, so a sort moves only the plugins a rule needs moved.
  • Clearer reasons in "Sorted order". A move says "your pick" only when the plugin lands right after the plugin you picked; a user rule's move is no longer credited to "master plugins first"; a crashed sort section says "No order was sorted" and its status. A pick that names a plugin that isn't enabled gets a caution.
  • "Rules used, by source" counts rules, not edges: one per written entry (picks, rules files, LOOT) and one per pair for the game, mods and patch targets. On a real load order the LOOT masterlist's 15 became 5.
  • rules: list, explain and propose print the cautions for a bad --picks or --clashes entry (JSON key cautions). rules accept can't reuse an id that a skipped entry holds, and a rules file is hashed once per run.
  • LOOT: a regex repeat count over 260 (a{99999999999}) is refused instead of raising an error; an unsafe "after" item is counted once per entry; entries past the regex limit are counted apart (report.json clashes loot part, regex_entries_over_limit, only when above 0, and a rules list line); entry names starting with < are dropped. Default-group placements that cross the master plugins are dropped with one log line.
  • MO2: a missing mod_directory, profiles_directory or overwrite_directory in ModOrganizer.ini means mods, profiles and overwrite under base_directory (or under the instance folder when there is none), as MO2 does. 0.3.0 looked in the instance folder only.
  • Smaller: JSON nested too deep in a merged-patch manifest is treated as a file that can't be read; each plugin's header is read once.

Example

The same made-up sort run as 0.3.0's; only the version in the byline differs.

> .\sf-load-order.cmd sort --plugins-txt Plugins.txt --data Data --depth light --no-state --no-loot --rules my-rules.json
sf-load-order 0.3.1 by Richard Bejtlich - GPL-3.0 - https://github.com/taosecurity/sf-load-order
RESULT: 1 problem(s), 1 caution(s), 1 note(s) (report: out\report.txt)

The "Sorted order" part of the report:

Sorting moves 2 plugins; the order wasn't rated (no record-conflict data).
Moves (2):
   1. Load ExampleArmor.esm after ExampleLights.esm. Why: Your rule (my-rules.json, entry 1) says
      ExampleArmorRetexture.esm loads after ExampleArmor.esm.
   2. Load ExampleQuests.esm after ExampleArmorRetexture.esm. Why: ExampleQuestsPatch.esm has ExampleQuests.esm as a
      master.
Rules not met (1):
   1. Your rule (my-rules.json, entry 2) says ExampleQuests.esm loads after ExampleQuestsPatch.esm, but
      ExampleQuestsPatch.esm has ExampleQuests.esm as a master. The rule wasn't used.

How it works

Nothing changed in the design: rules become edges in one graph, strongest first, and the order is the topological order closest to yours. The climb's restarts and the Vortex trials now start from the best order found so far, instead of from the order the graph first gave.

Options

No option was added, removed or renamed. rules list, explain and propose print more cautions, and --json has them under cautions.

Not yet

  • Everything listed under 0.3.0's "Not yet" still holds: no community rules file, LOOT req and inc entries stay in the known-clashes section, and sort doesn't apply the order.
  • --mo2 isn't passed on to sf-mod-check yet.

sf-load-order 0.3.0

Choose a tag to compare

@taosecurity taosecurity released this 25 Nov 09:45

What's new

sf-load-order sort builds a whole, valid load order from your enabled plugins without LOOT, and sf-load-order rules manages the ordering rules it uses. No option, section or report.json key was renamed or removed; keys were added. A normal run (no sort, no rules) writes the same files as 0.2.3.

  • sort: reads the same load order options as a normal run, runs every check of a normal run, and builds the order from the game's own rules (masters, master plugins first, a mod's own plugin order), your picks, your rules file, the patches' targets, an optional community rules file and, when found, LOOT's userlist and masterlist (after rules; groups only with --loot-groups). It starts from your current order and moves as few plugins as it can, and every move names the rule behind it. It writes plugins.txt, loadorder.txt (MO2), the Vortex import file, HOW-TO-APPLY.txt (which now opens with the number of plugins moved and "back up your current order first"), rules-proposed.json and the report, and never applies an order.
  • A rule that can't be met is never dropped silently. Each rule left out (it contradicts the game's rules, or a stronger rule) is listed under "Rules not met" with the rule that beat it. A plugin's requires and incompatible entries are checked and reported. A loop among the plugins' own masters is a problem, and then no order files are written (an earlier run's order files in the output folder are removed).
  • rules: list (every rule, active or not, with --derived for the game's own rules), explain PLUGIN (why a plugin is where it is), check (the rules files; exit 0, 1 or 2), propose (rules-proposed.json without the order files; its record-conflict choices need --conflicts; --kind patch proposes each patch's targets from --clashes) and accept (copies proposals into your rules file, with a .bak copy of the old file; the only command that writes outside --out).
  • The rules file sf-load-order-rules.json (schema 1): exact plugin names only (no regex, no wildcard; ( ) [ ] + are plain name characters), after, before, requires, incompatible, group, a note and evidence with the plugins' hashes. It lives in the state folder or is given with --rules. A rule whose pinned hashes no longer match is still applied, with one caution that lists the stale rules. examples\sf-load-order-rules.example.json is a sample.
  • Which plugins are masters (it settles an open question): a plugin is a master when it has the master flag or its name ends in .esm or .esl (source: esplugin 6.1.4, which libloot uses); the light and medium flags never change a plugin's place.
  • A safety check on LOOT's regular-expression names and conditions: a pattern over 256 characters, a back-reference, a (? form other than (?: and (?i) (look-behinds, inline flags, named groups), a group followed by *, + or {..} ((a+)+, (ab)+), more than six choices in all (*, +, ?, {..} and | together) or more than two open-ended repeats (.*.*.*\.esm; {n,m} with m over 10 counts as one), or repeats whose choices multiply past a budget ([a-z]*[a-z]* followed by four [a-z]{0,10}), is refused and its entry skipped (the log says how many, and the clashes loot part counts them as unsafe_patterns only when above 0), and a masterlist over 20 MB isn't read. This covers the 0.2.x LOOT code too. The three regex names in the Starfield masterlist of 2026-11-24 pass.
  • report.json: a top-level sort key on a sort run only, and load_order.plugins[].master. report.txt and report.html get a "Sorted order" part on a sort run, in place of "Suggested order".
  • Tested with sf-mod-check 0.17.0: its conflicts.json has every key this tool reads, and a sort run at --depth medium on a 161-plugin load order rated the order. The minimum versions stay 0.8.0 (record data) and 0.15.0 (patch manifests).

Example

A real sort run on a made-up load order (five mod plugins and the official ones; ExampleQuestsPatch.esm is listed before its master, and the rules file puts ExampleArmorRetexture.esm after ExampleArmor.esm). Its second rule, that ExampleQuests.esm loads after its own patch, can't be met:

> .\sf-load-order.cmd sort --plugins-txt Plugins.txt --data Data --depth light --no-state --no-loot --rules my-rules.json
sf-load-order 0.3.0 by Richard Bejtlich - GPL-3.0 - https://github.com/taosecurity/sf-load-order
RESULT: 1 problem(s), 1 caution(s), 1 note(s) (report: out\report.txt)

The "Sorted order" part of the report:

Sorting moves 2 plugins; the order wasn't rated (no record-conflict data).
Moves (2):
   1. Load ExampleArmor.esm after ExampleLights.esm. Why: Your rule (my-rules.json, entry 1) says
      ExampleArmorRetexture.esm loads after ExampleArmor.esm.
   2. Load ExampleQuests.esm after ExampleArmorRetexture.esm. Why: ExampleQuestsPatch.esm has ExampleQuests.esm as a
      master.
Rules not met (1):
   1. Your rule (my-rules.json, entry 2) says ExampleQuests.esm loads after ExampleQuestsPatch.esm, but
      ExampleQuestsPatch.esm has ExampleQuests.esm as a master. The rule wasn't used.

How it works

The game's rules, your picks and rules, the patches' targets, the community file and LOOT's after rules become edges in one graph of the plugins, added strongest first. An edge that would close a loop with stronger ones is rejected and reported. The order is the graph's topological order that is closest to your current one (a plugin moves only when an edge forces it), then the record-conflict climb of the main run chooses between the plugins the graph leaves open, and Vortex's mod rules break the last ties. sort and the main run share the climb, so the main run's suggested order is unchanged. A test sorts 1,000 plugins with thousands of rules in a few seconds.

Options

  • sort takes every load order, check and output option of the main run, plus --rules FILE, --no-rules, --community-rules FILE, --tie-break {current,name}, --no-loot and --loot-groups.
  • Every rules command takes --rules, --no-rules, --community-rules, --state, --json FILE, --verbose and --log. list, explain and propose also take the LOOT options, the load order options and sort's --picks, --tie-break, --conflicts, --clashes and --patch-sources; list takes --derived; propose takes --kind {choice,patch,all} and --out. check takes the load order options but not the LOOT options. accept PROPOSED.json takes --id or --all and no load order options.
  • A missing default rules file is fine; a missing file given with --rules or --community-rules is exit 2.

Not yet

  • There is no community rules file yet, and the tool never downloads one: it reads only a local --community-rules file.
  • LOOT userlist req and inc entries stay in the known-clashes section; they aren't part of sort's own requires and incompatible checks.
  • sort doesn't apply the order, and it doesn't use LOOT's metadata beyond after rules and (with --loot-groups) groups.

Docs

  • README sections "Sorting a load order (sort)" and "Your own ordering rules", the new options, the report.json keys and a Traps entry on the regex check; AGENTS.md commands for sort and rules, run by tests\run_agents.py. tests\test_doc_examples.py checks the sort Example against a real run.

sf-load-order 0.2.3

Choose a tag to compare

@taosecurity taosecurity released this 24 Nov 22:03

What's new

candidate now checks the records a new build shares with the installed mods, not only its files. No option or report.json key was renamed or removed; new keys were added.

  • At --depth medium (the default) and heavy, candidate runs sf-mod-check conflict with the installed copy of the build left out and the build's plugins in its place, so installed patches built on it still load after it, or loading last, where a new mod lands, when no copy is installed (each part after the build's plugins it masters). A build plugin that sf-mod-check couldn't load, such as one whose master isn't installed, gets a caution naming that master instead of a "no shared records" note. The build's plugins are read from a copy in <out>\work\candidate\extra (--extra-data), and the run checks records only (--no-assets), since the file comparison already covers the build's files.
  • For each installed mod whose records the build also changes, one finding says how many records, and how many of them have fields a conflict patch can forward (Forwardable) or fields both mods changed (Choice), and which side wins them (the build, or an installed mod that still loads after it, such as a plain .esp after the build's .esm). That is a caution; a mod whose shared records differ in nothing that matters (No effect) gets a note. Up to five records are named as examples. Bethesda's records that the build overrides, and the navmesh info map, aren't reported.
  • When the check can't run, one caution says why and names the fix: sf-mod-check not found or older than 0.8.0, no Data folder, a Vortex profile that isn't deployed, or an MO2 source run from outside MO2 (sf-mod-check then can't see MO2's mods). A run that fails is one caution with sf-mod-check's RESULT line. At --depth light a note says the record check didn't run.
  • candidate takes --max-memory <GB>, passed to sf-mod-check conflict.
  • report.json: candidate.records (null at --depth light) with status (done, skipped or failed), why, program, exit, result_line, file, shared_records and mods (each with mod, plugin, records, forwardable, choice, no_effect, build_wins, build_loses and examples) and not_loaded (the build plugins sf-mod-check didn't load). The findings have kind shared-records.
  • candidate reads .7z and .rar builds through 7-Zip's 7z.exe (found on PATH or in Program Files\7-Zip). Python stays standard library only; without 7-Zip the run stops with exit 2 and names the fix. A member path that is absolute or holds .. stops the run. report.json: each candidate.zips[] entry has format (zip, 7z or rar).
  • A load order whose StarfieldCustom.ini has sTestFile lines gets one caution: the game (and MO2) load those files and skip Plugins.txt, so the reported order may not be what the game loads. The INI is found in Windows's own Documents folder, even when that folder is moved to another drive. For an MO2 profile that uses local INIs, the profile's own copy is read.
  • HOW-TO-APPLY.txt for a plain Plugins.txt now has a part for players who use only the game's Creations menu, and the README explains it.
  • For an MO2 source with official plugins MO2 2.5.2 doesn't pin (Shattered Space, Terran Armada and so on), one caution and one HOW-TO-APPLY step say to check they are still ticked in MO2's Plugins tab.
  • When every merged-patch manifest found is from the old patch_sources.py, the patches list in report.json has one cannot check entry per manifest instead of being empty.
  • A failed --clashes file now reads "couldn't be used" in the report, not "was failed".
  • README: the line about who writes Plugins.txt is exact for MO2, and a Traps entry says MO2's view also holds the real Documents\My Games\Starfield\Data folder, which this tool doesn't read.

Behavior change

  • At --depth medium a candidate run now takes as long as one sf-mod-check conflict run (about 2 minutes on a 150-plugin load order), not seconds. --depth light keeps the old speed and compares file names only.
  • A candidate run without sf-mod-check, or under MO2 started from outside MO2, now has one more caution, saying the record check didn't run.

Example

The candidate Example from the README, rebuilt from its made-up files. Its second caution says the record check didn't run, because sf-mod-check can't see MO2's mods unless sf-load-order is started from MO2:

> .\sf-load-order.cmd candidate ShipMod-0.3.0.zip --mo2 mo2 --data game\Data --no-state --out out
sf-load-order 0.2.3 by Richard Bejtlich - GPL-3.0 - https://github.com/taosecurity/sf-load-order
RESULT: 0 problem(s), 2 caution(s), 1 note(s) (report: out\report.txt)

Docs

  • tests\test_doc_examples.py checks the candidate Example in the README and in the newest CHANGELOG entry only; older entries show what their release printed.

sf-load-order 0.2.2

Choose a tag to compare

@taosecurity taosecurity released this 23 Nov 23:09

What's new

This release makes the check of a Vortex profile that isn't deployed, and candidate over an older copy of the build, simpler and clearer, and gives a note for old patch manifests. No option or report.json key was renamed or removed.

Behavior change

  • When --vortex-profile names a profile that Data doesn't hold (Vortex has another profile deployed), every check that reads the profile's plugin, archive or loose files is skipped: load order and masters, patches, archives, loose files, Vortex mod rules, record conflicts and the suggested order. Before, some of these read the profile's staging copies and others gave weaker findings; now only the dropped-name and known-clash checks run.
  • One caution says so and names the fix: deploy the profile in Vortex and run again, or pass --data with a folder that holds this profile's files.
  • In report.json the skipped sections are {"status": "skipped", "why": ...}, so their results entries and outputs.vortex_json are absent, and the top-level rules and recommended are null. The mod plugins' kind and masters are null, since their headers aren't read. patches stays {"not_checked": why}.
  • candidate with a plain Plugins.txt and the build's older copy installed no longer compares Data's loose files, which can't be told apart from that copy's. One caution (kind data-unsorted, with replaced) says so and names the fix: use --mo2 or --vortex-profile, or remove the older copy. Before, each such file was a caution of kind data-old; that kind is gone. Archives are still compared plugin by plugin.

Example

A made-up profile Example-Profile while Data holds another one (here a Data folder with ModA.esm and ModB.esp, and an export of Example-Profile with ModA.esm and ModC.esm):

> python sf-load-order.py --vortex-profile Example-Profile --vortex-exports exports --data game\Data --vortex-staging staging --no-state --out out
sf-load-order 0.2.2 by Richard Bejtlich - GPL-3.0 - https://github.com/taosecurity/sf-load-order
RESULT: 0 problem(s), 1 caution(s), 0 note(s) (report: out\report.txt)

In out\report.json, the order section reads:

"order": {"status": "skipped", "why": "Data holds another profile, not Example-Profile (deploy Example-Profile in Vortex and run again)"}

The caution's fix reads: "Deploy the profile Example-Profile in Vortex and run again, or pass --data with a folder that holds this profile's files."

Fixes

  • A manifest from the old patch_sources.py passed with --patch-sources was skipped with no finding. Now one note in the Patches section names each such file, with the fix "rebuild the patch with sf-mod-check 0.15.0 or later", and report.json's finding has data.old_manifests. An old file named directly, or an old patch-sources.json found by itself beside a patch, gets this note in place of the caution "it isn't a patch-sources.json".
  • For a Vortex profile that isn't deployed, the note "N mod(s) Vortex deployed aren't in the load order export ..., so they were added from Vortex's deployment record" named the deployed profile's mods as if they were this profile's. That note is no longer given for such a profile; the caution already counts those mods as ones the profile doesn't enable.
  • A --patch-sources file that doesn't exist was counted as a manifest found in the note that sf-mod-check wasn't found. Now it gets its own caution, "the file wasn't found", whether or not sf-mod-check is installed, and it is no longer listed in report.json's patches.
  • The exit-code tables in the README and AGENTS.md now say that --help and --version exit 0.

Download

Download sf-load-order-0.2.2.zip. Its checksum is in sf-load-order-0.2.2.zip.sha256.

sf-load-order 0.2.1

Choose a tag to compare

@taosecurity taosecurity released this 23 Nov 22:14

This release fixes the docs. It changes no behavior, option or report.json key.

Example

The candidate Example below is the one from 0.2.0 with its RESULT line corrected: it ends in "1 note(s)", because the note that names the older copy left out is counted. The same run, rebuilt from the made-up files:

> .\sf-load-order.cmd candidate ShipMod-0.3.0.zip --mo2 mo2 --data game\Data --no-state --out out
sf-load-order 0.2.1 by Richard Bejtlich - GPL-3.0 - https://github.com/taosecurity/sf-load-order
RESULT: 0 problem(s), 1 caution(s), 1 note(s) (report: out\report.txt)

Fixes

  • The candidate Example's RESULT line said "0 note(s)" in the README and the CHANGELOG; the release prints "1 note(s)".
  • The README's .pex row for "Checking a new mod build" pointed at "the row below", which is no longer the row it meant. It now names the row.
  • The README's Install section named 0.1.3; it now names 0.2.1.

Docs

  • A test, tests\test_doc_examples.py, runs the candidate Example and fails when the RESULT line in the README or the CHANGELOG differs from what the run prints.

SHA-256 of sf-load-order-0.2.1.zip: 02166d70e4d7b3533dd443f958608345a121a75a8b5017cf964cb46ad52a7713