Closed plut closed 11 months ago
Considering I'm a little late in replying, I'll just leave this here and close this issue. If the feature is still desired, discussion can take place here (and I'll re-open) or in a new issue.
The request should be technically possible (though I would think you could just let the TP2 parser have at it, and get a list of TP2 actions back), however, I think you may be a bit optimistic about what can be inferred from the result. Overlapping COPY targets does not necessarily mean the mods are incompatible, if, for instance, the overwriting mod overwrites with a specifically tailored resource based on a conditional. Other times, the overwriting is no big deal because the overwritten mod can deal with it. Conversely, patching does not mean two mods are compatible as two mods can make conceptually incompatible patches, or one "overpatch" another.
This is certainly picking nits and if the feature is still desirable, I can look into implementing it.
Here is a suggestion:
--list-actions tp2file component
— Displays, in a machine-readable format, all the actions that would be performed by installing this component, without performing any of them (a lamake -n
); including (at least) all theCOPY
andCOPY_EXISTING
actions (and, if possible, the locations of most 2DA patches).Use case: this would be helpful in automatically determining mod compatibility, using the following scenarios:
I have some sample code for this (I declared a global boolean in
util.ml
and checked it insideopen_for_writing_internal
); however, given that (a) this does not currently work very well and (b) I have not written a single line in Caml for 20 years now, I prefer letting more seasoned authors have a try at it first.