Mod switcher

Wait a seccond, does this app combine python files/custom art or is it XML only?

I don't see how combining custom pyton files could ever end well.
 
Creating new mod went ok, i understood and implemented the assets part of your explanation.

Now loading the combi-mod in CIV4 gave me a lot of XML load errors. The lost units mod and the Netherlands mod in total give 14 new units, each new unit generated a XML error. It clearly has difficluty with new units.

The new civ was playable so no problems there.


is there a quick fix? or should i forget about new units...:sad:

But we're clearly getting a great enhancement to the game with this prog!!! :goodjob:

EDIT: Got some error specs (Win.)

First error: failed loading xml file XML\Units/CIV4UnitInfos.xml. [FXml.cpp:133] Error parsing XML file reason: Element is incomplete according to the DTD/Schema. line 159,83

then another err about the unitinfos file

From then on, all new units give an error as in this example:
Tag:UNIT_AMERICAN_NAVY_SEAL in info class was incorrect (current XML file is: Civilizations/CIV4CivilizationInfos.xml
 
GenericKen: It does combine python files, as long as two mods don't modify the same lines.

Roetghoer: Adding new units and civilizations should be ok. I've successfully combined FinMod, Netherlands, Carthage, Celts and Turks. Could you put the failing file somewhere I can download it from and see if I can reproduce the same result?
 
I tried it again today but it stilll didn't work.
So I renewed all the mods to current versions. Still using Lost Units mod and the netherlands.

Now the modder doesn't give me XML errors anymore BUT the civ isn't playable anymore.

Both mods are available on this site.

I'm quite certain I installed gtkmm the right way but to be sure i'll redo this as well.

@tdb: Which file would be usefull? the entire combimod? or just the unitinfos.xml


EDIT:
refreshed EVERYTHING including game, mods, gtkmm, ALL! (Probably unnecesary BTW)
Messed with folder settings.
Settings are now as follows:
1.E:\Program Files\Firaxis Games\Sid Meier's Civilization 4
2.C:\Documents and Settings\Rutger\My Documents\My Games\Sid Meier's Civilization 4\MODS
3.E:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Mods\MyCombinationMod\Assets

! Now the modder produces the (much desired at this time) conflict warning !
Conflict between mods 'Lost Units' and 'Netherlands' in file 'XML\art\CIV4ArtDefines_Unit.xml'

I feel like we're getting somewhere, I WAS able to combine the FexFX (large-long worlds) and Netherlands mod. All other (Dual) combo's with Netherlands we're conflicting

If you feel the Prog is mature enough we should experiment with multiple mods and give results in a sole-purpose 'Conflicts Thread'. This would, hopefully, give modders some more insight into conflicting XML's etc.
 
OK First of all; it looks like i'm bashing this prog, i'm NOT i think this is THE missing link and think every modder should be able to see where his/her mod conflicts with other productions! This prog makes things happen :goodjob:

But at the moment I'm a bit puzzled by TDB's proclamation of the succesful combo of turks carthage and netherlands as they all give conflicts on my modder. I don't seem to be able to combine any civs at all. (Conflict between mods 'Netherlands' and 'Jecrell [Carthage]' in file 'XML\Art\CIV4ArtDefines_Civilization.xml')
 
It doesn't look to me like you're bashing my product. It looks like you're experiencing problems which are due to either a bug in the program or incomplete documentation. It's perfectly acceptable to complain about either of those things, especially with detailed input as yours.

Now that I think of it, that five-civ combine was before I implemented the conflict checker... Now I need to remove Netherlands to get the other four combined.

I did get Netherlands (version 1.06) and Carthage (1.2) combined though. Which versions of those did you have? I'd like to see the .Civ4Mod files produced by the program from those two mods, if you can put them somewhere.

As for the Conflicts thread you suggested... It's a good idea, but I think we can't fully trust this program just yet. Manual verification is still needed as the program may contain bugs. Of course, there are some clear cases... Like Netherlands and Turks both containing the file Art/Interface/Buttons/actions_builds_leaderheads_specialists_atlas.dds. The graphics files are the hardest ones to combine (although possible, and I intend to do that one day) so modifying them should be avoided at all costs, instead adding new files and referencing those from the XML.
 
(quick) Using Carthage 1.3 and Netherlands 1.06 No Match! (Leaderhead infos)

BTW i don't have a place to store files publicly but if u PM an email adres i'll try to send some conflicting modfiles. Or u could point me to a free public host
 
I'll check myself with that updated version of Carthage as soon as I can. If I still don't get the error here, I'll try to figure out some place where you can upload the files.
 
This program ROCKS!!

I have been merging mods left and right (it seems I have had a few problems if the Mod contains Graphics files but this is rather easy to do manualy so its no big deal). I have been posting links to you over at Poly and trying to get people to adopt moding standards that will make their mods more compatable and mergable.

Mainly were looking at having a CvCustomEventManager.py file that overrides every event with a call to its parent the normal EventManager. Moders simply insert their mods as a single line call under the apropriate events. The original intent was to make manual cut and pasting easier but it also works with your merging program. If we can get moders to use a common template of Custom python files with all the moding consisting of simple additions to thouse templates and their extra files then we can virtualy guarantee no Python scripting will trigger a collison or logic problem. People could install the template directly to their Civ4 files as they do nothing to the game on their own, when you compile merge files all your doing is getting the additions to the template which will be a few imports and a few calls. Pre-complied merge files could then be downloaded and plugged in almost effortlessly by a person with the template installed.

Package the whole thing together with some good Documentation and Tutorials and we could realy give the Mod fans and the Mod makers a great interface tool. Im working on the templates as we speak and will be singing your praise at Poly, keepup the good work on your program I cant wait for next version. One sugjestion, could the "Description" field perhaps display the first line of the mods readme file so authors can elaborate on what their mod dose. :goodjob:
 
Standarization! that should speak for itself. I think Take2 and firaxis should have anticipated on this 'problem/inconvenience' beforehand by making a standard on their own or at least facilitate in the developement of such a service.

BTW Love your quote Impaler :goodjob: Dune fan myself
 
Sorry for the lack of updates on this front. I've had a load of other things to do. Rest assured though, I don't intend to drop this project anytime soon.

Roetghoer: Was your attempt after the 1.09 patch? I noticed that it changed the iLimitedWarPowerRatio of about every leaderhead. Consequently, two mods containing leaderheads will always conflict if they were made for 1.00. Unfortunately, it's practically impossible for my program to take this kind of things into account. One solution for this would be that modders start distributing their mods in the Civ4Mod format. That way the distributed mods will only contain the actual changes and conflicts due to game patches will be reduced to a minimum.

Impaler: I'm planning to parse the mod name and description from the ini file. And yeah, graphics files are a problem... I might figure out something for them, but the best solution would be if modders would create new graphics files instead of modifying existing ones. Thanks for the supporting comment too! :)
 
The mods are made against 1.00. That means they contain XML files that are copied from 1.00. Now, as the 1.09 patch changed some things, the data files in the mods no longer match and my program detects the changes.

What you would need to do is create the Civ4Mod files using 1.00, then patch the game, and apply the mods.
 
I've been trying to create a full CustomEventManager shell that can be installed to the users Python directy and used as an atachment point for a whole variety of Mods which add new Python based Events to the game.

The idea is for Mods makers to insert their mod onto the template with only a few lines of additiona code. Modswitcher should then be able to merge these together. But I am getting collison warnings presumable because the added lines are in the same locations in the files. I would hope that modswitcher could deal with 2 seperate files trying to add a single line in the same spot in the original file. For example...

## Sid Meier's Civilization 4
## Copyright Firaxis Games 2005

from CvPythonExtensions import *
import CvUtil
import CvEventManager
import sys
#INSERT IMPORTS
import someplayermademod

And another mod using the same template instead adding

## Sid Meier's Civilization 4
## Copyright Firaxis Games 2005

from CvPythonExtensions import *
import CvUtil
import CvEventManager
import sys
#INSERT IMPORTS
import someothermod


I figure as long as these are simple one line inserts to an otherwise identical file they should be mergable. Am I doing something wrong? Dose modswitcher not have this ability? Is their some kind of work around that could be used? If its just an issue of which line should come first then lets just default to alphabetical order, these single lines of Mod call should function in any order. Here are the files and the original they are derived from.

CvCustomEventManager is an empty shell that wraps around EventManager to alow Mods to plugin to all the events in the game without needing to touch the original EventManager. It can be placed into your Civ4/Assets/Python directory without altering the game in any way. CvEventInterface overwrites the file of the same name under Assets/Python/EntryPoints. It performs the wrap and will not effect the game either (as it simply wraps a shell that dose nothing), but do be shure to back up your original files anyway. With both of these in Civ4 directory Mod switcher will see the Mods that use the template as additions to this file rather then a new file. The TechConquest and Realfor mods are 2 popular mods that use Python Event triggers and were released with CustomEventManagers of their own. I have altered them to use my extended EventManager. They should compile and run correctly if you have the first 2 files properly instaled. The merging process gives a collision in CvCustomEventManager though.
 
this is a holy idea tdb.:goodjob:

I have been wanting to combine the Realism mod along with the Composite mod by exeter.

i cannot make it work, probably because my computer literacy only extends to headbutting my keyboard.:cry:

I would just like it to be a simple thingy, where upon you could cut and paste mods into this umbrella structure, it would work great for the digital dunces of the world, like myself.:crazyeye:
 
I think an option to skip Mod file creation or do it in one big batch and proceed strait into final merging,is what he is looking for, just drop ready to play mods into a Directory and compile the whole thing into a ready to play mod. It shouldn't be very complex to do, have a 4th file pathway under preferences to a directory of Mods then just check each sub-directorys name to see if it has a matching merge file, if not compile it and when everything is ready merge them.

On another note I have been doing some brainstorming on the Tecnique you use to record XML changes, the heirarchical nature is definatly more efficient. I began to wonder if similar gains could be seen if Python was also interprited in a similar fashion. For python the number of indents on a line determine the heirarchy so it can isolate changes to a particular function or loop within a function.

On a second note I have been wishing for a runtime Collision resolution ability, even if its as primitive as "MOD A over-ride" "MOD B over-ride" buttons poping up repetedly untill all the collisions are resolved. Eventualy some kind of slick interface cound be developed with lots of options and maybe even textfields you can manualy cut/paste/type out the resolution to your hearts content.

On a third note I have found that Mod switcher will generate a collision if 2 mods try to add identical content. I took a simple mod and made 2 identical merge files by compiling it twice and trying to merge them togeter. They imediatly colided on the art file each of them tries to add to the game even though they both obviosly encode the same file. Their should be a check involved when 2 Mods attempt to modify something, if both are essentialy in agreement on the modification or try to add identical content then a collishion dose not need to be thrown. Many popular mods borrow and extend the content of other mods so these types of false alarm conflicts will be common and very inconvenient for people if this isn't adressed.

Lastly I have noticed an erronious result on a Mod which adds sub-elements in an XML file, several additional lines and 2 levels of nesting are added to an element which is normaly empty in the UnitInfos document. The merge file is picking up and making a record of the changes but the output Mod lacks is only adding a closing tag.

The original file has simply
<ProductionModifiers/>

I modify this too this (its fully functional in the game so its not a formating problem)
<BonusProductionModifiers>
<BonusProductionModifier>
<BonusType>BONUS_IRON</BonusType>
<iProductonModifier>100</iProductonModifier>
</BonusProductionModifier>
</BonusProductionModifiers>

giving this block of data inthe merge file
BonusProductionModifiers&gt;
&lt;BonusProductionModifier&gt;
&lt;BonusType&gt;BONUS_IRON&lt;/BonusType&gt;
&lt;iProductonModifier&gt;100&lt;/iProductonModifier&gt;
&lt;/BonusProductionModifier&gt;

And when I compile I only see

<BonusProductionModifiers>
</BonusProductionModifiers>

Try it yourself and see if the same thing happens too you
 
can i get a hold of a civ4modder for dummies? ireally need a step by step from the beginning. i've never edited python or anything really, i've just edited my first config file like yesterday.
 
Impaler[WrG] said:
I think an option to skip Mod file creation or do it in one big batch and proceed strait into final merging,is what he is looking for, just drop ready to play mods into a Directory and compile the whole thing into a ready to play mod. It shouldn't be very complex to do, have a 4th file pathway under preferences to a directory of Mods then just check each sub-directorys name to see if it has a matching merge file, if not compile it and when everything is ready merge them.

I'll do something to that end in a future version.

Impaler[WrG] said:
On another note I have been doing some brainstorming on the Tecnique you use to record XML changes, the heirarchical nature is definatly more efficient. I began to wonder if similar gains could be seen if Python was also interprited in a similar fashion. For python the number of indents on a line determine the heirarchy so it can isolate changes to a particular function or loop within a function.

That should be possible, at least on the function level. Parts of functions get more tricky.

Impaler[WrG] said:
On a second note I have been wishing for a runtime Collision resolution ability, even if its as primitive as "MOD A over-ride" "MOD B over-ride" buttons poping up repetedly untill all the collisions are resolved. Eventualy some kind of slick interface cound be developed with lots of options and maybe even textfields you can manualy cut/paste/type out the resolution to your hearts content.

Good idea. I'll figure out some way to do it.

Impaler[WrG] said:
On a third note I have found that Mod switcher will generate a collision if 2 mods try to add identical content. I took a simple mod and made 2 identical merge files by compiling it twice and trying to merge them togeter. They imediatly colided on the art file each of them tries to add to the game even though they both obviosly encode the same file. Their should be a check involved when 2 Mods attempt to modify something, if both are essentialy in agreement on the modification or try to add identical content then a collishion dose not need to be thrown. Many popular mods borrow and extend the content of other mods so these types of false alarm conflicts will be common and very inconvenient for people if this isn't adressed.

I'll see if I can do something to this too...

Impaler[WrG] said:
Lastly I have noticed an erronious result on a Mod which adds sub-elements in an XML file, several additional lines and 2 levels of nesting are added to an element which is normaly empty in the UnitInfos document. The merge file is picking up and making a record of the changes but the output Mod lacks is only adding a closing tag.

I hope to have fixed this in the version I'll post in a few minutes. (Edit: 3am. I'm pretty tired. If you want further explanations, ask and I'll explain when I have the energy for it)
 
lolsen said:
can i get a hold of a civ4modder for dummies? ireally need a step by step from the beginning. i've never edited python or anything really, i've just edited my first config file like yesterday.

I added such a thing in the first post. I hope it's clear enough.
 
Back
Top Bottom