RDN Wiki Home | Page Index | Recent Changes | Recently Commented | Users | Registration | Login:  Password:  

Dawn of War UCS file


The strings stored, loaded and used in Dawn of War are contained in. UCS files.

These files are simply text files, but Unicode (Like ASCII but can store more characters), and has a special header (which is detailed below).

The file is used to get strings into the game easily – from missions to cutscenes, to unit descriptions to race names.

UCS file layout and location

UCS files are located in the \Locale\LANGUAGE\ folder in a mod. There is a standard on in the Engine\Locale\LANGUAGE\Engine.ucs? for the User Interface (the main menu mainly), and the standard's game W40K UCS file in W40k\Locale\LANGUAGE\W40k.ucs.

These two files do not need extracting, and are loaded along with any mod-based ones when the game loads. Therefore: you must reload the entire game to see changes to the UCS file. The file also must not have conflicts with other UCS files loaded by the game. Any UCS conflicts will cause the game to crash.

The layout of a UCS file is as follows:

NUMBER Text goes here

For example:

301	Resolution
36006	Your troops are under attack.

Usually, you have a standard number (positive) and then a tab, then the text (with as many spaces, but no new lines) after this.

Numbers can a very large number, over 1,000,000. Do not use reservered Relic numbers (Expansions will add more to the W40k UCS). It has been stated that 15000000 – 20000000 are for mod use Here.

It is important that each new entry is on a new line. That the file is ordered in acending (1, 2, 3...) order, and that a space divides the number and the related text.

You cannot actually have new lines, but must create a new entry for each new line (for example, a new paragraph in mission briefing, or in a description of a unit).

Format and programs used

Now, the format is not entirely known. It is, however, a standard text file, and it has a special header.

If you use a program such as Textpad, when it resaves any changes to a UCS file you open, or if you just create a unicode text file from new, it will not work with the game (and display an error in the console).

But, simpler programs like windows Notepad will open it, and save it, without changes to this header. Therefore: use Notepad to open, edit, and save UCS files.

I personally find it much easier to use my text editor of choice (Textpad) and do a. TXT version of the file, then Copy and Paste into my UCS file I've opened in Notepad.

Creating a fresh UCS file

You must first find one of the Games original UCS files. Do not edit the games original UCS files directly which will likely not help patching, and finding backups off your CD without reinstalling would be hard.

Open the games English version of the W40k.ucs will be described here:

Now, you can create a fresh one by doing these steps:

If you don't delete the entire contents, it might go wrong. Of course, you are free to experiment, but don't resave over the original W40k.ucs file! You have been warned.

Adding information to your UCS file

This can be done in two major ways. My perferred method is copying text from a. TXT file you can edit with any program, and replacing the entire contents of your current UCS file. This means your UCS file never gets corrupted and unreadable by Dawn of War:

This should mean you can edit your TXT file and not accidentily use a program that removes the header information Dawn of War needs. Remember that the UCS file is unicode, so you can have your TXT work in Unicode to do many more characters then normal for all languages.

The other method is editing the UCS file directly. This way is harder because Notepad doesn't have many features that make it easy – such as changing the tab length, or searching easily.

Remember: Keep a backup of any UCS and TXT files you make. You do not want to lose hundreds of lines of text just because you accidentily pressed delete and saved it

Error checking

There are some errors that come up due to misuse of the UCS file:

Ways around using the UCS file

In some cases in the game, although untested by me, you can have strings localised in the actual files that would normally reference them. IE: You can have “This is a new upgrade” inside an attribute LUA. Put the text in place of any $Number 's, so "$40000” becomes New test string:

GameData["ui_ext"]["ui_info"]["help_text_list"]["text_01"] = "$40000"
GameData["ui_ext"]["ui_info"]["help_text_list"]["text_01"] = New test string

You can do it in SCAR and NIS files too, when you reference a UCS number, put text, in quotes, in its place.

Drawbacks of this is that it is very hard to many strings at once, and the fact you'd never be able to have translated versions. Using UCS files, you could possibly even run a translator program on a UCS file to get a basic (abheit bad) translation for other languages. Using

Language localisation

Dawn of War supports mods with multiple language translations.

You have to simply have the new sounds, and UCS file, in a language sub-folder of the Locale folder. In my case, it is Locale\English.

These are language names you can use in the Locale folder that I know of:

Of course, if you play a German version of the game but only have sounds in the English locale folder, they won't play in the German version. Obviously, releasing lots of cutscene voiceovers in many languages would take a lot of space. Using seperate downloads for each language would be easier, keeping the UCS file for each one is a good idea however.

If you don't plan to translate the UCS files, then copying your original language UCS file into each folder as a placeholder is worthwhile, else you might not be able to load it in anything but your original language (untested).


UCS Range List (Adeptus Modificatus Forums)

End of Page

Referring pages: DOWFileFormats

There are no files on this page. [Display files/form]
There is no comment on this page. [Display comments/form]