Shank 2 [PC] Translation
-
Sartr0n
- advanced
- Posts: 50
- Joined: Mon Nov 14, 2011 1:13 pm
- Has thanked: 1 time
- Been thanked: 2 times
Shank 2 [PC] Translation
Hi, folks.
Since Shank 2 came out I'm thinking to buy the game but first decided to try the pirate version and test it out and try if the game can be translated, but i can't find where are the text files (maybe the text is encoded into the .exe) but i don't have the skills to research where are they and that's why i have created this thread. I think that there are many fans of the game and if the other members here can help with the translation.
This is the original (non-cracked) .exe - http://uploading.com/files/4cdme4d2/Sha ... 2BExe.rar/
Is there a way to find the text and fully translate the game or there is no chance for translation?
I haven't tried with Shank 1 but i think that the files and the engine are the same.
Since Shank 2 came out I'm thinking to buy the game but first decided to try the pirate version and test it out and try if the game can be translated, but i can't find where are the text files (maybe the text is encoded into the .exe) but i don't have the skills to research where are they and that's why i have created this thread. I think that there are many fans of the game and if the other members here can help with the translation.
This is the original (non-cracked) .exe - http://uploading.com/files/4cdme4d2/Sha ... 2BExe.rar/
Is there a way to find the text and fully translate the game or there is no chance for translation?
I haven't tried with Shank 1 but i think that the files and the engine are the same.
-
merlinsvk
- ultra-veteran

- Posts: 411
- Joined: Mon Oct 27, 2008 12:11 am
- Location: Slovakia
- Has thanked: 35 times
- Been thanked: 117 times
Re: Shank 2 [PC] Translation
Engine in Shank 2 is new and it differs from Shank 1. Unfortunately (for translators).
Some texts are in .lua files, but I don't know (yet) if game reads them.
And also textures are in new format (Shank 1 used .dds, and menus are made in Scaleform GFx).
EDIT: Texts are in .chui files.
Now textures have KTEX header.
Some examples in attachment.
Some texts are in .lua files, but I don't know (yet) if game reads them.
And also textures are in new format (Shank 1 used .dds, and menus are made in Scaleform GFx).
EDIT: Texts are in .chui files.
Now textures have KTEX header.
Some examples in attachment.
You do not have the required permissions to view the files attached to this post.
-
pitbon1986
- n00b
- Posts: 12
- Joined: Thu Jan 05, 2012 10:55 am
Re: Shank 2 [PC] Translation
I need a tool to unpack / repack. tex files of shank 2 because I want to make the Italian translation. THx very much for help
-
merlinsvk
- ultra-veteran

