[UTILITY] CivXmlEditor

M07

Prince
Joined
Mar 29, 2009
Messages
514
Location
Canada
What is CivXmlEditor?

This Xml editor will allow you to easily manage your texts in the Xml files.

This software helps Civ IV and Civ IV Colonization players, search, edit, remove or add tags in the Xml files of the game for texts with different languages.

Mac version : Download here!
Windows version : Download here!

Some screenshots to see what it looks like.

Spoiler :

Spoiler :

Spoiler :


Why use CivXmlEditor?

First, it brings you a friendly interface to manipulate all Xml tags.

Then, this software will allow you to type all accents, without wondering "how to write this accent in the right encoding".
So, useless for english people? The answer is no! Don't forget german, italian, spanish and french people!
However, if you are an english modder and you don't want to translate one of those languages (or may be all),
you can ignore one of them and the english value will replace the ignored language.

An history of changes, will allow you to see exactly what were your changes in all documents.

A search module is also available. You can type some keywords in the appropriate text field, and the name of all matched tags will appear in a new window.

Thanks

A big thanks to Stackoverflow forum, that resolved a lot of my problems :D
Thanks also to MadJawa for the help he brought me.
 
Great, that looks really nice M07! It should be very good for translating text spread across the multiple XML/Text files.

BTW I've been searching for some way to more easily edit some of the larger game XML files in general such as unitinfos. It can get really cumbersome trying to copy/paste/edit big XML chunks in a text editor, modding could be so much simpler in a table format like Excel so units/buildings/etc could be edited and compared side-by-side.

So I tried XML Fox with a nice table-view feature but it seemed to changed the format of some of my files :sad: I've found and downloaded XML Marker, it seems very nice and has a free version so it's worth a try.
 

Attachments

  • marker.JPG
    marker.JPG
    275.8 KB · Views: 316
I've found and downloaded XML Marker, it seems very nice and has a free version so it's worth a try.

Indeed, it seems nice. It is not easy to work with all datas of Xml files.
I see "(Evalution)" in your screenshot, is it really free? :)

I wonder if we can see only tags we choose in the tables. Because, there are many tags for an unit.
 
Luckily if you go halfway down this page their version 1.1 is available free; it seems to have all the main features such as table editing.

Yes, I still can't view all tags at once due to the large numbers of tags. It looks like you can minimize the columns for tabs with the rightclick menu, and change their size by click-drag on the columns which helps a little. The main drawback is that you can lose sight of the row labels after scrolling across to see more tags.

Well I'm hoping this can make modding less of a pain.. let me know if you come across any good ones.
http://en.wikipedia.org/wiki/List_of_XML_editors

The nicest looking one I found so far is XMLSpy which I think is what Firaxis used to make the game, but that's not free.
http://www.altova.com/xmlspy/xml-grid-view.html
 
I will try those. Just adding a bunch of units and table editing would make it easier.
 
I have found a small problem using this.

This program replaces all indents with spaces (image 1). When using a tool as Winmerge to check changes all the lines are marked as changed due to that (image 2).

Also it's not clean if you edit the XML manually later.

I found this while revising the texts in our repository, now is not possible to have any control in new changes.



 
I have not understood the use of this programm anyways. :dunno:

A rich editor like Notepad++ or UltraEdit or PSPad or ... gives so many functions that this editor does not have.
(Diff / Compare, Merge, Different Search Options, Filtering, Automatic Indenting, Syntax Highlighting, Validation against Schema ...)

And escaping special characters is so incredibly easy.
Simply do "Search and Replace" over a complete directory.
You could also write a simple Script in Python or Pearl and run it over the files.

I have just cleaned up all German special characters in all files of Religion and Revolution and was done in a few minutes. :)

My advice to new modders:

Learn how to use a strong rich editor and you will not get into problems with XML in general or special characters at all. :)
 
now is not possible to have any control in new changes.
You can in your old files with notepad, replace all "\t" by " " <- four white-spaces.
You will have to do that once, after all my files will be with white-spaces. So you will see differences without any problems. :)

I have not understood the use of this programm anyways.
I smiled when I read your sentence.

When you wish to edit or create a text. You have two choice :

First you can use one of the rich editors you mentioned. You will have a result like that :
Spoiler :

How many times I did mistakes when I forgot to add the end tag, or when I forgot to add the / for one of languages tags, or when I did a wrong copy paste....
There are too many reasons to have a result like that :
Spoiler :


You can consider that my editor is useless, but I think you are wrong. I know well how to use notepad ++, and I know It is really maladjusted for the Xml texts of Civ.
 

Attachments

  • kwbjx.png
    kwbjx.png
    193.5 KB · Views: 602
  • oa13v.png
    oa13v.png
    128.6 KB · Views: 621
You can consider that my editor is useless, but I think you are wrong.

There is no "wrong" or "right" considering personal opinions. :)

If this works for you, that is great. :thumbsup:
 
I made this software in first for me :). So you are right !

There is no "wrong" or "right" considering personal opinions.
I disagree but it doesn't matter !

The most important is to use tools that allow us to simplify our life :p.
As long as you do not use BlockNote, I am happy ! :lol:
 
@raystuttgart

Simply do "Search and Replace" over a complete directory.
You could also write a simple Script in Python or Pearl and run it over the files.

This utility simply works for adding/replacing texts. And the work is well done without doubt.

Rich editors have more features but this simplifies the work. You have to know the code of all the special characters (there are list with them but then you you have to use other thing more), you have to know how to write scripts to replace the characters (I don't see the simplicity there, you need another thing more) and you have to be very careful when adding/copying tags so you don't miss any character.

Obviously if you know how to bypass those typical annoyances with scripts it's easy but having a utility which lets you copy the text of "English" into the other languages, add highlight colors and one or two more things with just one click is not that bad.

Neither this excludes rich editors nor rich editors exclude this. This seems to be a discussion about what is better: gui or command line... we know the answer.
 
You can in your old files with notepad, replace all "\t" by " " <- four white-spaces.
You will have to do that once, after all my files will be with white-spaces. So you will see differences without any problems. :)

I know that, just suggesting that the program should be changed to make that automatically. If we have to do that always, it would be more logical to just change the program if possible.
 
Top Bottom