ME3TweaksModManager icon indicating copy to clipboard operation
ME3TweaksModManager copied to clipboard

Coalesced XML Patching support in Alternates

Open lawliet89 opened this issue 2 years ago • 3 comments

This is a feature request to add some kind of patching support for Coalesced XML files when definining alternates in altfile or altdlc.

A simple use case might be to allow users to opt in/out of installing a whole bunch of outfits/armor in a mod pack that has many of these available. (The UI in ME 2/3 might be painful to navigate when you have a lot of armor installed). In this case, the patch instruction would be useful to add/remove lines from BioGame.xml.

The current way to acheive this is to create a small finite number of possible combination and to generate mutually exclusive BioGame.xml files to be installed according to the user's selection.

This might require the creation of a bespoke file patching format/DSL. There's RFC7351 for XML files but it looks terrible and I don't think there's good library support. A more "generic" format might be the diff format that Git and friends use but that might be very unwieldly.

lawliet89 avatar Jul 26 '21 11:07 lawliet89

Sorry for no reply, have been taking a break for some time.

Might be able to leverage the ME3Tweaks ModMaker format for LE3, since they're identical. As for LE1/LE2... that's more difficult, but not impossible. Since it would be against a file already being installed, it'd be more RCW Mod Manager (install vanilla, then apply changes), rather than stack changes, which avoids the issue of conflicts.

Will look into this for the next version of Mod Manager.

Mgamerz avatar Sep 13 '21 20:09 Mgamerz

While this won't make it into Mod Manager 8, it's still on the roadmap, some of the work has been done in the randomizer projects to help unify coalesced handling, which will be useful for these so I don't have to duplicate code for different games.

Mgamerz avatar Mar 10 '22 02:03 Mgamerz

TIL LE uses xmls. Also TIL xml is conceivably different from plain text. https://github.com/Shoobx/xmldiff https://github.com/amouat/diffxml https://github.com/tkorenko/xdiff-c https://stackoverflow.com/questions/7033020/xml-comparison-details-with-xdiff-and-net

Though I wonder if you couldn't just canonicalize them, and then use normal diffing formats/tools. https://superuser.com/questions/79920/how-can-i-diff-two-xml-files/#81036

mirh avatar Mar 10 '22 20:03 mirh