PDA

View Full Version : new tool to change texts in the game


Dusan
04-01-09, 10:26
Here's yet another tool I've written for TRU:
ImportTRULang which makes it possible to replace texts in the game.

Here it is: ImportTRULang1.3.zip (http://www.volny.cz/pavlicd/ImportTRULang/ImportTRULang1.3.zip)
And the C# source code for those interested: ImportTRULang1.3Src.zip (http://www.volny.cz/pavlicd/ImportTRULang/ImportTRULang1.3Src.zip)

Usage: ImportTRULang <lang_file> <orig_bigfile000> <new_bigfile000>
[-<lang_code>]

Example: ImportTRULang CC33584E_0.txt patch.000 patch.000.new -cz

Replaces the existing language data inside TRU bigfile.000 or patch.000
with the language data provided in the format generated by UnpackTRU.

The optional language code identifies the language pack to be replaced:
-en ... English (default) -demo-en ... English (TRU DEMO)
-fr ... Francais -demo-fr ... Francais (TRU DEMO)
-de ... Deutsch -demo-de ... Deutsch (TRU DEMO)
-it ... Italiano -demo-it ... Italiano (TRU DEMO)
-es ... Espanol -demo-es ... Espanol (TRU DEMO)
-nl ... Nederlands -demo-nl ... Nederlands (TRU DEMO)
-pl ... Polski
-cz ... Cesky
-hu ... Magyar
-ru ... Russian

Since the program is written in C# you'll need Microsoft .NET Framework (http://www.microsoft.com/downloads/details.aspx?familyid=333325FD-AE52-4E35-B531-508D977D32A6&displaylang=en) to run it.

The workflow is as follows:

1) Use my program UnpackTRU (http://www.tombraiderforums.com/showthread.php?t=142318) to export the language files from the game:
UnpackTRU bigfile.000 -lang
Pick the English language file (7CD333D3_*.txt).

2) Make changes to the texts in that file. Each text entry is surrounded by brackets. You can change the text inside the brackets the way you want, just make sure not to delete any entries or to change their order.

3) Rename bigfile.000 to bigfile.000.orig or something like that.

3) Use ImportTRULang to rebuild the TRU bigfile using the edited version of the language file (7CD333D3.txt):
ImportTRULang 7CD333D3.txt bigfile.000.orig bigfile.000
This command uses bigfile.000.orig as the source and generates a new file bigfile.000.

4) Run the game to see the changes you've made.

If you updated the game to v1.1 (using the official patch), then instead of working with the file bigfile.000, you need to work with the file patch.000 which contains an updated version of the the text files:
ImportTRULang 7CD333D3.txt patch.000.orig patch.000

The nice thing about the patched version of TRU is that when you rebuild the file patch.000 with ImportTRULang, it's only 20 MB of data (a matter of seconds) while if you rebuild the original (unpatched) bigfile.000, it's approx. 2 GB of data that has to be generated each time you want to change something. So my advice is to update to TRU v1.1 and work with the much smaller file patch.000.

I'm posting a few screenshots with Czech translations of some texts in the game that I made for testing purposes. I don't expected anyone here to appreciate my Czech translations :), this is just to demonstrate that it actually works :)

http://www.volny.cz/pavlicd/ImportTRULang/translation1.jpg

http://www.volny.cz/pavlicd/ImportTRULang/translation2.jpg

http://www.volny.cz/pavlicd/ImportTRULang/translation3.jpg

zipper
04-01-09, 10:29
:yik: WOW! :tmb:

Laras man
04-01-09, 11:05
AMAZING!! :D Thank you! :hug:

deskj
04-01-09, 11:58
cool :P
dusan, u'r from Czech Republic? i didn't know the game was not translated in Czech, what an injustice O.

tomblover
04-01-09, 12:17
Oh, I would LOVE to make a Swedish translation but I don't have the game for PC. :(

Axelia
04-01-09, 13:09
Here's yet another tool I've written for TRU:
ImportTRULang which makes it possible to replace texts in the game.

Here it is: ImportTRULang1.0.zip (http://www.volny.cz/pavlicd/ImportTRULang/ImportTRULang1.0.zip)
And the C# source code for those interested: ImportTRULang1.0Src.zip (http://www.volny.cz/pavlicd/ImportTRULang/ImportTRULang1.0Src.zip)

Since the program is written in C# you'll need Microsoft .NET Framework (http://www.microsoft.com/downloads/details.aspx?familyid=333325FD-AE52-4E35-B531-508D977D32A6&displaylang=en) to run it.

The workflow is as follows:

1) Use my program UnpackTRU (http://www.tombraiderforums.com/showthread.php?t=142318) to export the language files from the game:
UnpackTRU bigfile.000 -text
Pick the English language file (7CD333D3_*.txt).

2) Make changes to the texts in that file. Each text entry is surrounded by brackets. You can change the text inside the brackets the way you want, just make sure not to delete any entries or to change their order.

3) Rename bigfile.000 to bigfile.000.orig or something like that.

3) Use ImportTRULang to rebuild the TRU bigfile using the edited version of the language file (7CD333D3.txt):
ImportTRULang 7CD333D3.txt bigfile.000.orig bigfile.000
This command uses bigfile.000.orig as the source and generates a new file bigfile.000.

4) Run the game to see the changes you've made.

If you updated the game to v1.1 (using the official patch), then instead of working with the file bigfile.000, you need to work with the file patch.000 which contains an updated version of the the text files:
ImportTRULang 7CD333D3.txt patch.000.orig patch.000

The nice thing about the patched version of TRU is that when you rebuild the file patch.000 with ImportTRULang, it's only 20 MB of data (a matter of seconds) while if you rebuild the original (unpatched) bigfile.000, it's approx. 2 GB of data that has to be generated each time you want to change something. So my advice is to update to TRU v1.1 and work with the much smaller file patch.000.

