How to use Mike.nl's StringEditor
(A tutorial written by Fynbos for the Empire at War modding community.)
So, you want to edit the texts (.dat-files) of EaW?
Maybe want to add some texts for your units?
Or even translate it into another language?
Here is how you do it...
- Start & Creating a File
- Adding & Editing Ttexts
- Adding & Importing Languages
- Exporting to .DAT
- Tips and Tricks
Start & Creating a File
- Download Mike.nl's String Editor here: http://alpha1.dyns.net/eaw/
- Unzip and put it somewhere, where you'll find it again. (Desktop?)
- Start the program by clicking the StringEditor.exe
- You should see this screen:
- Now, if you want to start a new file (when you are using the program the first time, for example) just click the "New Document" button.
(Or use the "File" menu...)
- A window pops up:
- Now you have to select 2 things:
- The language you want to do (make that the one you play EaW in, you can add others later)
- The type of index the program uses for sorting your text.
- Select "Name" if you want to make a file which has the normal texts (like unit descriptions or planet names).
- Select "Index" if you want to make a credits-file. (Like the credits of EaW).
- We for now will only look into the first option: Making & changing the texts of EaW (and your mod).
I will do a how-to for the Index-sorting later
- So, please select
- your language (for example "English USA")
- Index type: Name (it is selected by default).
- Click OK and it should look like this:
- Ok, now we need to import the texts you already have. You have some allready, they are in your Empire at War installation included.
So, click on "File" in the top menu and then on "Import".
- Now, select the file you want to import. It is your language-specific .DAT-file.
For example, like here, if you have an English version of EaW you will look for the "MasterTextFile_ENGLISH.DAT".
You can find it in the \Empire at War\Gamedata\Data\Text\ directory of your installation.
- Click the file and open it.
Now, for a second, the program should import it and stand still while doing it.
(The faster your PC is, the faster it is done...)
When it has imported the file, the screen will look like this:
- Everything ok so far? Good.
You may want to save your work now.
- Tell the program where to save.
What is this?
And here is the first best thing of this program in oposite the old one:
You can save comments and you can different versions, you even can save the name
of the person who worked on the file.
Some Mod-Teams work with different people at the same time.
Ok, back to the program...
The problem so far was, that you could not add comments or tell the changes if you saved a .DAT.
Not even to mention that it was impossible to work with version-history.
But this is solved now, because Mike.nl (the programmer, I just did the beta-testing) made up a new file format, that includes all the versions.
Thats the .vdf-file. (VDF stands for "versioned dat file")
And out of this single file you can then export all the languages you want.
And every time you save, it goes up one version number and remembers the changes so that you can also undo them.
Great, huh? :)
- Now, just enter your name or nick.
And for future reference you should add a comment, that says what you did or changed.
- Hit "Save" and it is saved. :)
(Saving might take a second, depending on your computer.)
Adding & Editing Texts
Now we want to look into the editing of some of the texts.
- Lets say you did a mod and you have a great new unit for the game.
You finished all the things needed (model, coding, icons...) and the only things missing are the texts for the unit.
In your XMLs you will probably have some lines like this:
If not: Those are the lines you need to give a unit in Empire at War a tooltip, a name and a class description.
Now you want to add the texts for it to the game.
- Click on "Insert String" in the "Edit" menu.
- The program will jump to the end and automaticly select quot;(New string here)".
- Now you first have to understand what is what in a string a string is a whole row containing all information EaW needs).
- The name is the most important part. It has to be unique, because it is the calling key EaW looks for.
- The value contains the text that is shown in the game.
(This text is different form language to language, like "Star Destroyer" in English and "Sternenzerstörer" in German.)
- The comments, whatever you put in there is not shown in the game.
- The date on what this string was modified last.
Ok, now lets add the text for the unit tooltip of our quot;Great New Unit". ;)
(You can jump from field to field by using the Tabulator-Key.)
Add the name, which is the key from your XML-codes
Add the value, which is the text you want to see ingame.
Add, if you want, a comment; whatever you want to have in there.
It will look like this:
- After you finished the line, you can add another one.
Just double click again on "(New string here)" and enter the next string...
Adding & Importing Languages
Ok, so far you know how to make a VDF-file and how to edit strings. Now we want to add a second language.
- Click on "Language" and then on "Add Language".
- Select your new language and click "OK".
- Notice, that the program now added a second language and selected it in the "Language:"-drop down menu in the top right.
- Also notice, that the values of the new language are left blank.
(That's normal, because the program cannot translate languages of course. It's an editor).
So, what we want to do now is to import the new language.
(If you don't have 2 languages, you should ask around in your modteam for example.
Or in boards. Please understand that I don't want to get into trouble with the law and
cannot make all language files as download availble, even if I have them)
For this you need to have a second language file from EaW, of course.
- Make sure, the new language is selected.
Same way to do as at your first import (Step 11).
Click on "Import" in the "File" menu and select the language you want to import.
- After clicking on "open" a new window pops up that looks like this.
- You have 3 options to choose, that explain themselves.
We now need "Union" with "Overwrite" activated.
- "Union" is for a new import that would merge with the existing strings with the sub-option
[X] overwrite or not what is allready in there
- "Intersection" means that the program will compare both files and delete everything that is in the VDF and not in the importing file.
- "Difference" means that the program will compare both files and delete everything that is in the VDF and also in the importing file.
This is the default setting, so just hit "OK".
It now should take a second and then show the new imported values:
- Now all you have to do is to edit those strings you added, because they could not be imported from the original file, of course.
Double click it, jump to the "Value:" field, edit the text there to the new language (translate maybe) and, if you want,
change the comment as well.
- Don't forget to save sometimes.
Remember: You got versions. It doesn't matter what you do, since all changes can be reversed.
Exporting to .DAT
Well, at some point you have done all your editing, adding and changing and want to use the new texts in the game. Nothing easier than that.
- You have your file opened.
Now click on "File" and then on "Export":
- You will see a window that asks you for 3 things:
- The "Base Name"
- The language specific naming of the files.
Note: It only shows the languages you have done. If you only have English done, there will be only one line...
- And which languages you want to export (default: all selected)
Mike.nl coded the whole program as user friendly as possible.
That means, that he also coded the system to automatically know the correct endings of the files.
(In EaW all .DAT files end with "....._<LANGUAGE>.dat", no matter if it is the credits file or the master_language file.)
- All you have to do now, is to select the directory where to you want to extract the .dat-file(s) to and enter the name for it.
ATTENTION! You only have to enter the prefix!
That means, you only have to enter "MasterTextFile" into the "Base name" line.
- Click ok and the program will export the files.
(That might take longer than a second, depending on your computer and the amount of languages.)
Tips and Tricks
- There are a lot of tricks which will help you in using this little program the most efficient way.
Here are some I can think of (mainly because I demanded many of them, hehe):
Use the keyboard!
Most of the program things can be done by keyboard only. You are faster hitting
INSERT-key instead of using the mouse, clicking on the menu and select insert.
The program can sort your strings, if you click on the column-names.
That way you can easily the not edited strings, for example, by just clicking on
Switch languages by ALT-Left or ALT-Right!
When you are translating strings, and maybe want to look up what was written in
another language, all you have to do is to cycle through with the ALT-direction
keys. And if you switch back to the one you edited, the cursor will be in the
same field at the end where you started.
Use the comments field!
The comments field is a very powerfull extra, that will help you to keep track
of your changes.
I am using a version for UEAW that is at v43 so far, edited by 6 people...
It would be horrible without the possibility of documentation in the file...
Search, search, search!
The program has a fully operational search, even functioning CTRL-F.
So why the frack are you still scrolling???
The main reason why I bugged Mike.nl to code a new dat-editor.
Finally it has copy paste and even copy paste more then 1 line ;)
EaW cannot handle all types of letters and Mike.nl took credit to it, when he
added a warning sign that indicates a wrong entry.
But since there are some users who do not look on that, there is also a
search-function for invalid entries.
Quite handy, if some of your modder mates mess tried to add arabic or chinese
The details-menu (File -> Details) gives you some interesting info on your file.
Version infos for example...
Last update: 13-Sep-06 23:40h
This website is a tutorial on EaW - Lucas Arts Empire at War modding.
It contains names and rights protected by laws for their legal owners.
The program needed for it is the StringEditor from Mike.nl
Please contact me on any mistake you have found, regardless of what error it maybe: Fynbos (at) kernwaffe (dot) de
This tool is used, for example, on Ultimate Empire at War