1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. Photobucket has changed its policy concerning hotlinking images and now requires an account with a $399.00 annual fee to allow hotlink. More information is available at: this link.
    Dismiss Notice
  3. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  4. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  5. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  6. Dismiss Notice
  7. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Error with xml after editing units

Discussion in 'Civ4 - Creation & Customization' started by CivMarine, May 24, 2007.

  1. CivMarine

    CivMarine Chieftain

    Joined:
    May 23, 2007
    Messages:
    14
    I am getting this error after editing the units with wordpad.
    Failed loading xml file xml\units/civ4unitinfos.xml
    [.\FXml.cpp.133] Error parsing xml file
    File: xml\units/civ4unitinfos.xml
    Reason: Element content is invalid according to the DTD/ Schema
    Expecting {x-schema:Civ4unitschema.xml}PrereqBonuses
    Line 10811, 15
    Source: <BonusType>Bonus_Uranium</BonusType>
    Load xml failed for units/civ4unitsinfos.xml
    Current xml: units/civ4buildinfos
    Then it goes on to tell me that the class infos for all the Country unit specifics are wrong i.e. navyseal-american, panzer-german, cossack-russian etc etc. Have I forgotten to do something somwhere? Please help! Thank you.:mad: :confused:
     
  2. Chamaedrys

    Chamaedrys Chieftain

    Joined:
    Mar 14, 2006
    Messages:
    1,267
    Location:
    Germany
    You've made little little mistake in the civ4unitinfos. Maybe you mispelled something or forgot a "/". Now the game is unable to load this file. So the game has no info about units. And this leads to probs with other files...

    the solution:

    check the mentioned line in the unitinfos and correct the mistake.;)
     
  3. Zebra 9

    Zebra 9 Chieftain

    Joined:
    May 17, 2006
    Messages:
    1,554
    Location:
    Middle of Cyberspace
    Well, cIV is case sensitive so maybe try changing <BonusType>Bonus_Uranium</BonusType> to <BonusType>BONUS_URANIUM</BonusType> and it might work.:thumbsup:
     
  4. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    19,753
    Gender:
    Male
    Location:
    MN
    If all else fails just post a copy of the files you changed here, and someone MIGHT take a look, ok.
     
  5. CivMarine

    CivMarine Chieftain

    Joined:
    May 23, 2007
    Messages:
    14
    I think it has something to do with the bonuses I am trying to use to 'have' to build the unit. i.e.: the destroyer; I want to have whomever is building the ship to have to have the resources iron, oil, and uranium. I don't know if I have put them in the wrong perameter or what. I still don't understand why all the classes are messed up. Thanks for the help everyone.
    This is my unitinfos file(please don't make fun of it, it is mine :) ) :
    http://forums.civfanatics.com/uploads/116628/CIV4UnitInfos.rar
     
  6. ohcrapitsnico

    ohcrapitsnico Chieftain

    Joined:
    Jan 16, 2006
    Messages:
    2,267
    You shoudl use notepad instead of wordpad, I don't know if it makes a difference or not but I think wordpad causes problems.
     
  7. Chamaedrys

    Chamaedrys Chieftain

    Joined:
    Mar 14, 2006
    Messages:
    1,267
    Location:
    Germany
    I have found the bug:

    You cant add or remove a line without changing the sdk.

    But you can have several "PrereqBonuses":

    <BonusType>BONUS_IRON</BonusType>
    <PrereqBonuses>
    <BonusType>BONUS_OIL</BonusType>
    <BonusType>BONUS_URANIUM</BonusType>
    <BonusType>NONE</BonusType>
    <BonusType>NONE</BonusType>
    </PrereqBonuses>
     
  8. CivMarine

    CivMarine Chieftain

    Joined:
    May 23, 2007
    Messages:
    14
    Thanks a lot Chamaedrys. What about the unit upgrade? Can I erase that without changing the sdk?
     
  9. Chamaedrys

    Chamaedrys Chieftain

    Joined:
    Mar 14, 2006
    Messages:
    1,267
    Location:
    Germany
    Yes, units without an upgrade have just a
    ;)
     
  10. CivMarine

    CivMarine Chieftain

    Joined:
    May 23, 2007
    Messages:
    14
    That's what I figured. Just thought I would make sure. I hate to ask more of you since you have helped me so much already, but can I add upgrades? i.e.
    unit swordsman:
    <UnitClassUpgrade>
    <UnitClassUpgradeType>UNITCLASS_KNIGHT</UnitClassUpgradeType>
    <bUnitClassUpgrade>1</bUnitClassUpgrade>
    </UnitClassUpgrade>
    Sorry I am somewhat a noob, I know more than most, but not as much as many. Thanks for putting up with my annoyance.
     
  11. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    19,753
    Gender:
    Male
    Location:
    MN
    See told you someone MIGHT help, but you always get those few idiots that have nothing better to do than rate MODs with a 1 star, IDIOTS, LOL
    Glad you got some help!!!
     
  12. CivMarine

    CivMarine Chieftain

    Joined:
    May 23, 2007
    Messages:
    14
    CASE CLOSED! Thanks for all the help everyone. This is a great site!
     

Share This Page