I'm posting a few screenshots with Czech translations of some texts in the game that I made for testing purposes. I don't expected anyone here to appreciate my Czech translations :), this is just to demonstrate that it actually works :)

http://www.volny.cz/pavlicd/ImportTRULang/translation1.jpg

http://www.volny.cz/pavlicd/ImportTRULang/translation2.jpg

http://www.volny.cz/pavlicd/ImportTRULang/translation3.jpg

wohoooooo dalsi cech :yah:

Dusan
04-01-09, 13:11
cool :P
dusan, u'r from Czech Republic? i didn't know the game was not translated in Czech, what an injustice O.
Yes, I am :).
Actually, there is an official Czech translation available.
I bought the English version before the Czech translation was in stores because I prefer the English version and I didn't want to wait any longer...
So, technically speaking, there's no need to make yet another Czech translation because there's already the official one.
But I just wanted to demonstrate how my program works so I decided to translate a few bits of text to Czech myself, just for the fun of it :).

Dusan
04-01-09, 13:12
wohoooooo dalsi cech :yah:
Haha, jo jo, uz je to tak :)

Sir Croft
04-01-09, 14:15
Sweetness! I'll try it now! :D

Larson_1988
04-01-09, 14:50
Oh, I would LOVE to make a Swedish translation but I don't have the game for PC. :(

I might just try this out and edit it to norwegian. :D

deskj
04-01-09, 15:38
Yes, I am :).
Actually, there is an official Czech translation available.
I bought the English version before the Czech translation was in stores because I prefer the English version and I didn't want to wait any longer...
So, technically speaking, there's no need to make yet another Czech translation because there's already the official one.
But I just wanted to demonstrate how my program works so I decided to translate a few bits of text to Czech myself, just for the fun of it :).
lol it seems to be a cool language :D i've been to Prague and Bohemia some years ago :p

btw at least this could be usefull to correct some subtitle mistakes :P
in the italian version there is a very serious one (of subtitle and dubbing too), i cannot tell what it is 'cause it's a shame =_=

Laras man
04-01-09, 16:09
Mine crash!:( Whats my problem? It says ImportTRULang Stopped working

Mrs_Bean
04-01-09, 16:23
Chytre ceske hlavicky! :jmp:

Amazing!! :tmb:

Dusan
04-01-09, 17:37
in the italian version there is a very serious one (of subtitle and dubbing too), i cannot tell what it is 'cause it's a shame =_=
Ooops :)

Dusan
04-01-09, 17:38
Mine crash!:( Whats my problem? It says ImportTRULang Stopped working
Did you install Microsoft .NET? There's a link in the very first post.

Dusan
04-01-09, 17:39
Chytre ceske hlavicky! :jmp:
Amazing!! :tmb:
Chytre hlavicky, zlate rucicky, to jsou cesti inzenyri :D

not again!
04-01-09, 17:50
Great! :tmb:

Laras man
04-01-09, 17:56
Did you install Microsoft .NET? There's a link in the very first post.
Yes

mizuno_suisei
04-01-09, 18:20
Would be awesome if you made this TRL and TRA Compatible :tmb:

Dusan
04-01-09, 18:50
Yes
And what OS do you have? Windows Vista?
This is most likely Vista-related error. I don't think there's anything wrong with my program. I searched "program stopped working in vista" on Google and found a lot of pages discussing this particular problem.
You probably need to run the program in Win XP SP2 compatibility mode.
See this link, for example:
http://forums.cnet.com/5208-12546_102-0.html?forumID=133&threadID=251860&messageID=2511842
I can't help you more on this since I don't have Windows Vista myself (for good reasons :)).

EDIT:
Yet another link I found that may be useful:
http://ablestmage.wordpress.com/2008/01/25/disabling-vistas-dep-data-execution-prevention/

terrorix
04-01-09, 21:09
Hi Dusan,

Applied official patch v1.1 of TRU.
I trying to export text from ENG version and everything is OK.
Trying export texts from PL/CZ/HU version (also with applied patch 1.1) but no txt files was extracted.
Then i try to compile UnpackTRU from source codes and uncomment method ProcessUnknownInBigfile to save also unknown files, and when i view content of this unknown file, there are some texts from game(in czech lang), but also other binary data, i think it is mix of 2 or more different files.

