Open Madouura opened 2 years ago
For binary or otherwise non-text files, perhaps something like xdelta for diff and merging.
I'm not sure if I want to do this at runtime inside modengine2.dll, but this is something I definitely want to be part of at least the pre-launch stage (either part of the GUI or launcher).
xdelta
was my preferred approach for distributing mod updates, though I'm not sure it'd help with merging here (i.e., adding a new entry to a binary file is going to break all subsequent deltas from other mods). I expect for all the game data types we want to support we'll have to write a reader/writer and diff producer.
There's quite a few data formats to handle but deep-merging archives and PARAM files seems like a good start. Getting the infrastructure in place to support "mod merging" for the end-user is likely the biggest challenge, though.
How about using DSMapStudio's exported param csv files for now? It would make different param mods compatible.
For mods that affect the same files, while loading both, check the difference and if they don't overwrite the same lines/data, diff the mods and merge them either into the first listed, or into a copy of the original file. Of course, if there are conflicts, prefer the first listed mod instead and perhaps show a warning.