This is a short guide on how I would go about merging two conflicting mods into one. You can also use this as a guide on how to modify only one mod.
Merging two large mods is honestly most of the time not worth the effort. There could potentially be hundreds of conflicts to resolve, and without understanding how the mods work, it might be too complicated. Don’t bother.
Open Asset Manager, set it up properly, for that check the official Modding Guide, then click Tools → Extract Game Files… – this might take a while.
Get the attached archive Scripts.zip and extract the files into each mods folder (where the database and resources folders are).
Use Notepad++. You should already be using it anyway. If you check Plugins → Plugins Admin…, you can search there for a comparison tool called … Compare – install it. Now if you have two files open, and then click Plugins → Compare → Compare, you have a visual comparison line by line of both files. Use this method to find any conflicts in simple .txt or .dbr files.
Merging database:
- Extract both databases by running Extract database.bat.
- Open both database folders into separate file explorer windows and go through each folder. If there are no conflicts, copy the files over to the mod you want to merge into.
- If there is a conflict, open both files in Notepad++. Compare them using the comparison tool and try to resolve these conflicts. Some conflicts require you to check the files referenced and resolve the conflict there instead. Example: onAddToWorld,gd.mod.spawnItem, and onAddToWorld,gd.anotherMod.playSound, are conflicts in male.dbr, you could here simply call the function of one mod in the function of the other mod (by modifying mod.lua), leaving the line in question as it is.
- You done? Now open the Asset Manager, select the mod you want to merge into, optionally open the merged files you changed and check if everything is fine, and click the Database tab → Right-click [mod]/database → Build.
If you want to only modify one mod (e.g. increasing the devotion cap), then do not extract the database, but instead click Database → Import records… in the Asset Manager, find and add the record, modify it, and then right-click the record → Build.
Merging resources:
- If both mods have an archive (.arc extension) with the same name, for example Scripts.arc or Text_EN.arc, extract them both by running the Extract archive.bat and typing their file name. Copy all other non-conflicting archives (which do not prompt a “Do you want to overwrite”) to the mod you want to merge into.
- Now check if there are any conflicts and try to resolve them. Example: tags_items.txt could be used by both mods, so try to combine them into one. Another common example is the main.lua file from Scripts.arc.
- After resolving all conflicts, copy all files over to the mod you want to merge into.
- Run the Update archive.bat for each merged archive.
Mods may use modified templates (for e.g. expanded skill trees) – if they are not provided in the download, then you can’t modify the files.
Maps.arc can not be merged.
Scripts.zip (100.9 KB)