Here is ZIP (http://www.freewebs.com/terrorix/files/tru/tru_plcz_patch_text.zip) where are 3 unknown files (one for each language) which are exported from PL/CZ/HU version of patch.000.

Can you check it where can be problem and fix it if you can?

Dusan
05-01-09, 06:02
Hi Dusan,

Applied official patch v1.1 of TRU.
I trying to export text from ENG version and everything is OK.
Trying export texts from PL/CZ/HU version (also with applied patch 1.1) but no txt files was extracted.
Then i try to compile UnpackTRU from source codes and uncomment method ProcessUnknownInBigfile to save also unknown files, and when i view content of this unknown file, there are some texts from game(in czech lang), but also other binary data, i think it is mix of 2 or more different files.

Here is ZIP (http://www.freewebs.com/terrorix/files/tru/tru_plcz_patch_text.zip) where are 3 unknown files (one for each language) which are exported from PL/CZ/HU version of patch.000.

Can you check it where can be problem and fix it if you can?
It's because the language files are detected by their hashcode (hard-coded) and the hashcode is different in the PL/CZ/HU version of the game so the program doesn't find anything.

Thanks for the language files you uploaded.
I released an updated version of UnpackTRU (v1.8) that should also be compatible with the PL/CZ/HU version of TRU.
Download it and try it:
http://www.tombraiderforums.com/showthread.php?t=142318

I'll release an updated version of ImportTRULang later.

terrorix
05-01-09, 07:31
It's because the language files are detected by their hashcode (hard-coded) and the hashcode is different in the PL/CZ/HU version of the game so the program doesn't find anything.

Thanks for the language files you uploaded.
I released an updated version of UnpackTRU (v1.8) that should also be compatible with the PL/CZ/HU version of TRU.
Download it and try it:
http://www.tombraiderforums.com/showthread.php?t=142318

I'll release an updated version of ImportTRULang later.

Thanks again, i'll try it later this evening if it works, and i'm also waiting to updated version of ImportTRULang .

Neteru
05-01-09, 13:45
Despite the nature of the thread, please confine posting to English, so as not to exclude other members.

Thanks.

Dusan
05-01-09, 16:54
Despite the nature of the thread, please confine posting to English, so as not to exclude other members.
Thanks.
Ok, I will.
Those few sentences we exchanged in Czech did not contain any "useful" information anyways, they were basically just greetings :)

Axelia
05-01-09, 21:24
Chytre hlavicky, zlate rucicky, to jsou cesti inzenyri :D

aspon nekde jsou ja uz mela pocit ze jsou kolem vsichni uplni blbci tak jsem za vas rada :)

Medved
06-01-09, 01:37
What about Russian (RU) version support? Because it doesn't work on it...

Dusan
06-01-09, 05:46
Hi Axelia,
the moderator asked us to use only English (no Czech) so that everyone can understand it...

aspon nekde jsou ja uz mela pocit ze jsou kolem vsichni uplni blbci tak jsem za vas rada :)

Well I sometimes have the same feeling which can be rather depressing :) Thanks for the kind words :jmp:

Axelia
06-01-09, 06:32
Hi Axelia,
the moderator asked us to use only English (no Czech) so that everyone can understand it...



Well I sometimes have the same feeling which can be rather depressing :) Thanks for the kind words :jmp:

Oh sorry but thats not really important so nobody missed anything :D

Dusan
06-01-09, 06:33
A new version is available that now supports the PL/CZ/HU language version of TRU too.
See the first post.

Dusan
06-01-09, 06:38
Oh sorry but thats not really important so nobody missed anything :D
Well I know but anyway... ;)

Dusan
06-01-09, 06:41
What about Russian (RU) version support? Because it doesn't work on it...
Well, I don't know where to get the Russian version in the first place...
I'd have to install it, quickly analyze it and then I can release an updated version of my program.

terrorix
06-01-09, 07:03
Well, I don't know where to get the Russian version in the first place...
I'd have to install it, quickly analyze it and then I can release an updated version of my program.

Or someone can install Russian version, apply patch 1.1 on it, and upload patch.000 (which is about 40MB) on some place on web, and you can download and analyze it.

Dusan
06-01-09, 07:43
Or someone can install Russian version, apply patch 1.1 on it, and upload patch.000 (which is about 40MB) on some place on web, and you can download and analyze it.
Yes, that's also an option :)

tomblover
06-01-09, 09:24
I might just try this out and edit it to norwegian. :D Or I might have to go arr! :p

No, not really, I CBA to wait for such a big download. :vlol:

terrorix
06-01-09, 09:53
Hi Dusan,

when i export CZ language texts there are incorrect encoding i think. Because when i reimport cz lang txt file to eng patch.000 and run game there are incorrect chars like č, , ...

See images:
http://www.freewebs.com/terrorix/images/tru_cz01.jpg

terrorix
06-01-09, 10:46
I looking on source code in file TextParser.cs and i rewrite this method:
public static string ReadString(BinaryReader input)
{
List<byte> buffer = new List<byte>();
while (true)
{
byte d = input.ReadByte();
if (d == 0)
{
break;
}
buffer.Add(d);
}

return Encoding.UTF8.GetString(buffer.ToArray());
}

And now encoding of exported text files are OK with chars like č, , ...
But when i import this newly generated text file with ImportLang tool then it is not functional in TRU. Im also trying to figure out what to change in source codes of ImportLang tool, but cannot find the right place.

Can you figure out this change and if is ok, can you make such changes to ImportLang tool to be successfully imported to patch.000 file.

Thank again Dusan for great job!

terrorix
06-01-09, 14:17
I looking on source code in file TextParser.cs and i rewrite this method:
public static string ReadString(BinaryReader input)
{
List<byte> buffer = new List<byte>();
while (true)
{
byte d = input.ReadByte();
if (d == 0)
{
break;
}
buffer.Add(d);
}

return Encoding.UTF8.GetString(buffer.ToArray());
}

And now encoding of exported text files are OK with chars like č, , ...
But when i import this newly generated text file with ImportLang tool then it is not functional in TRU. Im also trying to figure out what to change in source codes of ImportLang tool, but cannot find the right place.

Can you figure out this change and if is ok, can you make such changes to ImportLang tool to be successfully imported to patch.000 file.

Thank again Dusan for great job!

I think it can be only in ASCII ? Then i write some code to remove non-standard ascii chars from texts. Is that true?

Dusan
06-01-09, 16:41
I believe the true reason why characters with Czech diacritics are not rendered properly is that the two versions of TRU use different fonts. So the Czech characters such as ř, , č etc. are simply missing in the EN font.

EN version:

http://www.volny.cz/pavlicd/tru/font_en.png

PL/CZ/HU version:

http://www.volny.cz/pavlicd/tru/font_pl.png

terrorix
06-01-09, 18:59
I believe the true reason why characters with Czech diacritics are not rendered properly is that the two versions of TRU use different fonts. So the Czech characters such as ř, , č etc. are simply missing in the EN font.

