Tutorial - Adding Entries to MLF file

os79

Deity
Joined
Mar 14, 2009
Messages
3,095
Location
Eastern USA Coast
UPDATE:
Here is the link to Universal MLF file.
Go to the link and download the file.
Put it in the Modules folder, overwriting the old MLFLoading.xml (sp?) if you had not already done it.
That should take care of the below tutorial for you.
That means that you will need this tutorial on a very RARE occasion because most modmodders tend to put in their own MLF entries for their own folder.

Alright,

So, the modmods is getting filled up with excellent modmods! I'm excited about it!

However, I see repeatedly complaints about modules not working because of overwriting MLF files.

I'm going to give one fix that could fix a majority of these complaints.

First off, if you download a module, look for its top directory folder: for example, AAranda, Vincentz, Fortifications, and so on. The point is: find the topmost folder of the module itself, not Rise of Man, Assets, or Modules.

Then, open MLF file in that same folder you found the topmost folder. Its name is MLF_CIV4ModularLoadingControls.xml. Open it with Notepad.

In there, in first few lines you will see:
Code:
<?xml version="1.0"?>
<!-- Sid Meier's Civilization 4 Beyond the Sword -->
<!-- Modified by the World of Civilization Team -->
<!-- Master Load File -->
<!-- -->
<Civ4ModularLoadControls xmlns="x-schema:CIV4ModularLoadingControlsSchema.xml">
	<DefaultConfiguration>Modules_Main_1</DefaultConfiguration>
	<ConfigurationInfos>
		<ConfigurationInfo>
			<Type>Modules_Main_1</Type>
			<Description>Initialize ALL Modules by using the MLF file structure</Description>
			<Modules>
				<Module>
					<Directory>Whatever</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>Whatever #2</Directory>
					<bLoad>1</bLoad>
				</Module>
Now the relevant part is:
Code:
			<Modules>
				<Module>
					<Directory>Whatever</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>Whatever #2</Directory>
					<bLoad>1</bLoad>
				</Module>
The "Whatever" is what names of folders that are present in the folder the MLF file is in.

Now put your cursor at the end of line here:
Code:
			<Modules>
and hit Enter, then use Tab key to move to the SAME!!!! place the term
Code:
				<Module>
is, then type the above.
Continue the same till you come to Whatever part. That is the KEY!
Type in the topmost folder name of the module here. Then continue copying the rest of the entry till this:
Code:
				</Module>

Here is an example. I will leave Whatever and Whatever #2 in the first and the second entry as examples of what are ALREADY in the file, then I will fill in new entry.
I'm going to use Jooyo as an example. And I'm in Projects folder. Here go:
Code:
			<Modules>
				<Module>
					<Directory>Jooyo</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>Whatever</Directory>
					<bLoad>1</bLoad>
				</Module>
				<Module>
					<Directory>Whatever #2</Directory>
					<bLoad>1</bLoad>
				</Module>

There you are with all modules in your Modules folder and ready to play.

If you need me to clarify a specific part, don't be hesitant to ask! Either I or other modmodders will be happy to help you! Why? Because Rise of Mankind is the KING OF THE MODS!

Good luck!
 
This is an essential guide :)

And it's frankly, a crying shame that Modular mod mod loading has taken a step backwards by making this necessary :/
 
This is an essential guide :)

And it's frankly, a crying shame that Modular mod mod loading has taken a step backwards by making this necessary :/

Us modmodders need to make a unofficial universal MLF file that we don't include in our modmods but offer separately; I tried to include all of the modmod's in my MLF files, but it is probably outdated now.
 
And it's frankly, a crying shame that Modular mod mod loading has taken a step backwards by making this necessary :/

Pretty uncomfortable. I tend not to want to do this always after loading a modmod I want to test.
 
This is an essential guide :)

And it's frankly, a crying shame that Modular mod mod loading has taken a step backwards by making this necessary :/

It isn't nessecary. You can turn off WOC modular loading. Just turn on Modular Loading in the Rise of Mankind.ini file and delete the MLF files. Of course, WOC modular loading has its advantages, so I'm going to stick to it.
 
