Civ4 XML Editor

Zebra 9,
Thanks for the info. I kind of thought something like that might be available, but I was to lazy to look it up.:rolleyes: I'll add that line to future versions of the program.

Yakk,
Yes, an element can be deleted if it is in a list (such as the "UniqeNames" list for a great general). Use the "Show Edit Help" option to see what is available. I didn't make other items deleteable because that would make the file unreadable by Civ4 (I think). If you run across something that can't be deleted, but you think it should, let me know and I'll look into it.
 
By "elements" I mean nodes like entire units.

Not delete components of a unit. That would cause problems. :)

Being able to copy a unit (or set of units) from one file to another, or delete some units in a file, makes creating modular XML modifications much easier.
 
I just added that feature to the version I'm working on now. I'll test it for a little bit, and if everything works OK, I'll upload it shortly.
 
I just uploaded a new version. Improvements include the ability to clone and delete objects in the Class List. These commands can be used to quickly add or remove items like units or buildings in the game.
 
Could it be possible to add support for integer values that aren't between 0 and 100? Also, how do you clone/delete objects in the class list? There's no right click menu. The ability to use more XML files (anything that doesn't use type tags) and to rearrange items in the class list (needed for CivilizationInfos and LeaderHeadInfos).
 
You can enter larger integer values by clicking on the "Entry Box" button when the edit integer dialog box is up.

To clone and delete items in the class list, use the insert and delete keys.

The editor already recognizes all of the stanard XML files in the game and you can use the type button to look at any other files.

You can see more info about these things by clicking on the help button.
 
Negative values, however, do not seem to be supported. At least it didn't work when I tried. The text box didn't accept the minus sign.

Thanks for pointing that out, I can't believe that I never noticed that. :blush:

I'll come out with a fix sometime in the near future.
 
I recently had issues with starting this program. It took some digging but I discovered that I did not have the mfc71.dll file installed. As soon as I got it off a google search and dropped it in my windows/system folder, the program started right up.

*edit* Just to clarify I was experiencing the same error messages that others in this thread were mentioning.
 
Thanks for the info chimaerarouge, I'll be interested in seeing if this helps anyone else. I hope to upload a new version of the program today. I'll include that file in the program folder so people can try that fix if they want to.
 
I just uploaded a new version on the editor. It now supports negative numbers, and the help text has be improved.

I also included the mfc71.dll file that chimaererouge mentioned. It's in the program folder. I'm hoping that the program will just look for it there, and this will fix the problem. If anybody that was experiencing the startup problem tries this version, I'd be interested in hearing about the results.
 
I just uploaded a new version - 1.12.

Improvements in 1.12:
The editor now loads an XML file if one is passed to it when it opens. That means you can now make Civ4 XML Editor your delault program for xml files and double clicking on a file will open it within the editor. If you want to move your Civ4 XML Editor program folder, it would be best to do it before making it the default program for your xml files. It's a Windows thing.
You can also use the "Send To" option in the Windows right click menu to load files. To make the "Send To" option work, you will need to drag a shortcut of the editor into your SendTo folder.
 
Hi, I just tried to open the xml in the ExoticAnimal Mod using this editor. It won't open them. Something truncates the name of the file after I select them using the LOAD button.

"ExoticAnimals-0.3_CIV4ArtDefines_Unit.xml" becomes "icAnimals-0.3_CIV4ArtDefines_Uni" which the editor can't find.
 
From your description I'm guessing the editor opened the file with no problems. It just doesn't know how the sort the data because the file has a non standard name. There is nothing wrong with it having a non standard name, you just have to tell the editor how to sort the data using the "Type" button. After clicking on the "Type" button, enter the class type for that file (probably "UnitArtInfo") then click accept. That should make everything display properly.

You can also get some more information about the "Type" button by clicking on the "Help" button.

The editor should of came up with a message box indicating that it couldn't find a "icAnimals-0.3_CIV4ArtDefines_Uni" class, and that you should click on the "Type" button to enter a class type. Is it possible that the message is behind your main window for some reason? If so there will be two buttons with the editor icon in your taskbar.
 
I just loaded a new version - 1.13.

The editor now does a much better job of loading files that have been named differently than the ones that came with the game. If you're editing a mod with non standard file names you shouldn't have to use the "Type" button. You probably won't need the "Type" button at all, but I left there just in case.
 
The file uses non standard characters (at least for the USA and some other countries), but doesn't have an encoding statement. This causes problems when loading the file. I'll see if I can change some code to make it work without causing other problems - if so I'll upload an updated version sometime in the near future.

If you want to get it to work right away, try this:
Backup the file then, open the file in notepad (yuk!) and change the first line from this <?xml version="1.0"?> to this <?xml version="1.0" encoding="ISO-8859-1"?>. The file should then work OK in the Civ4 XML Editor.
 
I noticed something odd with the unit file too, MetaPad was choking on it - first time I've seen something like that. I had to open it with ConTEXT editor.

Though it may of been an issue with my font, when I changed MetaPad to "Arial" it was loadable, though I hate non monospaced fonts for code.
 
General Tso,
would this program work for viewing customised models in game?
I've been reskinning some customised models which i downloaded from this site, and I'd like to see them inside the actual game, but i don't have a clue about programming language or hard stuff like that? I read a tutorial about it here but it did my brain in.
 
Top Bottom