EN version:

http://www.volny.cz/pavlicd/tru/font_en.png

PL/CZ/HU version:

http://www.volny.cz/pavlicd/tru/font_pl.png

Thanks, and is font also embedd in bigfile or not ? I thing about replacing font file from CZ version to ENG version.

terrorix
06-01-09, 19:20
I created setup tool which import czech lang to ENG version of TRU using Dusan's tools. You can download it from here:
http://www.freewebs.com/terrorix/files/TRU_Czech.zip

Dusan
06-01-09, 21:43
^Thanks.

The font files are:
EN: B3AAAFD6_0_006D.dds.bmp
PL: DD8A64DB_0_006D.dds.bmp
(as extracted by UnpackTRU from bigfile.000 and/or patch.000)

They are PCD9/DDS textures stored inside of (C)DRM packages B3AAAFD6 and DD8A64DB respectively. Replacing the entire (C)DRM package may be a way rather than changing the font within the package.

Replacing the CDRM package is technically the same thing as replacing language files (they are just a different type of packages within the bigfiles) so you can try it if you want.

terrorix
07-01-09, 06:34
For now, i create setup which replaces czech text without diacritics and i think it is good enought for players to understand to game. Later if i have a time i can try to do your way. Anyway thanks again!

terrorix
07-01-09, 09:11
Updated version of TRU_Czech version v1.2

http://rapidshare.com/files/180865425/TRU_Czech_v1.2.ZIP

Dusan
09-01-09, 16:26
A new version 1.2 of ImportTRULang is out, one that now supports Russian language version of TRU as well.

Are there any other language mutations of TRU than these three already supported?

1) English/French/German/Italian/Spanish/Dutch
2) Polish/Czech/Hungarian
3) Russian

Zebra
11-01-09, 03:11
Very cool :tmb:!
Now we only need a tool to replace sound files :D.

igor32
21-01-09, 02:17
What about portuguese?! [PT-br and Pt-pt]

They are ready for editing? :X

Dusan
21-01-09, 05:33
What about portuguese?! [PT-br and Pt-pt]

They are ready for editing? :X
Not yet. I didn't know such version even exists.
I'll try to get it and make my program compatible with it...

TeArS
01-07-09, 09:12
can we edit subtitle ?

Dusan
02-07-09, 19:03
can we edit subtitle ?

Unfortunately not. Subtitles are stored inside the MUL audio files and there's no available tool to change those.

tlr online
02-07-09, 19:51
Another fantastic contribution. Thank you Dusan. :tmb:

Amairtil
03-07-09, 04:33
Wow! Awesome job:tmb:

But it seems not suitable for Chinese or other Asian languages.

I've tried to edit it in Chinese and it's shown as "Invalid UTF-8 encoding."
http://farm3.static.flickr.com/2434/3683211321_59a58f001f_o_d.jpg

I don't know if I did something wrong.

Dusan
04-07-09, 17:49
I assume that for Asian languages you'd need Asian version of TRU (I don't know if it even exists) with Asian fonts etc. ...

herothing
04-07-09, 19:54
Dusan; i actually love you. :jmp:

Amairtil
05-07-09, 02:25
There's a Japanese version. That may be short of Chinese Characters. I've already given it up. However,thank you very much.:)

melancholy05
05-07-09, 14:05
I want to know that how to make a Chinese version.....:confused:

TeArS
07-07-09, 14:32
Unfortunately not. Subtitles are stored inside the MUL audio files and there's no available tool to change those.

thank you for reply Dusan;

Maybe we can find or write MUL file editor :)

lildark7
17-07-09, 17:47
Omg, thanks so much Dusan.
I'm going to play the game a 3rd time but now in Russian!!
:)

Dusan
17-07-09, 21:04
Omg, thanks so much Dusan.
I'm going to play the game a 3rd time but now in Russian!!
:)
Are you sure it is possible? You'd have to replace the font file first, for instance.
I know there's an official Russian version of TRU with Russian dubbing :).

ClaudioLopez
26-07-09, 16:35
I know that the dialogues are together with the MUL files.
Dusan is some progress on the edition of that dialogue.

I am from Brazil and formed a team to translate the game, have translated all text file 7CD333D3.txt, but no dialogue was translated.


I know that there are few dialogues, page below with all the dialogues of the game:
http://www.tombraiderhub.com/tr8/dialogues.html

We would like to make a complete translation, seeing that so lack these dialogues.

One more thing to file A58F6E5C_0.other there is a dialogue,
is to import this file??

hugs and congratulations.

alinehtinha
26-07-09, 17:50
I know that the dialogues are together with the MUL files.
Dusan is some progress on the edition of that dialogue.

I am from Brazil and formed a team to translate the game, have translated all text file 7CD333D3.txt, but no dialogue was translated.


I know that there are few dialogues, page below with all the dialogues of the game:
http://www.tombraiderhub.com/tr8/dialogues.html

We would like to make a complete translation, seeing that so lack these dialogues.

One more thing to file A58F6E5C_0.other there is a dialogue,
is to import this file??

hugs and congratulations.

