Combining two mods, MAYBE more than 2

John Capistran

Chieftain
Joined
Jan 29, 2006
Messages
12
WinMerge can help you out with scanning through XML files. Just make sure the two differed lines are referring to the SAME THING when you move the change from one panel to the other, or you'll have missing features. I think this is because it goes by line number, but I'm not too sure. Anyway, if you find something not in one file that's in the other (and isn't a change to a specific unit or buildign or tech), as in a new thing to the game, minimize WinMerge and open the XML files. I just use JCreator, but there are others you can use. Then, find the part you want to transfer over and copy it, then open the other XML and paste it in somewhere.

But before you do any of this, find the two XML files in the Asset folders you want to merge, for example Civ4UnitInfos of the two mods. The mods can be any mods. So you find all of the XML files, and find all of the ones both mods contain. Any XML that is in both, copy from ONE folder into a temporary folder, maybe on the desktop. Then, do the steps above. Any XML file that is only in one folder, doesn't need to be merged with any other.

So to briefly overview this:
1. Open up the two mods' asset folders.
2. Scan through the folders and note down in notepad any XML filenames you find in BOTH folders.
3. Copy the XMLs you listed out of ONE folder into a temporary folder on your desktop.
4. Go through the XMLs in the temporary folder on the desktop and use WinMerge to compare them to the XMLs with the same names in the other Asset folder, you DIDN'T copy from.
5. Anything you find that refers to the SAME, SINGLE component of the game, for example a unit, building, tech, improvement, etc., find which change you want reflected in your mix.
6. If the change you want is in the XML in the temporary folder on the desktop, don't change anything and move on. If it's in the other XML, copy the section over, and move on.
7. Do this to all changes and XML files that you named in notepad.
8. Sort the XMLs in the temporary folder into the proper structure, according to the mod they're from.
9. Create the folders you see in the mod directories in the temporary folder, and copy the contents in.
10. Copy over the configuration (.ini) file, and rename.
11. Rename any XMLs with the old mod names.
12. Playtest!
13. BEFORE YOU PUBLISH, ASK THE ORIGINAL MOD CREATOR'S PERMISSION, THEN MAKE A README LISTING THE MODS, VERSION, AND AUTHOR, AND LISTING YOUR GOALS.
14. Publish if you want. 13 only applies if you want to publish

Works for me MOST of the time... then again I'm not too experienced in XML modding so anyone with more experience, feel free to comment or revise my guide :D

NOTE: More than 2 mods gets exponentially more complex, so always make sure you used that temp folder and are copying changes into the temp folder XMLs. If you make a mistake, WinMerge helpfully makes a backup. To use it, look at the .bak file's name, and delete the file with the same name, then rename the .bak and remove the .bak extension. :D
 
That's kinda what you use WinMerge for in my little guide; combining XML with little experience on your side. Before that other thing gets done or if it doesn't have full modding capabilities.
 
Back
Top Bottom