- Posts: 411
- Joined: Mon Oct 27, 2008 12:11 am
- Location: Slovakia
- Has thanked: 35 times
- Been thanked: 117 times
Re: Shank 2 [PC] Translation
I'm not good at QuickBMS scripting, but I have made this and it works.
TEX2DDS script will convert .tex texture to .dds (DXT5) and also extract that unknown values to separate .ktex file
If you will try to convert .tex files with only numbers in base name such as, 1.tex, 2.tex, ... QuickBMS will ask you for new name for .ktex file. I don't know if it's because my bad coding, or it is a bug in QuickBMS. But, simply add any letter to that file (a1.tex, abcd2.tex, ...) and you will be fine.
DDS2TEX. Doesn't need an explanation
And if you can make that scripts harder, better, faster, stronger, do it.
TEX2DDS script will convert .tex texture to .dds (DXT5) and also extract that unknown values to separate .ktex file
Code: Select all
# Game: Shank 2 (PC)
# TEX to DDS converter
# by MerlinSVK Feb 2012
# script for QuickBMS http://aluigi.org/papers.htm#quickbms
set MEMORY_FILE binary "\x44\x44\x53\x20\x7C\x00\x00\x00\x07\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x04\x00\x00\x00\x44\x58\x54\x35\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
get NAME basename
string DNAME = NAME
string DNAME += ".dds"
string KNAME = NAME
string KNAME += ".ktex"
get ASIZE asize
getdstring KTEX 0x8
get WIDTH short
get HEIGHT short
getDString UNK 0x6 # get that 6 unknown values
log KNAME 0xC 0x6 # save them to .ktex file
math DATASIZE = ASIZE
math DATASIZE -= 0x12 # 0x12 = size of KTEX header
savepos START
putVarChr MEMORY_FILE 0XC HEIGHT short
putVarChr MEMORY_FILE 0x10 WIDTH short
append
log MEMORY_FILE START DATASIZE
append
get DDSSIZE asize MEMORY_FILE
log DNAME 0 DDSSIZE MEMORY_FILE
DDS2TEX. Doesn't need an explanation
Code: Select all
# Game: Shank 2 (PC)
# DDS to TEX converter
# by MerlinSVK Feb 2012
# script for QuickBMS http://aluigi.org/papers.htm#quickbms
set MEMORY_FILE binary "\x4B\x54\x45\x58\x00\x00\x01\x02\xAA\xAA\xBB\xBB\xCC\xCC\xDD\xDD\xEE\xEE"
open FDDE DDS 0
open FDDE KTEX 1
get NAME basename
string NAME = NAME
string NAME += ".tex_NEW" # change extension, as you wish
get ASIZE asize 0
goto 0xC 0
get HEIGHT short 0
get DUMMY short 0
get WIDTH short 0
goto 0x80 0
savepos START 0
math DATASIZE = ASIZE
math DATASIZE -= 0x80 # 0x80 = size of DDS header
putVarChr MEMORY_FILE 0x8 WIDTH short
putVarChr MEMORY_FILE 0xA HEIGHT short
# correction of KTEX header in final .tex file
set CORRECTION short 0x0201
putVarChr MEMORY_FILE 0x6 CORRECTION short
# correction
get UNK1 short 1
get UNK2 short 1
get UNK3 short 1
putVarChr MEMORY_FILE 0xC UNK1 short
putVarChr MEMORY_FILE 0xE UNK2 short
putVarChr MEMORY_FILE 0x10 UNK3 short
append
log MEMORY_FILE START DATASIZE
append
get TEXSIZE asize MEMORY_FILE
log NAME 0 TEXSIZE MEMORY_FILE
And if you can make that scripts harder, better, faster, stronger, do it.
Re: Shank 2 [PC] Translation
you are awesomemerlinsvk wrote:I'm not good at QuickBMS scripting, but I have made this and it works.
TEX2DDS script will convert .tex texture to .dds (DXT5) and also extract that unknown values to separate .ktex file
If you will try to convert .tex files with only numbers in base name such as, 1.tex, 2.tex, ... QuickBMS will ask you for new name for .ktex file. I don't know if it's because my bad coding, or it is a bug in QuickBMS. But, simply add any letter to that file (a1.tex, abcd2.tex, ...) and you will be fine.Code: Select all
# Game: Shank 2 (PC) # TEX to DDS converter # by MerlinSVK Feb 2012 # script for QuickBMS http://aluigi.org/papers.htm#quickbms set MEMORY_FILE binary "\x44\x44\x53\x20\x7C\x00\x00\x00\x07\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x04\x00\x00\x00\x44\x58\x54\x35\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" get NAME basename string DNAME = NAME string DNAME += ".dds" string KNAME = NAME string KNAME += ".ktex" get ASIZE asize getdstring KTEX 0x8 get WIDTH short get HEIGHT short getDString UNK 0x6 # get that 6 unknown values log KNAME 0xC 0x6 # save them to .ktex file math DATASIZE = ASIZE math DATASIZE -= 0x12 # 0x12 = size of KTEX header savepos START putVarChr MEMORY_FILE 0XC HEIGHT short putVarChr MEMORY_FILE 0x10 WIDTH short append log MEMORY_FILE START DATASIZE append get DDSSIZE asize MEMORY_FILE log DNAME 0 DDSSIZE MEMORY_FILE
DDS2TEX. Doesn't need an explanation![]()
Code: Select all
# Game: Shank 2 (PC) # DDS to TEX converter # by MerlinSVK Feb 2012 # script for QuickBMS http://aluigi.org/papers.htm#quickbms set MEMORY_FILE binary "\x4B\x54\x45\x58\x00\x00\x01\x02\xAA\xAA\xBB\xBB\xCC\xCC\xDD\xDD\xEE\xEE" open FDDE DDS 0 open FDDE KTEX 1 get NAME basename string NAME = NAME string NAME += ".tex_NEW" # change extension, as you wish get ASIZE asize 0 goto 0xC 0 get HEIGHT short 0 get DUMMY short 0 get WIDTH short 0 goto 0x80 0 savepos START 0 math DATASIZE = ASIZE math DATASIZE -= 0x80 # 0x80 = size of DDS header putVarChr MEMORY_FILE 0x8 WIDTH short putVarChr MEMORY_FILE 0xA HEIGHT short # correction of KTEX header in final .tex file set CORRECTION short 0x0201 putVarChr MEMORY_FILE 0x6 CORRECTION short # correction get UNK1 short 1 get UNK2 short 1 get UNK3 short 1 putVarChr MEMORY_FILE 0xC UNK1 short putVarChr MEMORY_FILE 0xE UNK2 short putVarChr MEMORY_FILE 0x10 UNK3 short append log MEMORY_FILE START DATASIZE append get TEXSIZE asize MEMORY_FILE log NAME 0 TEXSIZE MEMORY_FILE
And if you can make that scripts harder, better, faster, stronger, do it.
-
pitbon1986
- n00b
- Posts: 12
- Joined: Thu Jan 05, 2012 10:55 am
-
merlinsvk
- ultra-veteran