:( CludioLopez, already I received the email of DUSAN and he already answered us! He said that "subtitles plows part of MUL (audio) cadge.There plows in the available tools it to you edit the MUL you cadge. Because of that TRUsubtitles cannot be changed". Done not it stay very happy with the answer, but we are going to go trying, who knows we obtain?!

Dusan
26-07-09, 19:27
I know that the dialogues are together with the MUL files.
Dusan is some progress on the edition of that dialogue.

I am from Brazil and formed a team to translate the game, have translated all text file 7CD333D3.txt, but no dialogue was translated.


I know that there are few dialogues, page below with all the dialogues of the game:
http://www.tombraiderhub.com/tr8/dialogues.html

We would like to make a complete translation, seeing that so lack these dialogues.

One more thing to file A58F6E5C_0.other there is a dialogue,
is to import this file??

hugs and congratulations.

Hi,
mul2wav is DarkFader's program that seems to be no longer actively developed.
DarkFader never released the program's source codes for other programmers to continue working on it instead of him.
I personally don't know the format of the MUL files so I cannot write any tools for them.

The file A58F6E5C_0 seems to only contain subtitles for the short cutscene summarizing the story from Legend.
So from the point of view of Underworld it's not really important.

rythm07devine
29-08-09, 16:02
Hi nice work this was just what i was looking for ...thanx for that

I extracted the language text files edited them. but how do i inject them back to the bigfile.000 ImportTRUlang is not working in my system. a cmd window is flashing and i am back to my desktop ..
I am on vista 32bit. and i have .netfeamework 3.5 installed.
can any one help me to make this programme work (ImportTRUlang.exe)
any help will be appreciated

Dusan
29-08-09, 17:53
Hi nice work this was just what i was looking for ...thanx for that

I extracted the language text files edited them. but how do i inject them back to the bigfile.000 ImportTRUlang is not working in my system. a cmd window is flashing and i am back to my desktop ..
I am on vista 32bit. and i have .netfeamework 3.5 installed.
can any one help me to make this programme work (ImportTRUlang.exe)
any help will be appreciated

ImportTRUlang.exe is a command line program.
You need to open a command line window (console) first.
In Windows, use Start > Run and then type cmd. A black window should appear.

http://pathartl.com/wp-content/uploads/2009/07/startCMD.png

Inside of the command line window you need to change the current directory to the directory in which your TRU big files are stored (using the cd DOS command).

rythm07devine
30-08-09, 11:41
Many many thanks for the help ..
you rock man ..

Jiminito
14-02-10, 17:43
Could someone please post or send me the English text translations. I have a Hungarian version but I can't find the English translations anywhere.

Thanks.

who_jimmy@yahoo.ca

almayah
16-02-10, 11:52
Omg!!!!
Awesome

Dominic_raider
16-02-10, 12:18
This is amazing. Dusan you are the God of TRU tools. Thank you very much!

TRBFAN
10-07-10, 17:46
Thank you Dusan it's working :)

Dusan
11-07-10, 08:20
After some investigation I managed to transform the "garbage" into series of hex-codes...

For example, this portion of "text":
Ýð Ă‘‚õúÑƒĂ‘‰ĂµĂĽ

can be transcribed in hex-codes as:
C3 90 C2 9D
C3 90 C2 B0
20
C3 91 C2 82
C3 90 C2 B5
C3 90 C2 BA
C3 91 C2 83
C3 91 C2 89
C3 90 C2 B5
C3 90 C2 BC
20


(20 stands for a space between words)

I structured the output like this because I think each character is represented by 4 codes since the pattern "C3*C2*" is always present there for every character (?).
It is also interesting to notice that the 2nd value in the quadruplet is always 90 or 91...

But anyway I don't know how to convert these codes to Russian alphabet, sorry :(.

I went through a number of existing Cyrillic encodings that I found on the internet but none of them seems to be directly applicable.

zsolt
12-07-10, 09:55
http://www.tombraiderforums.com/showpost.php?p=4621061&postcount=10

If anyone makes a rough translation, I'll check Underworld compatibility.

Dusan
15-07-10, 19:37
Update: version 1.3

ImportTRULang now also supports TRU Demo (also download UnpackTRU v3.95 (http://www.tombraiderforums.com/showthread.php?t=142318)).

There are new language codes available:
-demo-en
-demo-fr
-demo-de
-demo-it
-demo-es
-demo-nl

Jojos
16-07-10, 17:09
http://www.tombraiderforums.com/showpost.php?p=4621061&postcount=10

If anyone makes a rough translation, I'll check Underworld compatibility.

Im brazilian and i tryed years ago translating tr legend but it was so huge i couldnt do it alone myself, after translating 1 million files, my eyes were the hell tired and i just got headache everyday so i gave the job to other ppl to do.

Id like to translate tr underworld but is it that hard....?

Otherwise ill just give up because its too much time i put on it all by myself when im very busy woman, im just a fan anyway...

Topacio
13-08-10, 14:35
A question: If isn't ilegal change the game texts in the crystal's games, in core's games isn't ilegal too?

Bye bye :)

zsolt
13-08-10, 14:43
A question: If isn't ilegal change the game texts in the crystal's games, in core's games isn't ilegal too?

Bye bye :)

It is depending on games' EULA.

Topacio
13-08-10, 14:58
It is depending on games' EULA.

In the trl, tra and tru EULA english file said this:


2. Restrictions
You are not permitted:
(a) to load the Software Product on to a network server for the purposes of distribution to
one or more other computer(s) on that network or to effect such distribution;
(b) except as expressly permitted by this EULA and save and to the extent in the circumstances expressly permitted by applicable law, to rent, lease, sub-licence, loan, exploit for profit or gain, copy, modify, adapt, merge, translate, reverse engineer, decompile, disassemble or create derivative works based on the whole or any part of the Software Product or use, reproduce or deal in the Software Product or any part thereof in any way.


And in this forums isn't ilegal this :confused:

Bye bye:)

zsolt
27-08-10, 13:40
^Thanks.

The font files are:
EN: B3AAAFD6_0_006D.dds.bmp
PL: DD8A64DB_0_006D.dds.bmp
(as extracted by UnpackTRU from bigfile.000 and/or patch.000)

