Mass Effect 2 TLK Unpack/Pack -> Help (Source code)

Need help translating games in other languages? Have your language problems solved here.
Post Reply
Venushja
beginner
Posts: 35
Joined: Tue Oct 19, 2010 4:13 pm
Has thanked: 1 time

Mass Effect 2 TLK Unpack/Pack -> Help (Source code)

Post by Venushja » Mon Aug 29, 2011 2:58 pm

Hello.
Anyone knows, how to edit this Source Code? I want to extract it, package
it and have the same structure. Y'know, I extracted Original TLK to XML and then
I packaged that XML back to TLK (without any changes in XML file). This new TLK
have in result different structure (not the same structure as a structure in
original TLK file) and the size of file was about 100kB bigger. I really need
your help - my knowledge is not good enough to solve this. Sorry for my bad English.
Thanx for any help.

Code: Select all

http://www.megaupload.com/?d=6LE0W7U3
Source Code, TLK Files (PC and Xbox), TLK Tools 1.0.4 inside in rar file.

User avatar
delutto
veteran
Posts: 155
Joined: Sat Apr 16, 2011 5:20 am
Has thanked: 49 times
Been thanked: 12 times

Re: Mass Effect 2 TLK Unpack/Pack -> Help (Source code)

Post by delutto » Tue Aug 30, 2011 2:00 am

You tried to contact the developer of the tool?

Venushja
beginner
Posts: 35
Joined: Tue Oct 19, 2010 4:13 pm
Has thanked: 1 time

Re: Mass Effect 2 TLK Unpack/Pack -> Help (Source code)

Post by Venushja » Tue Aug 30, 2011 8:25 am

Not tried. The program sent me buddy and I pulled it from the source code and when I did not know what to do with it so I wrote here.

Venushja
beginner
Posts: 35
Joined: Tue Oct 19, 2010 4:13 pm
Has thanked: 1 time

Re: Mass Effect 2 TLK Unpack/Pack -> Help (Source code)

Post by Venushja » Sat Sep 03, 2011 8:28 am

Really anyone? :(

mnn
advanced
Posts: 66
Joined: Sun Jul 31, 2011 11:00 am
Has thanked: 1 time
Been thanked: 6 times

Re: Mass Effect 2 TLK Unpack/Pack -> Help (Source code)

Post by mnn » Mon Sep 19, 2011 8:01 pm

The structure should be the same. I know this tool and format of ME2 TLK files. They use Huffman coding compression scheme. Basically that means, unless you have original source code BioWare used to compile those TLK files, you'll never get the same resulting file even if you haven't changed texts at all.

Krait
ultra-n00b
Posts: 3
Joined: Mon Nov 07, 2011 5:14 pm

Re: Mass Effect 2 TLK Unpack/Pack -> Help (Source code)

Post by Krait » Mon Nov 07, 2011 5:41 pm

Hi, I accidentally stumbled upon this forum. I'm the developer of the tool. Quick Google search would lead you to the homepage of the project: http://social.bioware.com/project/3492/, where you could contact me ;)

I'm sorry for resurrecting the thread, just wanted to clarify for others.

Yes, the compression is Huffman coding, so the copy will never be 1-1. But there's another reason for the 100kB size difference. The original ME2 TLKs have one additional trick, which I didn't implement. When there is string A that is a suffix for another string B, then reference to string A is stored at the end of string B, instead of the actual string. So for example if there are three identical strings, they're stored only once, with references.

But at the time of writing the tool, I was too lazy to efficiently implement this. And the size difference is really affordable.

But the "structure", as you say, is ok. It's identical and appropriate for the format. It just lacks one optimalization, but it only means the file is _slighlty_ bigger nothing else.

The only issue with the tool is that it has very limited support for Xbox360 and PS3 TLKs. It only loads them fine and dumps to XML. But somehow, when converted back to TLK, it doesn't work on the console. I don't have any console for testing, so can't really trace the problem down.

mnn
advanced
Posts: 66
Joined: Sun Jul 31, 2011 11:00 am
Has thanked: 1 time
Been thanked: 6 times

Re: Mass Effect 2 TLK Unpack/Pack -> Help (Source code)

Post by mnn » Mon Nov 07, 2011 5:58 pm

Krait wrote:The only issue with the tool is that it has very limited support for Xbox360 and PS3 TLKs. It only loads them fine and dumps to XML. But somehow, when converted back to TLK, it doesn't work on the console. I don't have any console for testing, so can't really trace the problem down.
Do you correctly handle endianness?

Krait
ultra-n00b
Posts: 3
Joined: Mon Nov 07, 2011 5:14 pm

Re: Mass Effect 2 TLK Unpack/Pack -> Help (Source code)

Post by Krait » Mon Nov 07, 2011 6:17 pm

mnn wrote:
Krait wrote:The only issue with the tool is that it has very limited support for Xbox360 and PS3 TLKs. It only loads them fine and dumps to XML. But somehow, when converted back to TLK, it doesn't work on the console. I don't have any console for testing, so can't really trace the problem down.
Do you correctly handle endianness?
Yes, changing endianness is currently the only difference between console and PC mode in the app. That's why it can properly read the TLK to XML. But when TLK is created from such XML, it's buggy on both Xbox360 and PS3. Weird, eh?

mnn
advanced
Posts: 66
Joined: Sun Jul 31, 2011 11:00 am
Has thanked: 1 time
Been thanked: 6 times

Re: Mass Effect 2 TLK Unpack/Pack -> Help (Source code)

Post by mnn » Mon Nov 07, 2011 6:30 pm

Are you sure endianness is the only thing different in console versions of TLK? Because apparently, there must be something else.

Krait
ultra-n00b
Posts: 3
Joined: Mon Nov 07, 2011 5:14 pm

Re: Mass Effect 2 TLK Unpack/Pack -> Help (Source code)

Post by Krait » Mon Nov 07, 2011 6:43 pm

mnn wrote:Are you sure endianness is the only thing different in console versions of TLK? Because apparently, there must be something else.
Clearly it's not the only thing ;) I said that currently, it's the only implemented difference. And it's enough for one-way conversion only :/
Well, it's a dead end for me, because I don't own any console. I had reports from people who tried to run those TLKs on Xbox360 and PS3 and they had errors. But I couldn't understand what were the symptoms exactly and our contact was very limited unfortunately.

michalss
Moderator
Posts: 949
Joined: Sun Mar 27, 2011 8:42 pm
Has thanked: 10 times
Been thanked: 141 times

Re: Mass Effect 2 TLK Unpack/Pack -> Help (Source code)

Post by michalss » Tue Nov 08, 2011 3:56 pm

Yes there is something else, i have JTAG console here and if someone want to help i can test TLK's anytime you want. If you are interest please contact me on PM and i will send you msn, skype or IcQ .

Me and my firend spend many hours on this without the success, we also find that repacked TLK for PC has also many differents but it runs ok. I was able to run it for about 5 mints on X360 with text mess but thats about all, really unplayable at all.
Trust me PPL would ript off your hands to make it work on PS3 or Xbox360 :)

Mike
Quick BMS Editor GUI - simple easy to use
Goto : viewtopic.php?uid=34229&f=29&t=6797&start=0

Downloads from DropBox : https://dl.dropboxusercontent.com/u/

Post Reply