Modules load order

Rwn

King
Joined
Mar 12, 2014
Messages
711
Hi everyone,

I've had some time recently to play C2C and wanted to try tweaking some building names. My idea was, instead of searching and modifying each relevant xml file, to put the "new" version in a dedicated xml file that would be loaded last, but I can't find a way to do that.

I've tried to put my file in the "My_Mods" folder in Assets\Modules and puting "My_Mods" at the end of MLF_CIV4ModularLoadingControls.xml. However, that doesn't seem to work, a few entries are overriden but not all; the curious thing is that sometimes the override works on entries that are in the same module folder as other that are not overriden. For example, with a given Gametext file in My_Mods, I can override the jade death mask carver's name in Sargon\Wonders\Jade_Mask\Jade_Mask_CIV4GameText.xml, but not the other jade carvers that are in Sargon\Wonders\Jade_Mask\FCulture_CIV4GameText.xml (by the way, those buildings are ordinary buildings, not wonders, don't know whether that's a mistake).

I've tried moving the file in My_Mods at the beginning of MLF_CIV4ModularLoadingControls.xml just in case, deleted the cache regularly, but that did not work either. Putting the file elsewhere (in another module folder, in \XML\Text ...) yields very random results (though surprisingly most entries are correctly overriden if placed in \XML\Text, I would have thought the files there would be loaded before the ones in Modules), so I really think that's a loading order issue.

Does anyone has some guidance on the load order/override order of the files?

Thanks !
 
That is what the MLF files in the folders do. If you put your tweaks in say folder Rwn in Assets/Modules then edit the file MLF_CIV4ModularLoadingControls.XML

Then put your folder name in just before the one called zMoviesFix which must be last at the moment. eg
Code:
				<Module>
					<Directory>Boonkie</Directory>
					<bLoad>0</bLoad>
				</Module>
[B]				<Module>
					<Directory>Rwn</Directory>
					<bLoad>1</bLoad>
				</Module>
[/B]				<Module>
					<Directory>zMovieFix</Directory>
					<bLoad>1</bLoad>
				</Module>
 
That is what the MLF files in the folders do. If you put your tweaks in say folder Rwn in Assets/Modules then edit the file MLF_CIV4ModularLoadingControls.XML

Then put your folder name in just before the one called zMoviesFix which must be last at the moment. eg
Code:
				<Module>
					<Directory>Boonkie</Directory>
					<bLoad>0</bLoad>
				</Module>
[B]				<Module>
					<Directory>Rwn</Directory>
					<bLoad>1</bLoad>
				</Module>
[/B]				<Module>
					<Directory>zMovieFix</Directory>
					<bLoad>1</bLoad>
				</Module>

Yes, this is what I did (with the My_Mods folder), but it doesn't work, many entries aren't correctly overriden (including the strange jade mask example)...
 
I did introduce the My_Mods and My_Mods (unloaded) folders for just this purpose and as a way for others to release optional mods but no one understood that at the time and I need to go back to it to make it work again.

If you move the My_Mods reference in the file Assets/Modules/MLF_CIV4ModularLoadingControls.XML from where it is to just before the zMovieFix then it will most likely work.
 
If you move the My_Mods reference in the file Assets/Modules/MLF_CIV4ModularLoadingControls.XML from where it is to just before the zMovieFix then it will most likely work.

No, as stated before, whether I put it last, first or just before zMovieFix in MLF_CIV4ModularLoadingControls.xml, it doesn't work, there are just a few entries that are overwritten. I even tried to put my file directly in the zMovieFix folder but that doesn't help.

If you or someone else want to try, here's the file (it basically adds a number at the beginning of the name of the non-wonder buildings with a cost > 0 to sort them out chronologically); you can easily check in the Civilopedia/Building chapter that most names were not changed.

View attachment ChronologicalBuildings_CIV4GameText.zip
 
I put it in the zMoviesFix folder. Changed the Civ4GameText entry to
Code:
<Civ4GameText xmlns="http://www.firaxis.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.firaxis.com ../../Xml/Schema/Civ4Gametext.xsd">
and it worked fine for me.

