loot / libloot

A C++ library for accessing LOOT's metadata and sorting functionality.
GNU General Public License v3.0
32 stars 12 forks source link

Sorting doesn't account for plugin hoisting #44

Open Ortham opened 5 years ago

Ortham commented 5 years ago

Plugin hoisting occurs when a master plugin has a non-master plugin as a master. In this case, the game will load the non-master immediately before the earliest master that depends on it (or between it and the previous master if there are multiple non-masters to hoist).

In this scenario, LOOT will encounter a cyclic interaction error as it tries to enforce both the masters-load-before-non-masters rule, and the plugin-masters-before-plugin rule. While this is an edge case, LOOT shouldn't error out unnecessarily.

Supporting this will require updating to libloadorder 12, which introduces support for plugin hoisting and requires that edits to the load order represent the hoisting that the game would otherwise do at runtime.