Advertisement
Civilization Fanatics' Center  

Welcome to Civilization Fanatics' Center.

You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support.

Go Back   Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization

Notices

Reply
 
Thread Tools
Old May 24, 2007, 03:30 AM   #1
CivMarine
Chieftain
 
Join Date: May 2007
Posts: 14
Question Error with xml after editing units

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.
CivMarine is offline   Reply With Quote
Old May 24, 2007, 09:25 AM   #2
Chamaedrys
Emperor
 
Chamaedrys's Avatar
 
Join Date: Mar 2006
Location: Germany
Posts: 1,267
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:

Quote:
Line 10811, 15
Source: <BonusType>Bonus_Uranium</BonusType>
check the mentioned line in the unitinfos and correct the mistake.
__________________
(...)
Chamaedrys is offline   Reply With Quote
Old May 24, 2007, 11:32 AM   #3
Zebra 9
Emperor
 
Zebra 9's Avatar
 
Join Date: May 2006
Location: Middle of Cyberspace
Posts: 1,554
Well, cIV is case sensitive so maybe try changing <BonusType>Bonus_Uranium</BonusType> to <BonusType>BONUS_URANIUM</BonusType> and it might work.
__________________
I'm Updating My MOD COMPs

Zebra 9 is offline   Reply With Quote
Old May 24, 2007, 01:27 PM   #4
strategyonly
Caveman2Cosmos Modder
 
strategyonly's Avatar
 
Join Date: Mar 2006
Location: MN
Posts: 14,183
Images: 5
If all else fails just post a copy of the files you changed here, and someone MIGHT take a look, ok.
__________________
Caveman 2 Cosmos updated 8 May 13, 2:00 a.m.
Caveman2Cosmos Forum: Project and Mod Development Forum HERE
strategyonly is offline   Reply With Quote
Old May 24, 2007, 02:21 PM   #5
CivMarine
Chieftain
 
Join Date: May 2007
Posts: 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/upload...4UnitInfos.rar

Last edited by CivMarine; May 24, 2007 at 02:25 PM.
CivMarine is offline   Reply With Quote
Old May 24, 2007, 02:48 PM   #6
ohcrapitsnico
Deity
 
Join Date: Jan 2006
Posts: 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.
ohcrapitsnico is offline   Reply With Quote
Old May 24, 2007, 02:58 PM   #7
Chamaedrys
Emperor
 
Chamaedrys's Avatar
 
Join Date: Mar 2006
Location: Germany
Posts: 1,267
I have found the bug:

Quote:
<BonusType>BONUS_OIL</BonusType>
<BonusType>BONUS_IRON</BonusType>
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>
__________________
(...)

Last edited by Chamaedrys; May 24, 2007 at 03:03 PM.
Chamaedrys is offline   Reply With Quote
Old May 24, 2007, 03:07 PM   #8
CivMarine
Chieftain
 
Join Date: May 2007
Posts: 14
Thanks a lot Chamaedrys. What about the unit upgrade? Can I erase that without changing the sdk?
CivMarine is offline   Reply With Quote
Old May 24, 2007, 03:16 PM   #9
Chamaedrys
Emperor
 
Chamaedrys's Avatar
 
Join Date: Mar 2006
Location: Germany
Posts: 1,267
Quote:
Originally Posted by CivMarine View Post
Thanks a lot Chamaedrys. What about the unit upgrade? Can I erase that without changing the sdk?
Yes, units without an upgrade have just a
Quote:
<UnitClassUpgrades/>
__________________
(...)
Chamaedrys is offline   Reply With Quote
Old May 24, 2007, 03:25 PM   #10
CivMarine
Chieftain
 
Join Date: May 2007
Posts: 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.

Last edited by CivMarine; May 24, 2007 at 03:41 PM.
CivMarine is offline   Reply With Quote
Old May 24, 2007, 04:08 PM   #11
strategyonly
Caveman2Cosmos Modder
 
strategyonly's Avatar
 
Join Date: Mar 2006
Location: MN
Posts: 14,183
Images: 5
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!!!
__________________
Caveman 2 Cosmos updated 8 May 13, 2:00 a.m.
Caveman2Cosmos Forum: Project and Mod Development Forum HERE
strategyonly is offline   Reply With Quote
Old May 24, 2007, 10:13 PM   #12
CivMarine
Chieftain
 
Join Date: May 2007
Posts: 14
CASE CLOSED! Thanks for all the help everyone. This is a great site!
CivMarine is offline   Reply With Quote
Reply

Bookmarks

Go Back Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization > Error with xml after editing units

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XML Load Error civ4gametext_objects_bts.xml Oddible Civ4 - Bug Reports 2 Aug 11, 2008 04:37 PM
Help editing XML with MS XML Notepad 2007 Acronym2 Civ4 - Creation & Customization 4 Jun 22, 2008 11:11 PM
xml editing help sabres77 Civ4 - General Discussions 2 Sep 06, 2007 07:56 PM
XML parse error in CIV4PlotLSystem.xml--FIX largeprimenumbe Civ4 - Technical Support 0 Mar 03, 2007 09:50 AM
XML Editing. D'Artagnan59 Civ4 - Technical Support 1 Sep 18, 2006 07:15 AM


Advertisement

All times are GMT -6. The time now is 10:47 PM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
This site is copyright © Civilization Fanatics' Center.
Support CFC: Amazon.com | Amazon UK | Amazon DE | Amazon CA | Amazon FR