validating the xml with eclipse (or anything)

kouji71

Chieftain
Joined
Sep 8, 2008
Messages
30
hey guys, i've always been a bit of a tinkerer, and once i looked at all the code you guys had done, I couldn't help but try to add my own race, just for the heck of it.
things are going well, but i've noticed that the schema files civ uses (particularly the one i'm trying to get working: CIV4UnitSchema.xml to validate CIV4UnitInfos) are not in the xsd format. now, i know nothing at all about xml (only c++ and a little java), but it doesn't seem to follow any of the schema conventions i've seen online as i've been trying to learn a little bit about xml programming.
what do you guys use to validate the UnitInfos? or how do you do it? if you could help specifically with eclipse that would be awesome, since thats what i'm used to from school, but if not, anything helpfull would be great :)

it's not a big deal, i know i could just run ffh and let civ4 tell me that there's an error and where it is, but it would be so much faster if i knew how to validate them as i work.
 
I have an excel spreadsheet with macros written in visual basic that convert all the cell contents to xml. I use drop down lists to populate the contents with data validation on so it yells at me if I mistype any of those entries on a lot of them (but not all by a wide margin so plenty of mistakes still sneak in).

The spreadsheet is included with every copy of FfH if you want to check it out. Its in the Fall from Heaven 2 033 directory.
 
hmmm.... i saw that file, but unfortunately i can't get open office to make heads nor tails of it ^^; maybe i should ask on the eclipse forums.

thanks anyway! you guys are awesome!
 
hmmm.... i saw that file, but unfortunately i can't get open office to make heads nor tails of it ^^; maybe i should ask on the eclipse forums.

thanks anyway! you guys are awesome!

Yeah Id love to be able to use open office. But unfortunatly it only supports 256 columns and I need many more than that for FfH.
 
There are various methods of validating XML. As you can see from here, there's about a dozen. This one seems to be XDR or XML Data Reduced. Seems rather unused and very MS-centric. One site claims it's the only schema supported by IE5...
 
yeah, i can't get anything to recognize the schema as valid schema files. looks like i would have to use billion dollar xmlspy or some form of MS visual studio.

so anyway, i've started working on my race, which is more or less based around the empyrean religion. it's my favorite of the bunch, but it seems like it hasn't had quite the attention the other religions have had (yet ;P). i've basically copied over the durandal civilization from FF and modded it to some form of what i was looking for. i've got two civ unique units, a palace, and a unique hero.

only problem is, somehow my additions are causing FF to crash when it loads the xml ^^' no xml errors pop up at all, and the log says everything is fine.

i've attached two files, if someone wouldn't mind taking a quick look at them, they're not very large. one is the civ text xml file, and the other is an xml file with all the code i'm trying to insert (with comments for where i'm trying to put it) and possibly let me know if you see anything that would be causing it to crash.

thanks in advance if anyone has a chance to look at this :)

EDIT: nevermind! i fixed it! somehow i had an extra </bonusAffinity> tag that was screwing it up.

edit again: among other things.
 

Attachments

Generally a crash with absolutely no explanation boils down to a graphical issue. So check all of your Art Defines closely. Or even remove any custom Art Defines you made for the moment and see if that clears the issue, then restore them piece by piece till you break it again.
 
thats what i ended up doing actually, i realized i didn't have to create my own art defines, since i was borrowing the in-game ones, so i just linked to them instead. it was probably an error in the definition, i went back and remade all the xml changes to a fresh install set of files and copied that over, and it worked fine :)
 
Back
Top Bottom