Does civ4 see all the xml files as one big one?

seady

Prince
Joined
Aug 30, 2006
Messages
582
Location
Sydney
I noticed that the guides said to copy the assets folder and then edit the files in your mod, but people don't seem to use the original filenames at all and it works fine. It seems that all the xml files are appended by the system and the filenames are just used as pointers in one huge file generated as the system boots the game? Is that correct?

p.s. if anyone knows how to dump the text of directory trees in windows, i'd appreciate knowing; i am used to linux and can't understand why the xp command prompt doesn't seem to have moved on since the dos 6 days with regards to long filenames. I can screenshot the directories i mean but it's clumsy. :confused:
 
I think it's because at the beginning and end of the xml there will be a tag like <Civ4CivilizationInfos> that tells the game what type of xml data the file contains. I think.
 
When the game loads it will enumerate and grab up every XML file in the text directory and read them, thouse files will ofcouse need to the the proper tags to be properly added to the text hash tables.

Other types of files like UnitInfos.xml and TexhInfos.xml are strict, the file name must be identical any misspelling will cause it to be skipped and the default file to load instead. Normaly only one file for each type of data is loaded.

Chinese America has completed an XML loading mod that allows many of the non-text files to have multiple instances which will be combined. The file names are semi-flexible usualy they must end with a specific squence which identifies the type of elements their holding. With his mod its possible to add units/buildings/techs ala-cart without modifying the main file.
 
I see! thank you. It gets very confusing when looking at other peoples' mods trying to understand them because they jumble the files up. It's a shame there isn't a good editor for units etc because that would push everything into a standard format, as well as making the xml side a lot faster and less problematic and vulnerable to typos etc closing tags.

The weird thing is i actually did something vaguely similar back in 1989 (?) in pascal. Programming in C was beyond me (pointers give me nightmares!) but visual basic was ok (not great, lots of bugs and undocumented bits and contacting microsoft usually led to denial and maybe they'd fix it in another release) but i've lost track of it all now. Microsoft seems to have banned me from their website, perhaps because i wrote them one too many nasty letters. :p

Words like 'parsing' and 'tokens' float out up from my subconscious but i can't recall how it all fits together and my textbooks are long lost now. I don't know if there's a language that's popular that would be suitable for an editor (JAVA maybe??? it should work for mac players as well?). Perhaps python has a visual basic like interface? I dunno. :(
 
Schema's are a B**** because Civ4 wont give ANY kind of XML load error on a bad schema, it just :nuke: :nuke: :nuke:
 
Back
Top Bottom