Closed Infernio closed 1 year ago
Thanks for looking into this. I admit I don't quite get merge_records (doFilter
and iiSkipMerge
in particular). Please if you edit record grups do it on top of ut-647 branch - I am smoothing out some last bugs but then it's nightly time - it really blocks #653 and this one - and #480/#312 of course - I also cherry picked the deleted records commit there (cause I need the should_skip
for complex records also) - force pushed (still debugging but close)
I'm not touching record_groups
for that reason exactly :)
There is some stuff in record_groups
that does need editing for this (really, updateRecords
should do filtering as well, which means we should be able to save a ton of code by unifying updateRecords
and merge_records
), but that can be a pt2 commit once #647 is merged (or at least on nightly)
unifying updateRecords and merge_records
<3 - no really, this API needs thinning ASAP (see the _process_rec
mega hack - or rather don't just fixed another bug in there)
Another one that must absolutely go is that set_changed - more on this soon
Thinking more on it, it doesn't really make sense to expand filtering to updateRecords
. Unifying the two should still be possible and is a good goal though.
Not quite done yet as it turns out, will be closed with a new commit on nightly.
Seeing as we have #161 already...
The
Filter
tag doesn't do what most people seem to think it does. The only thing it does is change what records get merged into the BP when merging a plugin into the BP. So in particular, if you tag a plugin with bothFilter
andNoMerge
, the result is that it won't get merged, and so theFilter
tag does nothing. An example of a plugin affected by this is the very popularAll Natural - Indoor Weather Filter For Mods.esp
. It has the tags{{BASH:C.Climate,Deactivate,Filter,NoMerge}}
. TheFilter
tag here is useless - the way this plugin actually works in Wrye Bash is via theC.Climate
tag, because Import Cells will still import data from it in itsinitData
phase.However, here's where things get really fun. The only reason that works is due to this line: https://github.com/wrye-bash/wrye-bash/blob/c79c03a3955c4f91aa79c0c50b3eafefc70169a0/Mopy/bash/patcher/patchers/preservers.py#L476
Which also assumes that in order for this to work, the plugin must be a Filter!
Clearly everyone here has become confused as to what Filter actually does and what it should do. I can find at least two usages in the LOOT masterlist where LOOT adds both a
NoMerge
and aFilter
tag, but also a couple where it adds aFilter
tag and removes aNoMerge
tag. WB itself lets the plugin do things even without a Filter tag, while the readme only claims it must be "mergeable" - it never claims it must be "merged in":https://github.com/wrye-bash/wrye-bash/blob/c79c03a3955c4f91aa79c0c50b3eafefc70169a0/Mopy/Docs/Wrye%20Bash%20Advanced%20Readme.html#L6554
I see two options:
Filter
de facto does and add warnings for plugins that use bothFilter
andNoMerge
.Filter
is required for importing data from plugins with missing masters, as everyone seems to assume it is.I'm leaning towards option 2 to be honest. It's super weird that a non-Filter plugin with missing masters can import data into the BP, and seeing the comment above, the code seems to agree it should be required.