Cleaned Up Formations.XML file

n003lb

Warlord
Joined
Oct 24, 2005
Messages
159
Location
Air Capitol - Wichita, KS, USA
Well, I had a look at the "CIV4FormationInfos.xml" file and, whoa, what a garbeled up looking mess. I just spent the last 4 hours going through and cleaning it up with notepad, spacing it out so it's clearer to read. Makes it a lot easier to find a specific unit or bit of information in my opinion. I haven't had a chance to truly playtest it yet, so I don't know if it will cause any problems or not.

I know the game gives no errors at startup or when starting a new game. After I first did this, I had about a dozen errors to fix, all of which appeared when I tried to start a new game. Mostly, the errors were spots where I put whitespace between brackets, which XML apparently doesn't like. After I fixed those, it seems to work just fine.

I am providing it here as an aid to anyone else that feels completly overwhelmed by the clutter of this file originally. I am not an XML programmer, so I don't really know what anything in this file does. I just spaced it so that it is clearer and each formation is seperated out.

I have changed none of the original code, just cleaned it up to make it easier to read. I don't hold any rights to it, but I wouldn't think there would be any problems with me uploading it.

As with anything you download, use it at your own risk. I am not responsible for any damage done to your computer or your game as a result of using this file.

DON'T MODIFY YOUR ORIGINAL GAME FILES!

Put this file in the "My Documents\My Games\Sid Meier's Civilization 4\CustomAssets\xml\units" folder for now (use the Shortcut provided in the Civ IV main folder), until you know it will not adversly affect your game. Make sure to clear your cache after installing this file. Otherwise, Civ will not load it and you won't know if it is causing a problem or not. If you do wish to replace your original file with this one, BACKUP THE OLD FILE FIRST!

Anyway, I hope someone finds it useful. If anyone has serious problems with it, there ain't much I can do to help. If a lot of people have trouble, please post here and let me know. It may be a fluke that it works on my system. If that's the case, I'll take it offline so as not to cause problems for anyone else.


BTW To Moderators: I don't really know where to put this. If it is not in the right place, please move it. Thanks.

[EDIT July 5, 2006] Download removed because of superceding files below. They are better than what I did.
 
Yeah, I thought about doing this at one point or another, but I never was thinking about doing it by hand. I was thinking more along the lines of just making a simple script and having it do all the hard work for me. The only problem with that is that I never put any time towards doing it because I've been busy with other stuff. ;)

So, it's nice to see that someone decided to do it the insane way. Now, I don't think that I'll even bother doing it my way (besides, I don't think that I would have scrounged up the time for this as it isn't something high on my own priorities). Just thought I'd let you know that it could have been done with a lot less effort.
 
KingTux said:
Yeah, I thought about doing this at one point or another, but I never was thinking about doing it by hand. I was thinking more along the lines of just making a simple script and having it do all the hard work for me. The only problem with that is that I never put any time towards doing it because I've been busy with other stuff. ;)

So, it's nice to see that someone decided to do it the insane way. Now, I don't think that I'll even bother doing it my way (besides, I don't think that I would have scrounged up the time for this as it isn't something high on my own priorities). Just thought I'd let you know that it could have been done with a lot less effort.

Well, I ain't a programmer, and it really didn't take that long. Yes I spent 4 hours on it, but that was intermixed with a few other things I had going at the time. Time spent on this was really only maybe an hour or so.

Glad it's helpfull
 
Thanks! Now the lines are no longer jumbled up into intimidating blocks of words and numbers. The nice formatting will go far in possible edits later on (maybe when more patches come). :goodjob:
 
In case anyone is curious, or they update the formationinfo file again without fixing the formatting, if you're using any of the Microsoft Visual Studio Express programs (free download, they all have excellent XML editors (the same one, really), and they're useful for other things), all you need to do is hit:

Edit > Format Document

and lo, he beheld that it was clean
 
well this is most certainly a great job. :goodjob:

Kudos to you guys. I really needed to edit this file myself to include the new units in my mod. This will make the job go alot quicker. :D
 
Good job guys :goodjob:! I couldn't believe the formatting of that file when I first saw it, why did Firaxis release it that way and never change it through what, 4 patches?
 
hr_oskar said:
Good job guys :goodjob:! I couldn't believe the formatting of that file when I first saw it, why did Firaxis release it that way and never change it through what, 4 patches?

good question. :p
 
Back
Top Bottom