They are PCD9/DDS textures stored inside of (C)DRM packages B3AAAFD6 and DD8A64DB respectively. Replacing the entire (C)DRM package may be a way rather than changing the font within the package.

Replacing the CDRM package is technically the same thing as replacing language files (they are just a different type of packages within the bigfiles) so you can try it if you want.
Dusan, I upgrade translator for TRU, and i try to find the way to extract font file from game. (In TRA/TRL font file was raw file with alpha channel), and - as you said - in TRU it is a texture file.

So, I examined CDRM files, and I found some interesting things:

1, you can extend files (to next 2048 (0x800) boundary), but you need to update length of file in FAT (I tested with subtitles when we created first version of translator for TRA).
2, because CDRM containers store number contained of files and length of files, you have 2 way to extend them:
1, all file starts in 16 bytes (0x10) boundary, so remaining space can be used freely (you can need to update "sub-file" length in cdrm header.
2, you can extend CDRM file (to 2048 bytes boundary), and then you have to push remaining data to end of cdrm file.

+1, (experimental) you can append full cdrm file to end of last bigfile, and update FAT to new location.
+2, (most experimental) create a new bigfile, and set file location in FAT to new BF's first byte.

Dusan
26-09-10, 07:36
^
Did you see the following code in UnpackTRU source files?
It lists all entries in a DRM file.
DRMEntryType.PCD9 corresponds to a texture file/entry.

public static DRMEntry[] ListEntries(Stream stream) {
BinaryReader input = new BinaryReader(stream);
uint magic = input.ReadUInt32();
if (magic != 0x13) {
return null;
}
input.BaseStream.Position += 16;
int entryCount = input.ReadInt32();
DRMEntry[] entries = new DRMEntry[entryCount];
for (int i = 0; i < entryCount; i++) {
int length = input.ReadInt32();
byte type1 = input.ReadByte();
input.BaseStream.Position += 3;
byte type2 = input.ReadByte();
byte[] int24 = input.ReadBytes(3);
int skipBefore = int24[0] + (int24[1] << 8) + (int24[2] << 16);
uint hashcode = input.ReadUInt32();
input.BaseStream.Position += 4;
ushort typeCode = (ushort)(type1 + (type2 << 8));
DRMEntry entry = new DRMEntry();
entry.id = i;
entry.skipBefore = skipBefore;
entry.length = length;
entry.hashcode = hashcode;
entry.typeCode = typeCode;
switch (typeCode) {
case 0x300C:
entry.type = DRMEntryType.Scene;
break;
case 0x340C:
entry.type = DRMEntryType.Mesh;
break;
case 0x0A05:
entry.type = DRMEntryType.PCD9;
break;
case 0x240A:
entry.type = DRMEntryType.Material;
break;
case 0x0009:
entry.type = DRMEntryType.Shaders;
break;
default:
entry.type = DRMEntryType.Other;
break;
}
entries[i] = entry;
}
int offset = (int)stream.Length;
for (int i = entryCount - 1; i >= 0; i--) {
offset -= entries[i].length;
entries[i].offset = offset;
offset -= entries[i].skipBefore;
}
return entries;
}


DRM files are obtained by decompressing CDRM files.
I use the zlib library to do the actual decompression.

public static Stream DecompressCDRM(Stream stream) {
BinaryReader input = new BinaryReader(stream);

input.BaseStream.Position = 8;
int chunkCount = input.ReadInt32();
byte[] chunkTypes = new byte[chunkCount];
int[] chunkLengths = new int[chunkCount];
input.BaseStream.Position += 4;
for (int i = 0; i < chunkCount; i++) {
chunkTypes[i] = input.ReadByte();
input.BaseStream.Position += 3;
chunkLengths[i] = input.ReadInt32();
}

foreach (byte chunkType in chunkTypes) {
if (chunkType != 0x02) {
input.Close();
return null; // unknown type
}
}

MemoryStream output = new MemoryStream();
for (int i = 0; i < chunkTypes.Length; i++) {
int chunkLength = chunkLengths[i];
long alignedOffset = ((input.BaseStream.Position + 15) >> 4) << 4;
input.BaseStream.Position = alignedOffset;
byte[] data = input.ReadBytes(chunkLength);
ZOutputStream zlibStream = new ZOutputStream(output);
zlibStream.Write(data, 0, data.Length);
}

input.Close();
output.Flush();
output.Position = 0;
return output;
}

zsolt
28-09-10, 08:31
^
Did you see the following code in UnpackTRU source files?
It lists all entries in a DRM file.
DRMEntryType.PCD9 corresponds to a texture file/entry. Thank you, I'll check this in the evening :)

MetalGuy
04-10-10, 16:44
oooh ur way looks awsome
but i couldn't find the file
could you please upload it and send it to me plz
my mail's
saif_ragab@yahoo.com

Dusan
04-10-10, 17:58
The TRU language files (EN/multi-lang) are here:
7CD333D3.zip (http://www.mediafire.com/?jv351ci02kuj6iv)

MetalGuy
04-10-10, 18:51
oh god thnx
i did all the steps in the right order
but when i type in the console
ImportTRULang 7CD333D3.txt bigfile.000.orig bigfile.000
the i hit enter
the importtrulang crashes what's my problem
win 7 32bit

EscondeR
05-10-10, 07:22
^ Is your original bigfile.000 renamed to bigfile.000.orig prior to the operation? If not, then rename it.

What exactly error message does the program return?

Dusan
05-10-10, 16:18
oh god thnx
i did all the steps in the right order
but when i type in the console
ImportTRULang 7CD333D3.txt bigfile.000.orig bigfile.000
the i hit enter
the importtrulang crashes what's my problem
win 7 32bit

What is the error message?

zeeh
06-10-10, 11:44
Dusan, I am trying to use ImportTRULang with Lara Croft and the Guardian of Light, but it fails :( The resulting bigfile.000.new is always identical to the original one. I even have tried it with -en param, but no luck.

ImportTRULang.exe 7CD333D3.txt bigfile.000 bigfile.000.new -en

Can you give a look? Thanks a lot.

Dusan
06-10-10, 16:44
Dusan, I am trying to use ImportTRULang with Lara Croft and the Guardian of Light, but it fails :( The resulting bigfile.000.new is always identical to the original one. I even have tried it with -en param, but no luck.

ImportTRULang.exe 7CD333D3.txt bigfile.000 bigfile.000.new -en

Can you give a look? Thanks a lot.

This is not surprising, ImportTRULang is only compatible with TRU and TRU demo version...
Guardian of Light certainly uses a unique set of hashcodes for its language files which ImportTRULang doesn't know of.
I don't have access to GoL data files so I'm not able to figure out those hash codes and to update ImportTRULang accordingly.

zeeh
06-10-10, 16:57
Maybe I can help you with this. Just tell me where is the offset and legth inside of the bigfile.000 that you need and I will send it to you.

Dusan
06-10-10, 17:37
Maybe I can help you with this. Just tell me where is the offset and legth inside of the bigfile.000 that you need and I will send it to you.

Like I said, I never saw the GoL data files.
So I don't know the hashcodes, I don't know the offsets, I don't know the file lengths, I don't know the content, I don't even know the data format (I can only guess it's the same as TRU but I can't be sure)...

zeeh
07-10-10, 14:09
Ok, nevermind.

Koedix
29-12-10, 21:07
Here's yet another tool I've written for TRU:
ImportTRULang which makes it possible to replace texts in the game.

Here it is: ImportTRULang1.3.zip (http://www.volny.cz/pavlicd/ImportTRULang/ImportTRULang1.3.zip)
And the C# source code for those interested: ImportTRULang1.3Src.zip (http://www.volny.cz/pavlicd/ImportTRULang/ImportTRULang1.3Src.zip)

Usage: ImportTRULang <lang_file> <orig_bigfile000> <new_bigfile000>
[-<lang_code>]

Example: ImportTRULang CC33584E_0.txt patch.000 patch.000.new -cz

Replaces the existing language data inside TRU bigfile.000 or patch.000
with the language data provided in the format generated by UnpackTRU.

The optional language code identifies the language pack to be replaced:
-en ... English (default) -demo-en ... English (TRU DEMO)
-fr ... Francais -demo-fr ... Francais (TRU DEMO)
-de ... Deutsch -demo-de ... Deutsch (TRU DEMO)
-it ... Italiano -demo-it ... Italiano (TRU DEMO)
-es ... Espanol -demo-es ... Espanol (TRU DEMO)
-nl ... Nederlands -demo-nl ... Nederlands (TRU DEMO)
-pl ... Polski
-cz ... Cesky
-hu ... Magyar
-ru ... Russian

Since the program is written in C# you'll need Microsoft .NET Framework (http://www.microsoft.com/downloads/details.aspx?familyid=333325FD-AE52-4E35-B531-508D977D32A6&displaylang=en) to run it.

The workflow is as follows:

1) Use my program UnpackTRU (http://www.tombraiderforums.com/showthread.php?t=142318) to export the language files from the game:
UnpackTRU bigfile.000 -lang
Pick the English language file (7CD333D3_*.txt).

2) Make changes to the texts in that file. Each text entry is surrounded by brackets. You can change the text inside the brackets the way you want, just make sure not to delete any entries or to change their order.

3) Rename bigfile.000 to bigfile.000.orig or something like that.

3) Use ImportTRULang to rebuild the TRU bigfile using the edited version of the language file (7CD333D3.txt):
ImportTRULang 7CD333D3.txt bigfile.000.orig bigfile.000
This command uses bigfile.000.orig as the source and generates a new file bigfile.000.

4) Run the game to see the changes you've made.

If you updated the game to v1.1 (using the official patch), then instead of working with the file bigfile.000, you need to work with the file patch.000 which contains an updated version of the the text files:
ImportTRULang 7CD333D3.txt patch.000.orig patch.000

The nice thing about the patched version of TRU is that when you rebuild the file patch.000 with ImportTRULang, it's only 20 MB of data (a matter of seconds) while if you rebuild the original (unpatched) bigfile.000, it's approx. 2 GB of data that has to be generated each time you want to change something. So my advice is to update to TRU v1.1 and work with the much smaller file patch.000.

I'm posting a few screenshots with Czech translations of some texts in the game that I made for testing purposes. I don't expected anyone here to appreciate my Czech translations :), this is just to demonstrate that it actually works :)

