CommanderZ
Warlord
I'm working on my third ModBuddy extension, this time targeted at modpack makers.
The extension is supposed to detect and help solve conflicts between mods.
I already have some code, but before I start writing the core functionality, I have to make sure what the extension is actually supposed to do (I have never made a modpack).
How do I imagine the merging process:
So what input do I need? Of course any (smart and useful) suggestions are more than welcome.
But more than that I need advice about what kinds of conflicts between mods can happen and how to solve them. I know about these:
The extension is supposed to detect and help solve conflicts between mods.
I already have some code, but before I start writing the core functionality, I have to make sure what the extension is actually supposed to do (I have never made a modpack).
How do I imagine the merging process:
- Create/open the project the target mod will be merged INTO in the ModBuddy.
- Click the "Add Merged Mod" in the "Tools" menu.
- The extension asks to locate the target *.modinfo file.
- List of mod files is loaded from the modinfo file. The extension compares this list with files already present in the mod.
- Another dialog box similar to TortoiseSVN's UPDATE window pops up. The window contains a list of all the files present in the target mod. Each file has one of these statuses:
- Added - the file is not present in currently opened mod yet, the file will be added to the mod as it is in the target mod.
- Merged - the file is present in both mods, but the their changes relative to the vanilla file version do not conflict with each other and can be automatically merged.
- Conflicted - the file is present in both mods and their changes relative to the vanilla file version are not compatible. Clicking on this file will open some (most likely external, possibly TortoiseMerge) merging tool, which will assist in resolving the conflict manually.
- Renamed - the file with the same name is present in both mods, but every file contains something different (irrelevant to the other file), so the newer file has to be renamed and all references to it updated.
No changes are written until the next step. - Click the "Merge" button and all the changes are written into the opened project.
So what input do I need? Of course any (smart and useful) suggestions are more than welcome.
But more than that I need advice about what kinds of conflicts between mods can happen and how to solve them. I know about these:
- File replacement conflict - solving these is the primary focus of this extension. This kind of conflict can be solved by simply text-wise merging the two files. But there is one thing I'm not sure about: do the replaced files have to be in location (folder) precisely identical to the original one in Assets folder or do they have to have the same name only?
- File name conflict - this happens when both mods contain "FunnyPicture.dds", but with different contents. One of these has to be renamed and all references to it updated.
- Database conflict - this happens when both mods change value of one row in the database. I don't see how I could detect these without actually executing all the queries on the game database.
- DLL conflict (in future) - solving these will be impossible without access to the modded DLL source code. The extension can merely inform the user, that there is and DLL conflict.