Hi Afforess, what are the advantages you mention? Does WOC loading use less memory?
 
Hi Afforess, what are the advantages you mention? Does WOC loading use less memory?

WOC modular loading lets you turn on and off modules in the MLF, but the biggest bonus is for modders. Also, WOC Modules let you add dependancies. Look at Realistic Diplomacy for example. Before WOC, I had to offer two version of RD. One for the Standard ROM, and one for the Extra Civs. Now, I can release one pack for all of the Civs, because of dependencies. With the dependancy, the game check to see if the dependent file exists, and loads or ignores the XML depending on whether it found the dependent files.

Plus, a lot of our modules have only the XML changes needed, instead of all of the XML. If you turn on regular modular loading and turn off MLF loading, some of the WOC modules will break.

Also, the WOC team says on their page, that...
We will have an "Front End Program" with v2.00 that runs before BtS and allows a player to choose Modules without actually interacting with folders/files, but using a graphical interface that also has the ability to save a configuration (needed for MP games).
 
I would really like to know how to check for Dependencies works so when I design add-ins for compatibility they won't load unless the other mod that I am trying to add capabilities with exist and so it doesn't create an error if the dependency doesn't exist. For Example I would like my modules/flamesofphx/improve/compatibility/flamesofphx-cheaters, to check to see if the modules/flamesofphx/cheaters directory exists before that directories mod is loaded. I may have to just split everything out into new mod just for compatibilities otherwise and just tell people installed to select what they need
 
I would really like to know how to check for Dependencies works so when I design add-ins for compatibility they won't load unless the other mod that I am trying to add capabilities with exist and so it doesn't create an error if the dependency doesn't exist. For Example I would like my modules/flamesofphx/improve/compatibility/flamesofphx-cheaters, to check to see if the modules/flamesofphx/cheaters directory exists before that directories mod is loaded. I may have to just split everything out into new mod just for compatibilities otherwise and just tell people installed to select what they need

I do not know how to reply :lol:. I'm not that deep in WoC code. However, you may consider asking Johnny Smith, one of WoC coders who made WoC Lite that is part of RoM. Maybe others here may have answers :dunno:.
Good luck in your hunt for the answers :).
 
The first post now have a link to Afforess' Universal MLF Loading file that should take care 99% of what this tutorial was aimed to help with.
 
Wrong thread, sorry! Nothing to see here :blush:.
 
Don't know if the right thread and it's only a simple question. But I'm totally new with modmods. So some of them you can't see cause they work in the background, I think so. What's about those modmods? I have them in the mlf, how can I see which modmods are loaded? Is there an option?
 
Question: in what order are modules loaded, i.e. if 2 modules changed the same feature, in which order would I need to place them to prioritise one module?
 
Question: in what order are modules loaded, i.e. if 2 modules changed the same feature, in which order would I need to place them to prioritise one module?

I believe that the last loaded module is the one that will "win out". So if you want your module to beat another module, put your module below of the the other module in MLF file.

Am I right, Afforess?
 
Yes, I've been experimenting and it seems that the further down the list, the higher the priority. The reason I'm asking is because the MLF file distributed with A New Dawn places ROME's entry in such a position that not all unit art styles display correctly. I'll need to distribute my own MLF file with the correct load order.
 
Yes, I've been experimenting and it seems that the further down the list, the higher the priority. The reason I'm asking is because the MLF file distributed with A New Dawn places ROME's entry in such a position that not all unit art styles display correctly. I'll need to distribute my own MLF file with the correct load order.

When you find a position you like, just let me know. I'll be more than happy to update mine as well.
 
When you find a position you like, just let me know. I'll be more than happy to update mine as well.

The MLF which comes with AND does need some modification. A number of entries in it are now not in the main folder but in sub folders so are not needed any more.
 
When you find a position you like, just let me know. I'll be more than happy to update mine as well.

Basically, ROME needs to be placed beneath anything pre-fixed with 'Custom', but especially 'Custom Art Styles' and 'Custom Leaderheads'.
 
Top Bottom