Jump to content

Ps3 timeshift localization


Go to solution Solved by h3x3r,

Recommended Posts

  • kosemen_76 changed the title to Ps3 timeshift localization
Posted (edited)

It's just an archive with 727 files, without filenames and any indication of what kind of data there is. Are you even sure that text is in this arc somewhere?

To unpack you can just use offzip as files are compressed with zlib, in this case it will be even better solution because offzip will try to recognize file's extension

Edited by Thief1987
  • Like 1
Link to comment
Share on other sites

  • Engineer
Posted (edited)

The script doesn't decompress it. You should use MEMORY_FILE.

EDiT: So here you go. You can only hope that game doesn't mind if there is only one compressed chunk instead of many small ones.

It will be in 3 stages.

First unpack/export script:

get BaseFileName basename
get FileSize asize
comtype zlib_noerror

get Chunks uint32

for i = 0 < Chunks
	get ChunkOffset long
	savepos ChunkOff
	get NextChunkOffset long
	goto ChunkOff
	if NextChunkOffset != 0
		xmath ZSize "NextChunkOffset - ChunkOffset"
	else
		xmath ZSize "FileSize - ChunkOffset"
	endif
	string Name p "%s.s3dpak_unpacked" BaseFileName 
	append 0
	clog MEMORY_FILE ChunkOffset ZSize 0x1F400000
	clog Name ChunkOffset ZSize 0x1F400000
next i

goto 0 MEMORY_FILE
get Files long MEMORY_FILE
for i = 0 < Files
	get Offset long MEMORY_FILE
	get Size long MEMORY_FILE
	get StrLen long MEMORY_FILE
	getdstring FileName StrLen MEMORY_FILE
	get Extension long MEMORY_FILE
	getdstring Dummy 0x8 MEMORY_FILE
	if Extension == 14
		set Extension string "txt"
	else 
		set Extension string "dat"
	endif
	string Name p "%s/%s.%s" BaseFileName FileName Extension
	log Name Offset Size MEMORY_FILE
next i

After edit leave only modified files inside unpacked folder and run reimport2 or 3 with this script and select *.s3dpak_unpacked file which was created after unpack/export:

get BaseFileName basename
get FileSize asize

get Files long
for i = 0 < Files
	get Offset long
	get Size long
	get StrLen long
	getdstring FileName StrLen
	get Extension long
	getdstring Dummy 0x8
	if Extension == 14
		set Extension string "txt"
	else 
		set Extension string "dat"
	endif
	string Name p "%s/%s.%s" BaseFileName FileName Extension
	log Name Offset Size
next i

And after that use this last script for recompressing *.s3dpak_unpacked file:

get BaseFileName basename
get FileSize asize
comtype zlib_compress

savepos Offset
set MEMORY_FILE binary "\x01\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
string Name p "%s_recompressed/%s.s3dpak" BaseFileName BaseFileName
append
log Name 0 16 MEMORY_FILE
clog Name Offset FileSize FileSize

It will create new recompressed file inside *_recompressed folder

Edited by h3x3r
  • Like 1
Link to comment
Share on other sites

11 hours ago, h3x3r said:

Komut dosyası sıkıştırmasını açmıyor. MEMORY_FILE kullanmalısınız.




 

Unfortunately, there is a problem with the import. I'm sorry I'm making you tired, thank you for your effort.

Link to comment
Share on other sites

Posted (edited)
7 saat önce kösemen_76 şunları söyledi:

Unfortunately, there is a problem with the import. I'm sorry I'm making you tired, thank you for your effort.

 

EkranGrnts(5).png.14b1e03bd73b18fd7d92a55c479c96fc.png

Edited by kosemen_76
Link to comment
Share on other sites

Posted (edited)
21 hours ago, h3x3r said:

İlk yazımı güncelledim. Deneyebilirsin. Komut dosyalarında herhangi bir sorun olursa bana bildirin.