- Posts: 411
- Joined: Mon Oct 27, 2008 12:11 am
- Location: Slovakia
- Has thanked: 35 times
- Been thanked: 117 times
Re: Shank 2 [PC] Translation
Are they working correctly?
And guys, what about fonts? I tried to add chars from slovak alphabet, but game totally ignores them. It looks like game has defined range of chars, something like 32 - 128, and everything above 128 (which actually is that big red exclamation mark) is ignored. I hope, I'm wrong.
And guys, what about fonts? I tried to add chars from slovak alphabet, but game totally ignores them. It looks like game has defined range of chars, something like 32 - 128, and everything above 128 (which actually is that big red exclamation mark) is ignored. I hope, I'm wrong.
-
pitbon1986
- n00b
- Posts: 12
- Joined: Thu Jan 05, 2012 10:55 am
Re: Shank 2 [PC] Translation
I extracted a lot of .tex file and everything worked perfectly, creating (for each .tex file): a .dds file and a .tex file of small size.
In these days, I'll modify some .dds files, I'll recreate the .tex file and then test it in-game (I'll let you know if everything works).
As for the fonts: you must only use the English vocabulary, avoiding the use of accents and using apostrophes in their place. To change the text you have to edit .chui files respecting the number of hexadecimal characters.
Example: when you find a written, check the previous character to the first letter, that character index the number of characters used for the word. You must edit the text and change the index character in the match those characters used in the written. (So is probabily that you insert or delete some characters in the file).
In these days, I'll modify some .dds files, I'll recreate the .tex file and then test it in-game (I'll let you know if everything works).
As for the fonts: you must only use the English vocabulary, avoiding the use of accents and using apostrophes in their place. To change the text you have to edit .chui files respecting the number of hexadecimal characters.
Example: when you find a written, check the previous character to the first letter, that character index the number of characters used for the word. You must edit the text and change the index character in the match those characters used in the written. (So is probabily that you insert or delete some characters in the file).
-
merlinsvk
- ultra-veteran

- Posts: 411
- Joined: Mon Oct 27, 2008 12:11 am
- Location: Slovakia
- Has thanked: 35 times
- Been thanked: 117 times
Re: Shank 2 [PC] Translation
Yeah, I saw that "string length" byte there, but I'm litle bit angry because of that character problem
It would be cool to have full alphabet in game.
It would be cool to have full alphabet in game.
Re: Shank 2 [PC] Translation
Hello
Please see guide for making Alphabetical
fonts Fnt file
Programs do
With respect
Please see guide for making Alphabetical
fonts Fnt file
Programs do
With respect
Re: Shank 2 [PC] Translation
i wonder how can i create arabic font in the format of Fnt file with low size so i can import it to my translated game?
thanks in advanced
thanks in advanced

