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

HOW TO: Add a Civ/Unit/Building in BTS (Modular XML Modding)

Discussion in 'Civ4 - Modding Tutorials & Reference' started by Teg_Navanis, Jul 31, 2007.

  1. LPmaverick

    LPmaverick Chieftain

    Joined:
    Jul 2, 2008
    Messages:
    6
    This modular loading is something completely new to me. I had been modding the old way. I followed your tutorial and it works just fine. However, I do have one question: Does modular xml loading just add new leaders, units, etc to existing civ4 BTS or can i use it to make a completely new mod? (ie. my mod is final frontier like)
     
  2. Teg_Navanis

    Teg_Navanis King

    Joined:
    Jan 21, 2006
    Messages:
    737
    The purpose of modular loading ist to add units/civs/buildings from different sources with little effort, not to make a complete overhaul.

    Final Frontier modifies a lot of XML files that aren't modular, and also has Python modifications, which can't be made modular.
     
  3. Midnight-Blue766

    Midnight-Blue766 The filidh that cam frae Skye

    Joined:
    Sep 24, 2007
    Messages:
    3,452
    Location:
    Northern Equestria
    Hello. I tried to add Sweden to the list of civilizations in RoM, though it kept telling me that the modular files didn't load! Why did this happen?
     
  4. Teg_Navanis

    Teg_Navanis King

    Joined:
    Jan 21, 2006
    Messages:
    737
    Check the FAQ of the RoM mod:

     
  5. Midnight-Blue766

    Midnight-Blue766 The filidh that cam frae Skye

    Joined:
    Sep 24, 2007
    Messages:
    3,452
    Location:
    Northern Equestria
    However, I personally made this module specifically for RoM, and it still crashed.
     
  6. Teg_Navanis

    Teg_Navanis King

    Joined:
    Jan 21, 2006
    Messages:
    737
    Well, the information you provided is of little help, and I don't know what changes the RoM people made to the XML file structure. Perhaps you should let them have a look at your error message and files.
     
  7. JA_Lamb

    JA_Lamb Warlord

    Joined:
    Aug 19, 2009
    Messages:
    231
    Location:
    The changing Dark Continent
    Hi, I've been trying to mod BtS with my limited xml experience, for a couple of months now with a little success in simple things, gaining a litle insight to the structure of this game. Now I'd like to switch to modular moding as I think it promises a more structured and organized approach.

    My first attempt seems to have a mysterious flaw crashing the game when it loads graphics. When I switched on the dump logs it seems that the fault occurs when it tries to load the Interface, which I have not touched as I'm only trying to introduce a Tribe Unit that is junior to the Settlers.

    The xml dump log seems to always stop in the middle of loading Espionage. A section that I again have not touched. I understand that it is difficult to form ideas about faults of someone elses computer, but please if you tell me what info would be required, I'll try to furnish it and maybe you'll be able to help me.
     
  8. PHOTG44

    PHOTG44 Chieftain

    Joined:
    Dec 13, 2009
    Messages:
    2
    I know its probably really easy but I'm trying to learn so please help. How do you add audio files in the modular setup? I'm trying to put a song in for a particular leader and so far I have had trouble figuring it out.
     
  9. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,185
    Location:
    DE/NL/FR
    Welcome to CFC :).

    As far as i know, the sound is one of the few things, which can't be made modular :(.
     
  10. PHOTG44

    PHOTG44 Chieftain

    Joined:
    Dec 13, 2009
    Messages:
    2
    All right. Thanks a bunch. You just saved me a bunch of time and patience.
     
  11. Healz

    Healz General

    Joined:
    Jun 11, 2002
    Messages:
    953
    Location:
    Maryborough, Australia
    Sorry, but how does this apply if I just want to add new units with modular loading, without adding any new civilizations? I haven't found any that actually seem to be unit addition on its own unless I am missing something here. I just have a whole bunch of units I like that I want to add to the Civilization IV BTS Extra mod for myself.
    Thanks, Healz.
     
  12. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,185
    Location:
    DE/NL/FR
    I think, if you just take one of the modular civs, and kick everything civ related out of it, then it should work.
    But i'm not sure, i have never worked modular.
     
  13. Healz

    Healz General

    Joined:
    Jun 11, 2002
    Messages:
    953
    Location:
    Maryborough, Australia
    Okay, but I know one of the WOC blokes should be able to help me. They seem to be doing something similar with their WOC things with units. I might try over there for an answer. They could probably give me something useful in terms of code to use...
     
  14. Turner2

    Turner2 Chieftain

    Joined:
    Jul 26, 2007
    Messages:
    6
    I loaded a Mil Mi 26 into the GEM, not doing anything but unzipping into the modules folder (because I'm inherently lazy) and the unit's there but I only get a pink blob? Help?
     
  15. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,185
    Location:
    DE/NL/FR
    Check the file ArtDefines_units.xml in the folder of the new unit, and compare the paths mentioned for the new units with the paths in your folders.
    If the name of the file or the paths do not match, then you'll see instead of the unit a pink blob ingame.
     
  16. Yxklyx

    Yxklyx King

    Joined:
    May 7, 2008
    Messages:
    869
    Sheesh, wish I had found this thread earlier!

    So can ALL xml files under Assets/XML be modded this way or are there some exceptions?

    And just wanted to confirm that game text tags can't be overwritten using this method? You need to create a new tag name?

    Also, can this be used for Python files?
     
  17. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,185
    Location:
    DE/NL/FR
    Not modular:
    - All sound xml
    - buildings/PlotLSystem.xml + CityLSystem.xml
    - Some problems with technologies/TechnologyInfo and Units/PromotionInfos.xml


    No idea about the rest :dunno:.
     
  18. Pomphis

    Pomphis Warlord

    Joined:
    Sep 22, 2010
    Messages:
    289
    Location:
    Berlin, Germany
    I want to copy some wonders from elsewhere, at least two of which make python changes. Could I copy the python changes into the regular python files (I believe they only add the wonder´s special effect) and put everything else into Modules ?
     
  19. Unmnemonic

    Unmnemonic Chieftain

    Joined:
    Oct 29, 2016
    Messages:
    14
    I've got a modular mod working that adds a new civilization to BtS. But I don't see how to add a new leader to an existing, standard BtS civilization. I can define the new Leader in [MyMod]_CIV4LeaderHeadnfos.xml. But I don't see how to associate the leader to an existing civ. Doing a brute-force copy of that civ to [MyMod]_CIV4Civilizationnfos.xml and adding the new leader doesn't seem to work, and besides it's not in the spirit of modularity.

    A working example of this would be welcome!
     

Share This Page