First of all, thank you for your post.All the scripts worked perfectly. But the resulting file format was quite different from the original. Therefore, a problem occurred in the game. So, I think the game crashed because it uses a different compression of zlib. The resulting file is 3 MB smaller in size. Look, this is the bms pattern of the inversion game. In the PC timeshift game It works, maybe it uses compression like this

inversion_psdarc.7z

Edited by kosemen_76
Link to comment
Share on other sites

  • Engineer

There's no diff in compression. It's zlib. There are only different compression levels. But i don't think that's the case here.

 I use zlib_noerror just because a was unable get decompression size.

Anyway that's just approved that game sucks and can't read single compressed chunk.

Link to comment
Share on other sites

  • Engineer

Sh!t I just bought PC version and tried to find that archive "initial_tpls.s3dpak" and now i realized you want to translate PS3 version... Now i feel total faceplam...

So you are trying it on emulator?

Link to comment
Share on other sites

No, I found the bms command by digging through the xentax archive a little. I downloaded the PC patch from a group's website. I tried the result on both the device and the emulator.  the same in both

Link to comment
Share on other sites

  • Engineer

Well i can get over compression. Game accept recompressed file but uncompressed size must be same. If i insert some chars in text file and reimport it, game crashes. So i think there will be problem with reimport. Reimport put edited data on the end of file and change offset to it in table. But game may does not like it.

Link to comment
Share on other sites

Posted (edited)
49 minutes ago, h3x3r said:

Peki, sıkıştırmanın özelliklerini geliştirebilirim. Oyunun yeniden sıkıştırılmış şekli kabul edilir ancak sıkıştırılmamış boyut aynı olmalıdır. Metin bilgilerine bazı karakterler eklenerek yeniden aktarılırsa oyun çöküyor. Bu nedenle yeniden ithalatta sorun artıyor. Yeniden içe aktarılan, düzenlenen verilerin dosya süresi sona erer ve tablodaki ofseti buna göre değişir. Ama oyundan hoşlanmayabilir.

🙂🙂Ok. When the original file of the game is restored, it is enough for the game to work. Otherwise, the User is responsible. :)Thank you from now. This much I can explain in broken English.

Edited by kosemen_76
Link to comment
Share on other sites

  • Engineer
Posted (edited)

Is this only one file you must edit to make translation? Or are there any other files?

Well seems like it's working after some edits. I must set 0 offset + 0 size at rest language files right after english. ts.thumb.jpg.9bb920406775f49e58ef7ff37611207a.jpg

Edited by h3x3r
  • Haha 1
Link to comment
Share on other sites

1 hour ago, h3x3r said:

Bu, çeviri yapmak için düzenlemeniz gereken tek dosya mı? Veya başka dosyalar var mı?

Bazı düzenlemelerden sonra çalışıyor gibi görünüyor. İngilizce'den hemen sonra kalan dil dosyalarında 0 offset + 0 size ayarlamalıyım. ts.thumb.jpg.9bb920406775f49e58ef7ff37611207a.jpg

It's great. You downloaded it, it was a 5GB game, I can't give you credit for your effort.

Link to comment
Share on other sites

  • Engineer
  • Solution
Posted (edited)

Okey!

So use this pre-patched "initial_tpls.s3dpak_unpacked" and use strings_English.txt file for translation. I must remove rest of the loc files and patch the sizes/offsets.

After reimport use recompress script from attachement. The first one i posted doesn't work with game. Game require files start at offset 131072.

initial_tpls.7z timeshift_s3dpak_recompress.7z

Also for more convenience reimporting. Just match scripts names. Create bat file and put to it and save it next to the quickbms.exe

start cmd.exe /c del initial_tpls_recompressed\initial_tpls.s3dpak
start cmd.exe /c quickbms.exe -w -r -r timeshift_s3dpak_import.bms initial_tpls.s3dpak_unpacked ""
start cmd.exe /c quickbms.exe -o timeshift_s3dpak_recompress.bms initial_tpls.s3dpak_unpacked ""

 

Edited by h3x3r
  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...