edit Is the number is based on the X position in the tech tree? If so we may be able to provide the number automatically if it proves useful. Where do you use it?
 
You just replaced the "XML" by a lowercase "Xml"?

Anyway, it's still not working for me :( Thanks for your test, now my only conclusion is that I'm cursed somehow...


edit Is the number is based on the X position in the tech tree? If so we may be able to provide the number automatically if it proves useful. Where do you use it?

Yes, it's the iGridX of the latest tech unlocking it. I'm not sure it's that useful to implement to be honest, it was more a first test to try out some further things (like a custom "code" to put together the (mostly) +production buildings, then the (mostly) +gold buildings, etc. on the city building screen, without having to select a new filter each time - don't know if that's very clear :p)
 
Looking at it more closely, it is not working fully for me either.:(

However I have noticed that there are some other problems with the text. A couple of buildings are not getting their text name even though, as far as I can see, the text names are there and correct.

Yes, it's the iGridX of the latest tech unlocking it. I'm not sure it's that useful to implement to be honest, it was more a first test to try out some further things (like a custom "code" to put together the (mostly) +production buildings, then the (mostly) +gold buildings, etc. on the city building screen, without having to select a new filter each time - don't know if that's very clear :p)

There are already filters for production and gold on the buildings and you can sort them there also.
 
Looking at it more closely, it is not working fully for me either.:(

However I have noticed that there are some other problems with the text. A couple of buildings are not getting their text name even though, as far as I can see, the text names are there and correct.

I'm not sure whether I should be disappointed or happy that you have the same bug...

There are already filters for production and gold on the buildings and you can sort them there also.

Yeah, that's what I use, but I intended to make something more "direct" to use, such as all the production buildings I usually build first in the city together in order, etc. Anyway, that's no big deal, just a bit strange that it doesn't work.
 
I have 2 remembered queues that I use for the first and second builds in all my cities. I use the Civ IV method of populating them. IE I make the queue then pressed cnrl-1 to put the queue in memory. Then just use the number and it puts the valid items in the build queue for the new city. This method only allows you to add valid items to the queue which is a problem with some building chains.

C2C also has a method of storing a number of sets of buildings (and units) to add to the queue but I have never understood how to get it to work.
 
By the way, I see you've merged many files in the Modules subfolders since last time I checked around a year ago, if you'd like some help with that (like I did with the BonusInfos files last time) just say the word. This would probably help sorting things out with the load order...

I was working on the various animals and since I was doing 4-5 things with them I split them out. I am now merging them together. So it is best if you don't help there but I have also merged in to core the contents of the Praetyre folder. That means that we should be able to merge in Faustmouse and Sargon without problems.

If you are willing doing the contents of those folders (Faustmouse and Sargon) would help. We do have to be careful of the order we merge stuff. Both those two are loaded before Hydro's so will be overwritten by Hydro's XML. Merging them in will make merging Hydro's easier. Although you need to check that each object is not in any of the folders loaded before they are. If they aren't then they can be loaded into core, otherwise they need to stay where they are with some notes somewhere saying what other modules have them.

As far as I know both Faustmouse and Sargon contain new stuff so there should not be any conflict but it needs to be checked.


I should have looked at the folders first:blush:. They need some work to make them the standard structure before they can be merged. This is mostly to do with the art and the folders they are in.
 
I should have looked at the folders first:blush:. They need some work to make them the standard structure before they can be merged. This is mostly to do with the art and the folders they are in.

You mean the schema locations and the .dds location in Buildings_CIV4ArtDefines_Building.xml? That shouldn't be too hard to change with the proper new locations (in Assets/art folder for the .dds I assume?).

Anyway, here's the list of modules, sorted by their position in MLF_CIV4ModularLoadingControls.xml (guess it *should* be their load order...):

Bad_Karma -> Not loaded (only a few stuff, some compressed), could be moved for clarity in My_Mods (unloaded)
Custom Leaderheads -> A lot of leaders files in different subfolders. Probably no risk of conflict. Could at least be merged together in one file per xml type.
Custom_Civilizations -> Same.
OrionsMods -> Fighter plane unit, some stuff related to health (Great doctor, healing units, wonders...), Immigrant unit, Mines unit, a few wonders (Ark of the Covenant, Library Of Nineveh, National Archives, Strategic Grain Reserve). Could probably all be merged in core?
DancingHoskuld -> I assume you know what's in there and what you're working on...
Faustmouse -> I assume LunarColonyDemo is still under construction; what about the rest ? (Buildings, Captives)
GreatPeople -> Texts and images for a lot of great people (only 3 files including a schema). Probably no risk of conflict?
Sargon -> Buildings (including mostly "achievement effets"; already merged in one file), Heroes (merged in one file, but the art is spread in many subfolders), Wonders (split in many subfolders). At least all the Wonders could be merged in one file ; I could also edit the Heroes and Wonders files to point out at one subfolder containing all the art.
Wonders -> empty; to be deleted?
Units -> seems to be mainly national units (no art). Probably no risk of conflict?
Promotions -> additional promotions spread in a few subfolders. Probably no risk of conflict?
Resources -> "NewResources" subfolder only has schemas, could probably be deleted? "Tradegoods" subfolder has some files related to the wine club buildings, can be merged so the whole Resources modules can be removed?
Buildings -> Only contains files for the UN mission building, as well as some art which seems unrelated to UN mission (could be removed apart from the two actually used for UN mission?). Could the UN mission building be merged in core?
NotSoGood -> contains an "Animal placing" subfolder, not sure what it does...
Tsentom1 -> 3 wonders (Ishtar, Temple of the Great Jaguar, Topkapi Palace), could probably be merged without risk of conflict?
Vokarya -> Many wonders; already merged in a few files. Probably no risk of conflict? No art.
Platyping -> Many buildings in one file + 4 subfolders related to wonders (GreatZimbabwe, Helsinki, Reichstag, TheMotherlandCalls). No art.
Static -> Mostly art for leaders, as well as the corresponding ArtDefine xml file. Probably no risk of conflict?
ls612 -> 3 separate subfolders containing CultureUnits, Heroes and Traits. Don't know about that.
StrategyOnly -> New handicap file, some heroes and events (in many subfolders). Don't know about that.
ori -> New events, with art files. Probably no risk of conflict?
Hydro -> Everything is already merged in a few files; a lot of things to be careful with if trying to merge it in core to avoid conflicts (probably best kept for later)
Custom_Religions -> religion files spread in separate subfolders (one for each religion). Does not seem to contain art. If this module is not optional, the files could at least be merged together. OTOH I would not be surprised if there were risks of conflicts if they were to be merge in core.
Animals -> You're probably the animal specialist ;)
Alt_Timelines -> If this is still intended to be optional, would be best kept in a dedicated module. Maybe for the sake of clarity it could be called something like "Optional modules" as it may not contain only stuff related to alt timelines? (I see there are Lara Croft files there...)
NomadDemo -> Not loaded, could be moved for clarity in "My_Mods (unloaded)" or in a "Work in progress" module folder?
The_J -> A few files on different topics (espionage, promotions...). Would probably be best if merged in core...
CIVPlayer8 -> "Advanced Civics" subfolders only contains Gametext files (could be put directly in XML/Text?). "Buildings" subfolders contains a few files with a lot of new buildings, should check first if there are risks of conflicts.
My_Mods -> Obviously empty by default. I'd put it last in MLF_CIV4ModularLoadingControls.xml (or before zMovieFix) so any "custom" mod is applied last.
My_Mods (unloaded) -> Not loaded; works well as is.
Natural_Wonders -> Probably no risk of conflict if merged?
Thunderbrd -> Appears in MLF_CIV4ModularLoadingControls.xml but not in the Modules folder, could be removed from MLF_CIV4ModularLoadingControls.xml?
MrAzure -> Many different files with new buildings, etc. Should be checked for conflict first I guess...
Yudishtira -> Some new units. Don't know about potential conflicts.
Boonkie -> Empty (and not loaded), can be deleted?
zMovieFix -> No idea what it does but by the name I guess it should be kept as is...


What I'd think best is to start from the first one in the load order and keep for last the ones that are likely to create conflicts and test each time something is merged if everything is alright. Meaning, first, moving Bad_Karma and merging together the files in Custom Leaderheads (taking care of the art path).

Does that sounds good?
 
Some of these Modules are also linked with Python files and merging can create bugs.
And please leave Custom Civilizations in this shape because its structure is used in my CivMegapack modmod.
 
Some of these Modules are also linked with Python files and merging can create bugs.

Some python files refers to files in the modules folders with an absolute path? :O

And please leave Custom Civilizations in this shape because its structure is used in my CivMegapack modmod.

Sure, no problem!
By the way, "Custom Civilizations" contains a "Cultures" subfolder which is not loaded. Not sure what it corresponds to (looks like some "nomad" civilizations in folders bearing some of the mod dev's names, is it part of the future "nomad" mechanism?).
 
XML
We use the World of Civilization XML standard (WoC) for loading XML which allows us to update and replace objects using a simple update master/transaction system that is standard for everything from Banking to well almost everything actually. The method is standard, the coding of the method is not :D. The order in the MLF identifies which order the updates are applied. The core is loaded and then the updates (new stuff and changes to existing stuff) are then applied.

Hydro used the "force replace" option a lot. Therefor if the object is in his folder any work done by others loaded before his is loaded is deleted or in effect ignored.

There are three reasons for the different folders in the Modules folder.
  1. Isolate stuff being worked on by a particular modder - actively or otherwise

  2. Optional Modules ie stuff the player may choose to have in or out of the game using the MLF (Modular Loading Files)

  3. Recognise the source of components. IE stuff by modders not part of the team eg The_J, Platyping. It makes it easier to keep those bits up to date if the originator changes stuff and we agree with the changes.

I have started indicating which bits are optional in the C2C Options document post 6.​

Python
The only Python that references paths is the stuff which is supposed to control the music that is played. That bit of code stopped working awhile back. All the rest gets at the "XML" via the dll ie it accesses the information that the dll has created from the XML.

We are using the Modular Python system that comes with BUG. Again this allows the player to turn on and off modules by editing an XML file. While the editing is trivial knowing which bits are optional is not. It needs to be documented.​
 
Having said all that there is a forth reason for having a module in the XML - future projects that many people will be working on. They are places for prototypes and ideas that we want to look at. Note the reason for a Modules folder was originally for everything in there to be optional.

C2C Modder folders are:-
Boonkie
(actually me at the moment adding in stuff suggested by Boonkie. I recently moved the only released bit into the Megafauna_Units folder where it is optional.​
DancingHoskuld
My stuff. I am trying to move some of this stuff into core. The Subdued Animals, Entertainer and TradeMerchant objects are all ready to be merged. The last time I tried I had trouble with the loosing the Missions.

Captives is almost ready to be moved also. It needs the concepts expanded to include prisoners of war.

Espionage is a start of separating Scotland Yard out from Espionage and into Crime Fighting, and making the Great Spy more relevant to espionage not crime. It is only at the start of development. It needs to be linked to the "No Espionage" game option but I can't get that option to work or "stick"

ExtraDiplomacy and Sevo_FacesOfGod are concepts that I am working on​

Faustmouse
Mostly new stuff but includes updates to my Captives stuff and a prototype.

Faustmouse says it can be merged in. I have already standardised the location and structure of the art folder and changed the XML to reflect this.​

Sargon
Mostly new stuff - still need to check but art does need restructuring before it can be merged.​

NotSoGood
This is the Great Farmer stuff. Every time we change resources this needs updating also. Probably should not be merged but could have its folder renamed.​

Vokarya
Many of the wonders are not complete needing new XML tags or python to complete them. Some of the required XML tags may now be available. I'll see if I can find a link to what needs completing as Vokarya documented what he intended but could not do. I would suggest leaving the uncompleted ones here and only merging in the completed ones as a reminder.

Otherwise it can be merged.​

ls612
CultureUnits and Heroes Can probably be merged (with caveat about Hydro's module)

Traits - not so sure about. This is his version and there are other versions in C2C. They need to be worked on or combined or thrown out. I am not sure which​

StrategyOnly
Heroes can probably be merged.

New handicap file should probably be in a separate optional folder at the higher level, not sure

events (in many subfolders) these are "new" events some have reported errors that need looking at. IE are a work in progress.​

ori Events - turns out there may be some conflicts but someone should go throw and merge them sorting out the conflicts

Hydro
don't want to think about this but it needs to be done. Should not be attempted until we have looked at everything loaded before first.
OR check each object in these and if they have the force overwrite option set to on remove any references in core or modules loaded earlier and then remove the force overwrite. Then and only then think of merging this and modules loaded later.​

CIVPlayer8 could be merged (with caveat about Hydro's module)

MrAzure could be merged (with caveat about Hydro's module)

Yudishtira modder may be working on this​

External Modders are
OrionsMods - Mine Warfare still to be merged in
Tsentom1 - Topkapi Palace needs python work to fit with Cultures
Platyping also Natural Wonders
The_J

Projects are
Bad_Karma - future content for a game option. Probably needs to be on if Nightmare stuff activated. I don't think anything in here actually works yet. IE is mostly rough ideas
GreatPeople - probably finished so could be merged
Units - probably finished so could be merged (with caveat about Hydro's module)
Promotions - finished so could be merged (with caveat about Hydro's module). Note I have tried to merge it previously without success.
Resources - finished so can be merged but TradeGoods needs to be a new file in the XML. Some of Sargon's resources need to be put in here also
Buildings - finished so could be merged (with caveat about Hydro's module)
Static - ideally to finish this project there should be an optional mod (and download?) with the non-static versions of this using the same XML element names so that it can update the static with moving for people who have powerful enough machines.
Animals
my current project it is a review of all the animal units.

Originally I was also looking at making each animal optional but WoC does not work the way I expected and you can't have a building depend on a unit because units are loaded later. The only way to make them optional would be to have a folder for each one. I may go back and look at having a restricted set later.
NomadDemo A demo. It is not currently working as intended because someone added a unit of the same name or art or something that is overwriting crucial graphics.​

Intended Optional Mods cannot be merged. These are
Custom Leaderheads
Custom_Civilizations
Custom_Religions
Alt_Timelines

Special
My_Mods and My_Mods (unloaded) were originally designed to allow players to move optional mods they download into and out of play. Obviously I did not explain this well enough as it is not being used by anyone but me.

zMovieFix Must be left as is to fix problem of game forgetting movies.​

What I'd think best is to start from the first one in the load order and keep for last the ones that are likely to create conflicts and test each time something is merged if everything is alright. Meaning, first, moving Bad_Karma and merging together the files in Custom Leaderheads (taking care of the art path).

Does that sounds good?

With all that in mind I have no problem with you merging the modders folders as mentioned above.

edit Promotions/Cultural_Heritage is another project. I think it needs to be inactive as the means of getting those promotions has not been done. perhaps we need a folder to contain all the projects?
 
Phew! Thanks for those detailed messages.

If I sum it up:
- CIVPlayer8, Faustmouse (except LunarDemo), StrategyOnly\Heroes, ls612 (except Traits) and MrAzure can probably be merged without too much problem.
- ori and Hydro needs a bit more work to make sure there aren't any conflicts.
- the rest remains as is for the time being.

I'll start with the 1st item then.
 
Phew! Thanks for those detailed messages.

If I sum it up:
- CIVPlayer8, Faustmouse (except LunarDemo), StrategyOnly\Heroes, ls612 (except Traits) and MrAzure can probably be merged without too much problem.
- ori and Hydro needs a bit more work to make sure there aren't any conflicts.
- the rest remains as is for the time being.

I'll start with the 1st item then.

Not CIVPlayer8 or MrAzure as they are loaded after Hydro. Merging them may cause some of their stuff to be lost.

I have just standardised the art folders for Sargon's folder except the wonders.

This means the following can be merged without expecting problems

- Faustmouse (except Captives and LunarDemo)
- Sargon - be aware than the button art in the wonders may now be obsolete and just need deleting.
- StrategyOnly\Heroes,
- ls612 (except Traits)
- Resources​
 
Top Bottom