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

Implications of relocating XML files

Discussion in 'Civ4 - Creation & Customization' started by Matty R, Nov 22, 2009.

  1. Matty R

    Matty R Veteran Newbie

    Joined:
    Jun 17, 2006
    Messages:
    416
    Location:
    Bolton, England
    Hello :)

    I'm soon going to start altering XML files on my new install of BTS, and I've been getting ready by moving XML files from Civ4/Warlords into the corresponding subfolder in the BTS section of the program files (eg: TraitInfos from Civilizations in Warlords to Civilizations in BTS). It just means I don't have to keep moving between the three sets of XML files.

    Could doing this cause any problems at some point? It still loads without any trouble and everything seems to be ok, but I haven't played a game yet.

    Thanks

    EDIT

    Forgot to mention that I'm running BTS 3.19 with BUG 4.2 and BULL 1.0
     
  2. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    32,185
    Location:
    DE/NL/FR
    If you want to alter the xml, then create a mod and never ever change the original files.

    Besides that, it's the same what i've done for my mod, and it doesn't cause any problems. It's exactly the thing you have to do.
     
  3. CyberChrist

    CyberChrist You caught my attention

    Joined:
    Dec 6, 2001
    Messages:
    1,424
    Location:
    The Matrix
    Even if making a mod it is unlikely your proposed method will work - if I am correctly understanding how you are going to go about it.

    Simply copy/pasting XML and/or Python files from one version of the game to another without making the appropriate modifications is almost guranteed to cause severe problems (cIV probably wont even load - or function as expected even if it does).

    You need to adjust your files so that they comply exactly with the new structure of the various XML files and make sure all Python code is not using outdated/changed calls.

    Also, if your old modifications relied on a modified DLL for Warlords you would have to get an entirely new compile of the DLL made with BTS code (and the functions you were relying on).
     
  4. TC01

    TC01 Deity

    Joined:
    Jun 28, 2009
    Messages:
    2,216
    Location:
    Irregularly Online
    Both The_J and CyberChrist are correct.

    However, what I believe Matty R was asking was "if a file isn't in BTS, will there be any problems if I copy it from Warlords or original Civ (depending where it is in) into the Beyond the Sword folders for ease of access when creating mods?"

    Not modifying the files in BTS, or taking an older version of a file in Warlords and moving it to BTS, but instead taking a file from Warlords that is not in BTS and moving it to BTS. Which you can do... because the way the XML works is that it reads files in this order:

    -Is a file in CustomAssets XML?
    -If a file is not in CustomAssets XML, is it in Mod XML? (Assuming a mod is being loaded)
    -If a file is not in Mod XML, is it in BTS XML? (Assuming the mod is for BTS)
    -If a file is not in BTS XML, is it in Warlords XML? (Assuming you have Warlords)
    -If a file is not in Warlords XML, is it in Civ IV XML?

    (Correct me if I'm wrong, but I don't think I am).
     
  5. Matty R

    Matty R Veteran Newbie

    Joined:
    Jun 17, 2006
    Messages:
    416
    Location:
    Bolton, England
    Thanks for the replies. :)

    I think I should better explain what I'm doing.

    I'm not making a new mod. All I'm going to do is alter XML files to change a few things (civ colours, terrain names, create new traits, no Global Warming, No Meltdowns etc)

    Now take the new traits as an example. To make new traits for BTS, I'd have to edit the TraitInfos XML file in the Warlords assets, because BTS doesn't have a TraitInfos file.

    The last time I did stuff like this, I sometimes forgot to go back into the BTS assets, and instead edited the Warlords assets. So when I made a new unit, it wouldn't load. The BTS UnitInfos XML took priority of the Warlords UnitInfos.

    So, what I'd like to do is move XML files that are only in the Civ4 assets, for example, into the BTS assets.

    I've already moved some files, like BonusInfos, CultureLevelInfos, TraitInfos and all of the TXT XMLs from Civ4 and Warlords into the corresponding BTS subfolders. The game loads without any problems. I haven't moved UnitInfos, because BTS has a copy of that file.

    Hmmmm. I can see why this is confusing. :crazyeye:

    I wanted to ask about this before I go and spend hours making changes. I also keep untouched copies of the XML files incase I mess things up.

    I think that is what I'm after. I assumed the BTS XMLs would take priority over Warlords and Civ4 when I altered some units in the Civ4 UnitInfos the first time I used BTS. They didn't work that time, but they did when I made the alterations in the BTS UnitInfos.
     
  6. TC01

    TC01 Deity

    Joined:
    Jun 28, 2009
    Messages:
    2,216
    Location:
    Irregularly Online
    Still, though, never alter your original files.

    It would be best to do what you want by creating a mods folder "My Tweaks" inside Beyond the Sword\Mods, and then creating an Assets directory inside that, a XML directory inside that, and then copying the files you want into there, and editing the copies of those files.

    Then, to play "My Tweaks", create a shortcut linking to Civ4BeyondSword.exe, and right click on it. Select "Properties", and then at the end of the path add a "mod =\My Tweaks", like so:

    Code:
    "C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\Civ4BeyondSword.exe" mod=\My Tweaks
    Then, to play Civ tweaked your way, you would use this shortcut, rather then having to load the mod from the Advanced\Load a Mod menu.
     
  7. Matty R

    Matty R Veteran Newbie

    Joined:
    Jun 17, 2006
    Messages:
    416
    Location:
    Bolton, England
    :eek: That's a great idea. I didn't even know that was possible. I haven't started my alterations yet, apart from moving the files into the BTS area, so I think I'll give that a go. :)

    Thanks for the help everyone. :)
     
  8. God-Emperor

    God-Emperor Deity

    Joined:
    Jul 18, 2009
    Messages:
    3,551
    Location:
    Texas
    Yes, you are. If you are changing things, you are making a mod. That's what a mod is: changes (A.K.A. "modifications" - one of the two sources of the term "mod", the other being "module").

    Don't change the original files or you will probably regret it eventually. You are making a mod. Put it in the Mods folder.
     
  9. Matty R

    Matty R Veteran Newbie

    Joined:
    Jun 17, 2006
    Messages:
    416
    Location:
    Bolton, England
    I hadn't thought of it like that. I see your point.

    I have permanent modifications that are in place for every game I play, so i think I'll do those using the method that TC01 suggested. I'll do the game-by-game alterations as you have suggested.

    Thanks. :)
     

Share This Page