http://www.volny.cz/pavlicd/ImportTRULang/translation1.jpg

http://www.volny.cz/pavlicd/ImportTRULang/translation2.jpg

http://www.volny.cz/pavlicd/ImportTRULang/translation3.jpg


After I open ImportTRULang it immediatly closes. What the ****.

EscondeR
29-12-10, 21:13
Indeed, what the **** :mis: Have you read the instructions? The tool is a command line program and needs to be passed some parameters to, e.g.:

ImportTRULang abracadabra.txt bigfile.000.orig bigfile.000

This command tells the tool to translate the original bigfile.000 (named bigfile.000.orig) to Abracadabra language (using abracadabra.txt file) and write the translated data to bigfile.000 (named the same).

:p

Koedix
29-12-10, 22:06
Indeed, what the **** :mis: Have you read the instructions? The tool is a command line program and needs to be passed some parameters to, e.g.:

ImportTRULang abracadabra.txt bigfile.000.orig bigfile.000

This command tells the tool to translate the original bigfile.000 (named bigfile.000.orig) to Abracadabra language (using abracadabra.txt file) and write the translated data to bigfile.000 (named the same).

:p


Oh, well sorry for the waste of time. I don't know crap about command line programs. :tea:


And I have NO IDEA how to use it.

EscondeR
29-12-10, 22:20
Place the program to the same folder where bigfiles are.
Go to Start > Run, type in CMD and press Enter.
In Command Window enter the full path to the big files, e.g.:
"cd C:\Program Files\Eidos\Tomb Raider Underworld" w/o quotes.
Then enter the command in the following format:

ImportTRULang abracadabra.txt bigfile.000 bigfile.000.translated

This command tells the tool to translate the original bigfile.000 to Abracadabra language (using abracadabra.txt file) and write the translated data to bigfile.000.translated (named the same).


Backup your original bigfile.000 (move it to some safe location), then rename bigfile.000.translated to bigfile.000

Koedix
30-12-10, 21:16
It would work if not for this evil error.

ImportTRULang has stopped working.

Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: importtrulang.exe
Problem Signature 02: 1.0.0.0
Problem Signature 03: 4c3f600b
Problem Signature 04: mscorlib
Problem Signature 05: 2.0.0.0
Problem Signature 06: 4bebe8e2
Problem Signature 07: 349e
Problem Signature 08: e1
Problem Signature 09: System.IO.FileNotFoundException
OS Version: 6.1.7600.2.0.0.768.3
Locale ID: 1033



**** I know why. I don't have abracadabra.txt ... DAMN IT!

EscondeR
30-12-10, 23:01
Well, either you don't have the language file... or just need to disable DEP (http://www.tombraiderwiki.com/index.php/DEP) and try again :)

Koedix
30-12-10, 23:32
Well, either you don't have the language file... or just need to disable DEP (http://www.tombraiderwiki.com/index.php/DEP) and try again :)

I need the language file. I can't find it.

EscondeR
31-12-10, 00:07
^ Ahem... :mis:


The workflow is as follows:

1) Use my program UnpackTRU (http://www.tombraiderforums.com/showthread.php?t=142318) to export the language files from the game:
UnpackTRU bigfile.000 -lang
Pick the English language file (7CD333D3_*.txt).

2) Make changes to the texts in that file [TRANSLATE IT]. Each text entry is surrounded by brackets. You can change the text inside the brackets the way you want, just make sure not to delete any entries or to change their order.

etc...

Koedix
31-12-10, 00:13
^ Ahem... :mis:

I mean that I don't have abracadabra.txt but I see what to do now...


God I'm an idiot. :hea: :hea: :hea: :hea:

EscondeR
31-12-10, 00:18
LOL Abracadabra.txt was just a sample name, like John Doe :p

naineo
28-01-12, 04:50
Updated version of TRU_Czech version v1.2

http://rapidshare.com/files/180865425/TRU_Czech_v1.2.ZIP

Your installer doesn't work on windows 7, i tried to on tree different pc's. Here is working installer, should work on w2k/xp/vista/7, 32/64bit (no additional support files needed). Program install czech language and replace with english(and make backup), using ImportTRULang by Dusan Pavlicek.

http://www.magicsolutions.sk/files/TRU_Czech_for_v1.1.exe

zagraz
24-07-12, 12:41
This is what I was looking for. It's easy to use this program and perfect! But I have a problem. When I translate a line into my language and pack it back into the game, the line I translated says: Invalid UTF8 encoding. How can I fix it. I want to translate it with Turkish Fonts.

zagraz
25-07-12, 11:43
Hey I tried to make changes on dialog subtitles but it won't change. Dusan help me please.

Dusan
25-07-12, 14:46
Each language version of the game has its own unique ID code (a number inside the data files) which is more or less random. The program then uses this ID code during its operation so that the game can recognize the language data correctly.
That's why the program only supports some language versions of the game because I only had access to a limited number of language versions of the game from which I was able to extract the required ID codes.
I don't know the Turkish ID code, sorry...

zagraz
25-07-12, 14:51
Each language version of the game has its own unique ID code (a number inside the data files) which is more or less random. The program then uses this ID code during its operation so that the game can recognize the language data correctly.
That's why the program only supports some language versions of the game because I only had access to a limited number of language versions of the game from which I was able to extract the required ID codes.
I don't know the Turkish ID code, sorry...

One more thing. Read the post above. I can't change subtitles. Only menu texts can be changed.

Dusan
27-07-12, 12:25
One more thing. Read the post above. I can't change subtitles. Only menu texts can be changed.

Yes, that's the way it is, unfortunately.
Subtitles are stored in the audio files (MUL) and there's no tool to modify those.

Lampo
20-06-13, 19:48
Hi to everybody!
I just bought a copy of TR Underworld in Polish, because it was very cheap.
The big problem is that I don't understand Polish, and neither Czech or Magyar :jmp:
I followed your instructions, but it still doesn't work. The audio is in english, but the menu is still in Czech (I decided for Czech instead of the other languages :D )
What is wrong here?

More: if I install the official 1.1 patch, the game doesn't recognize the cd, even if it's original :(

GFY2013
05-07-13, 10:05
It's working on X360 too?

FreakRaider
05-07-13, 15:48
^ You've just posted in a reaaally old theard :p

And to your question: No, how would you run a exe file on Xbox? Or how would you install this Microsoft C thingie?

GFY2013
07-07-13, 17:07
^ You've just posted in a reaaally old theard :p

And to your question: No, how would you run a exe file on Xbox? Or how would you install this Microsoft C thingie?

Sorry I'm so stupid.:D :cln:
I'm working on Hungarian translate!:D
(The original is good too but not too "Hungarian".:D)