New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace priorities with groups #20
Comments
@TanninOne you've had problems with priorities recently, what's your opinion of this idea? |
I've changed referencing an undefined group to be a sorting error rather than a parsing error so that userlists can extend/override the defined groups and masterlist groups can be referenced in the userlist. |
I think this should be a lot more intuitive to users. The biggest problem I see is that right now very few plugins have any priority or rules assigned. Once this feature gets added users will probably expect every plugin to be categorised or they will do it themselves. This may lead to increased maintenance work on the masterlist. The next thing that may be a problem is that the rule on a plugin disagrees with the rules between groups. That would cause a plugin to no longer appear inside its group. Then the user's OCD kicks in and they start fight the sorting to "repair" the visual order. |
I think this is an education problem, similar to how plugin masters don't need to be added to
I may have misunderstood what you mean, but I don't think it would be possible for a plugin to not appear inside its group. This change would mean that all load-order-affecting metadata sits on equal footing (because groups resolve to |
Ok, if you're not worried about masterlist activity. :) Regarding the second point, I guess it was me who understood you.
That would cause a cyclic dependency error during sorting because bar.esp has an inherited "after everything in First Group". Also: let's assume we starting from the existing master- and userlists. You create on group and assign any plugin (say foo.esp) to it. Now every rule "after: - foo.esp" becomes a cyclic dependency because all other mods still belong to the default group. So now you have to put every plugin with such a rule into their own group so they can load after foo.esp which means all rules referring to them are cyclic. I don't have a great overview of the masterlists, maybe this would just be a minor overhaul. Hrm, still: It should be easy enough to visualise and assign groups quickly via drag&drop. |
Yes, that's correct.
In general, I don't expect creating new small groups to have much overhead, I suspect the user is more likely to run into trouble reasoning about the increased (and potentially unnecessary) level of abstraction first.
No, because groups don't load after
is equivalent to
because two unrelated groups might as well be the same group. |
I've thought through a few user stories, I'm not sure if I've missed any. User wants to load a plugin as part of an existing group
User wants to load a plugin after an existing group, but no group doing so exists
User wants to load a plugin before an existing group, but no group doing so exists
The User wants an existing group to not load before/after a group it currently loads before/afterCan't be done - submit a PR to the masterlist or create a new group and put the |
Ok, sorry, I took
to mean that each declared group implicitly loads after default unless something else was specified.
Somewhat unrelated but is such a feature something that could be added or is it omitted intentionally? Something like a "not_after" one can put in the userlist to disable a rule from the masterlist? |
I'm not against having separate syntax to explicitly override/opt-out of masterlist metadata, it's more about preventing the user from accidentally doing so using the same syntax as adding new metadata. Though in general I'd prefer the masterlist updated so that overriding/opting out is unnecessary, as it indicates that the masterlist metadata is incorrect or overly restrictive. |
I don't disagree: If someone finds the masterlist to be wrong they should be able to explain why/how and then get the masterlist fixed. |
Hmm, I see what you mean. I'll think about it, but it's an issue that touches more than just priorities, so I'd prefer to consider it independently, and won't include such functionality as part of this. |
I've just noticed a significant flaw in this feature as currently described: because everything is in the There's a similar problem with plugins' masters and The underlying issue is that implicitly putting everything in the This would mean that before.esp and default.esm (belonging to groups of the same names) would not cause a cycle, because LOOT would see default.esm belongs to the In the A...Z example above, there wouldn't be a cycle as A.esp's membership of Although in simple cases (like master flag differences) this solution should be fairly intuitive, I expect it'll cause some non-obvious behaviour in more complex cases, and
|
Imho the second solution of inheriting groups sounds very unintuitive. What about introducing a general concept of "soft" rules which will only be applied if they don't contradict/cause a cycle with a "hard" rule. |
I'm now leaning towards not having the
I don't think I want to take the complexity hit of allowing an arbitrary rule to be hard or soft (and it's certainly a bigger idea than fits in this issue), but that's a good way to think about / explain groups. However, groups being soft seems like a workaround for a system that is self-contradictory, and I'd rather solve that contradiction if possible (it's probably not), as soft groups could have knock-on effects I haven't thought of. One thing that's currently bothering me is that if groups can be ignored if they cause cycles, then the order of evaluation can affect the result of sorting. For example, given plugins A.esp, B.esp and C.esp in groups of the same names, if:
The load order could be Evaluation order is stable and already matters for adding overlap and tie-break edges, so it's not the end of the world, but having metadata ignored just because LOOT happened to get to it after some other metadata seems more of a problem. |
The issue detailed in the previous comment could be avoided if group cycle handling is adjusted so that a group-derived rule is ignored if it would introduce a cycle in the absence of other group-derived rules. The goal is to ensure that the evaluation order of group-derived rules doesn't matter, just as it doesn't matter for plugin-data-derived and other metadata-derived rules. With this adjustment, the example given in the previous comment would cause a sorting error, because the group-derived rules are both applied. From the user's perspective this isn't great, but I think it's better than LOOT making an unreasoned choice over which to apply. To put it another way, LOOT currently requires that the set of (masters, master flags, If I've thought through this correctly, it avoids all the previously-raised issues, and seems compatible with the simple priority -> group conversions I've done in the masterlists so far. This could be implemented by applying group-derived rules in two passes: in the first pass, each rule is checked to see if adding it would cause a cycle, and if not it's recorded. The second pass would then apply the recorded rules, and then the cycle checker would run as it currently does. |
A couple more things:
|
Closing this as I've merged groups and removed priorities as of 523dc87. |
Priorities in LOOT's metadata have always been a pain point, as:
Priorities were introduced to solve the problem of "how do I say plugin X needs to load late, after most but perhaps not all plugins, without having an enormous
after
list?" and similar for loading plugins early (which is actually the messier problem, as there's nobefore
). In BOSS this was manually solved by dividing the masterlist into themed sections, and while this wasn't a suitable solution for LOOT, perhaps it's worth taking some inspiration from it.It may be possible to replace priorities with groups, which would act a bit like global priorities but be more accessible. For example:
this is equivalent to:
and is similar to but not the same as:
Defining the above:
name
strings.after
other groups.[]
is the default value for theafter
key.default
group by default.default
group doesn't need to be declared ingroups
.default
group can be declared ingroups
with a non-emptyafter
array.group
value that doesn't match a group named ingroups
would cause a sorting error.after
list that doesn't match a named group would cause a sorting error.after
metadata. Resolution needs to be recursive as without it if (using the above example)foo.esp
is not installed,map marker.esp
wouldn't know to load afterUnofficial Patch.esp
.after
lists. In keeping with userlist behaviour for other metadata, it would not be possible to remove entries from a group'safter
list.Behavioural differences vs. priorities:
req
orafter
metadata, but groups resolve toafter
metadata so can cause cycles. Using the above example, iffoo.esp
had anafter
formap marker.esp
, that would cause an error.A few other points worth noting:
default
) are named and declared in the same place (in a given metadata file), it's easy to see what groups are available and get an idea of what they're for.The text was updated successfully, but these errors were encountered: