1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Tutorial - Adding Entries to MLF file

Discussion in 'RoM Modmods' started by os79, Jul 24, 2009.

  1. os79

    os79 Deity

    Joined:
    Mar 14, 2009
    Messages:
    3,091
    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!
     
  2. Sarkyn

    Sarkyn Warlord

    Joined:
    Oct 17, 2004
    Messages:
    258
    Location:
    Seytroux, France
    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 :/
     
  3. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    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.
     
  4. DRJ

    DRJ Hedonist

    Joined:
    Dec 1, 2005
    Messages:
    1,514
    Location:
    Hamburg, Germany
    Pretty uncomfortable. I tend not to want to do this always after loading a modmod I want to test.
     
  5. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,571
    Gender:
    Male
    Location:
    MN

    I could not have agreed more.
     
  6. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    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.
     
  7. DRJ

    DRJ Hedonist

    Joined:
    Dec 1, 2005
    Messages:
    1,514
    Location:
    Hamburg, Germany
    Hi Afforess, what are the advantages you mention? Does WOC loading use less memory?
     
  8. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    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...
     
  9. gregac

    gregac Unseen

    Joined:
    Jul 26, 2009
    Messages:
    43
    Location:
    Deep within the sonoran desert
    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
     
  10. os79

    os79 Deity

    Joined:
    Mar 14, 2009
    Messages:
    3,091
    Location:
    Eastern USA Coast
    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 :).
     
  11. os79

    os79 Deity

    Joined:
    Mar 14, 2009
    Messages:
    3,091
    Location:
    Eastern USA Coast
    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.
     
  12. os79

    os79 Deity

    Joined:
    Mar 14, 2009
    Messages:
    3,091
    Location:
    Eastern USA Coast
    Wrong thread, sorry! Nothing to see here :blush:.
     
  13. Cynomys

    Cynomys Chieftain

    Joined:
    Feb 1, 2010
    Messages:
    31
    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?
     
  14. zulu9812

    zulu9812 The Newbie Nightmare

    Joined:
    Jan 29, 2002
    Messages:
    6,389
    Location:
    Athens of the North
    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?
     
  15. os79

    os79 Deity

    Joined:
    Mar 14, 2009
    Messages:
    3,091
    Location:
    Eastern USA Coast
    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?
     
  16. zulu9812

    zulu9812 The Newbie Nightmare

    Joined:
    Jan 29, 2002
    Messages:
    6,389
    Location:
    Athens of the North
    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.
     
  17. Afforess

    Afforess The White Wizard

    Joined:
    Jul 31, 2007
    Messages:
    12,239
    Location:
    Austin, Texas
    When you find a position you like, just let me know. I'll be more than happy to update mine as well.
     
  18. Dancing Hoskuld

    Dancing Hoskuld Deity

    Joined:
    Jul 5, 2004
    Messages:
    23,540
    Gender:
    Male
    Location:
    Canberra, Australia
    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.
     
  19. zulu9812

    zulu9812 The Newbie Nightmare

    Joined:
    Jan 29, 2002
    Messages:
    6,389
    Location:
    Athens of the North
    Basically, ROME needs to be placed beneath anything pre-fixed with 'Custom', but especially 'Custom Art Styles' and 'Custom Leaderheads'.
     

Share This Page