Combining mods

kroym

Chieftain
Joined
Mar 26, 2002
Messages
94
Location
At Work
I'm willing to bet that this question has been addressed before, and if so, please direct me to where that is. Thanks. Believe me, I did do my best to hunt around for an answer, but with the search function disabled for now, that's not too easy...


There are so many great mods popping up that I've finally run into having to put two files, specifically the CvMainInterface.py file, into the custom assets folders that have the same name.

Am I running into having to edit the python code myself to implement both mods, or is there an easier way to deal with this?

Thanks for your help!

kroYM
 
Unfortunately combining mods by hand is the only way to combine mods atm. WinMerge is a good program for merging files, as well as jEDIT for general XML work (If you have Java). Use them both myself.

There are also quite a few "combined mods" that are coming out here the last few days. You could try downloading one of these. I personally am working on a side project of combining mods that I like to play with (Civ4 Realism Mod, Lost Units, etc) Dont know if I'll release it piblically or not though.

Kushan
 
Well, that's pretty much the answer I expected. Guess I'll have to pick and choose which one(s) to include when they conflict.

Thanks!

kroYM
 
Their is a much better way then Hand combining out their, I use a combination of CustomEventManager for Python triggered Events and ModSwitcher for XML additions and alterations.

ModSwitcher is still in its early stages and isn't perfect (i've found a few things it failed to combine properly) but it will achive the equivilent of hours of cut and pasting for you in an instant. As long as no two Mods attempt to add the same element twice or try to alter the same existing element, then it will work. If their is a collision it tells you ware it is.

CustomEventManager was originaly created over at Poly and I created a fully extended version that you can plug python moduels into (assuming the author wrote it well and didn't just insert their code in EventManager). From their I can activate or deactivate any Python Mods by comenting out the call.

To make Merge files with ModSwitcher I cleanup the original mod by striping down to the bone everything thats duplicated content. All the XML files will contain only the Element/s the mod adds or alters along with any new files it adds such as artwork or python scripts. Modswitcher sees turns that into a nice efficient Mergefile of only a few K. I try to make it as modular as possible so for example when I borrowed some buildings from the Mylon Mod I broke them up into seperate files and can select at compile time which ones to include.

Their might ofcorse be some dependency issues, if one Mod references new material added by a second mod then you will get XML errors when Civ launches if you left out something at compile time. This shouldn't be too hard to avoid if people know what their doing.

When Modswitcher compiles my chossen Mods it drops the contents directly into my CustomAssets directory. If I am only using XML based mods or game Interface mods then I am ready to play right now. But if I have included any Python Events then I also need to copy a CvCustomEventManager with the apropriate calls and imports into CustomAssets as well. I just keep a master backup copy of this and add in new calls and imports when I find a new Mod. Ofcorse you need to make shure that your not importing and calling any Mods that you didn't compile with so check to make shure comenting matches your compilation choices.

ModSwitcher can be found at:
http://forums.civfanatics.com/showthread.php?t=140188
And my CustomEventManager at:
http://forums.civfanatics.com/showthread.php?p=3474468#post3474468
 
i really need a step by step on how to merge mods i just don't have the experience editing xml python and so on. like a merging mods for dummies. something a child could understand i guess.
 
Really, the easiest way is to find a simple "diff" program, like Kushan mentioned, and compare both versions to the unmodified file to see what each changed. In theory, a good programmer would have made it absolutely clear which lines are the new ones (especially for something like XML, where you can just stick it all in one or two distinct blocks), but not everyone's that good about it, especially if they tweaked various existing lines in the process.

Setting up for this also has another advantage. Let's say a month from now Firaxis releases a patch that modifies a file you've changed. If you've got a backup of the vanilla XML files stored somewhere, you could then diff the old version to the new one to figure out what lines need to be spliced into your modded version as well. This is MUCH easier than waiting for the original modders to update their work to be patch-friendly.
 
I plan to release a Pack of pre-compiled, de-buged merge files that can be used with Modswitcher and will be easy for people to merge together. It will take some time as theirs a lot of content out their that needs to be tweeked before it will work, and I am working on original Mods of my own. Expect a semi usable mod library some time after Christmas. Subsequent version will add more and more mods to the Library, a Dummy guide should make things virtualy painless as all that you will need to do is select check boxes and comment out lines in a single Python file.
 
lolsen said:
i really need a step by step on how to merge mods i just don't have the experience editing xml python and so on. like a merging mods for dummies. something a child could understand i guess.

Here, here! :D I also don't have any experience in XML, python, etc. Plus, I just don't have the time to get into it and learn them.

Thanks for your input guys. Impaler, I may just check out your suggestions.

kroYM
 
Editing XML isnt to hard to pick up. You can pick up the basics in about a half hour or so if you really pay attention.

Just remember NEVER edit your original copy of a XML/Python file, always make a copy, paste it into your mod folder using the correct file setup (IE, Program Files>Firaxis Games>Sid Meirs Civilization IV, Would be the main file setup to get to the main CIV folder. then you add extentions such as Program Files>Firaxis Games>Sid Meirs Civilization IV>Assets>XML>_____, would get you to the main XML folder. Always make sure your file setup in your mod folder matches this exactly or your mod may not load correctly.)

Try reading some of the tutorials in the Tutorial section. There very good reading, and really help what everything does.

Kushan
 
Back
Top Bottom