Trine 2 Complete Story *.lub (Text file)

How to translate the files of a game
shadow_lonely
Posts: 216
Joined: Mon Oct 06, 2014 3:30 am

Trine 2 Complete Story *.lub (Text file)

Post by shadow_lonely »

Hi! Could anyone make a quickbms script to unpack and reimport text for Trine 2 Complete Story?
Example file:
Trine 2 Complete.rar

Thanks!
Last edited by shadow_lonely on Sat Mar 07, 2015 10:18 am, edited 2 times in total.
puggsoy
Posts: 161
Joined: Sat Dec 13, 2014 1:01 am

Re: Trine 2 Complete Story *.lub (Text file)

Post by puggsoy »

It's zlib compressed, however the file format is a bit strange. I'm not sure how I'd extract it. You could just use Offzip (offset 0) and edit the files by hand, since the text is easily viewable and editable. However, if you want to do something like a full translation that would be tedious.
shadow_lonely
Posts: 216
Joined: Mon Oct 06, 2014 3:30 am

Re: Trine 2 Complete Story *.lub (Text file)

Post by shadow_lonely »

puggsoy wrote:It's zlib compressed, however the file format is a bit strange. I'm not sure how I'd extract it. You could just use Offzip (offset 0) and edit the files by hand, since the text is easily viewable and editable. However, if you want to do something like a full translation that would be tedious.


Thanks! :(
shadow_lonely
Posts: 216
Joined: Mon Oct 06, 2014 3:30 am

Re: Trine 2 Complete Story *.lub (Text file)

Post by shadow_lonely »

puggsoy wrote:It's zlib compressed, however the file format is a bit strange. I'm not sure how I'd extract it. You could just use Offzip (offset 0) and edit the files by hand, since the text is easily viewable and editable. However, if you want to do something like a full translation that would be tedious.


I reupload other format text (PC version), could you take and look? Thanks

Here is exmaple:
Trine 2 Complete.rar
puggsoy
Posts: 161
Joined: Sat Dec 13, 2014 1:01 am

Re: Trine 2 Complete Story *.lub (Text file)

Post by puggsoy »

These are uncompressed, but otherwise they're exactly the same. Sorry :?
shadow_lonely
Posts: 216
Joined: Mon Oct 06, 2014 3:30 am

Re: Trine 2 Complete Story *.lub (Text file)

Post by shadow_lonely »

puggsoy wrote:These are uncompressed, but otherwise they're exactly the same. Sorry :?


At 0x00000081 have 15 bytes, maybe size limit: 400300078005000100060007C005 (en-111833bytes)| C005000780050001400400070006 (es-114065bytes)
swuforce
Posts: 233
Joined: Thu Oct 16, 2014 4:39 pm

Re: Trine 2 Complete Story *.lub (Text file)

Post by swuforce »

If you change a byte at 0xA to 8, luadec will decompile the file.
Download from here: http://hercules.ws/board/topic/2473-lua ... ecompiler/
Unpack the attached file to it's folder.
Drag the lub file to convert.bat, an editable lua file should appear.
Drag the lub again, a new lub should appear form the lua.
shadow_lonely
Posts: 216
Joined: Mon Oct 06, 2014 3:30 am

Re: Trine 2 Complete Story *.lub (Text file)

Post by shadow_lonely »

swuforce wrote:If you change a byte at 0xA to 8, luadec will decompile the file.
Download from here: http://hercules.ws/board/topic/2473-lua ... ecompiler/
Unpack the attached file to it's folder.
Drag the lub file to convert.bat, an editable lua file should appear.
Drag the lub again, a new lub should appear form the lua.


Nice! Thanks! ;)
qabRieL
Posts: 12
Joined: Fri Feb 12, 2016 11:53 am

Re: Trine 2 Complete Story *.lub (Text file)

Post by qabRieL »

swuforce wrote:If you change a byte at 0xA to 8, luadec will decompile the file.
Download from here: http://hercules.ws/board/topic/2473-lua ... ecompiler/
Unpack the attached file to it's folder.
Drag the lub file to convert.bat, an editable lua file should appear.
Drag the lub again, a new lub should appear form the lua.

Everything for Trine 4 works fine except for the lub files. Apparently there are two copies of the same file, and the game reads the strings from the locale.x64.lua file, which, the files for converting don't work. Can you give them a look?
swuforce
Posts: 233
Joined: Thu Oct 16, 2014 4:39 pm

Re: Trine 2 Complete Story *.lub (Text file)

Post by swuforce »

Decompile the x86 file then replace the luac.exe with the 64 bit lua compiler.
EBOOTextend
Posts: 2
Joined: Mon Jan 25, 2021 2:17 am

Re: Trine 2 Complete Story *.lub (Text file)

Post by EBOOTextend »

@swuforce
Im sorry if I address my problem to wrong person, but I see you make some scripts and tools for .lub decompiling.
Im having issues with Trine 4 dlc_keys.lub file for ps4 game version.
After unpacking the patch1.fbq file from game update, I cant get the lub file to readable state.
I need the keys inside, obviously.

I cant get it to work, keep getting error "unexpected symbol near X" when trying to decompile the lub file.
Im new to the forum, hope no rules broken.

Trine 4 (ps4) dlc lub files.rar


Please have a look anyone and help me to decompile, please.
Thanks.
swuforce
Posts: 233
Joined: Thu Oct 16, 2014 4:39 pm

Re: Trine 2 Complete Story *.lub (Text file)

Post by swuforce »

Open the files with hex editor and see the difference.
These files are probably encrypted.
EBOOTextend
Posts: 2
Joined: Mon Jan 25, 2021 2:17 am

Re: Trine 2 Complete Story *.lub (Text file)

Post by EBOOTextend »

swuforce wrote:Open the files with hex editor and see the difference.
These files are probably encrypted.


I did already, and yes, I cant see luaQ header or anything resembling in ASCII.
All .lub files in the ps4 game are like this, first 5 bytes are the same.

So, without decrypting first there is no chance to decompile the files?

Thanks for taking a look, appreciate it.
RDR2EXE
Posts: 37
Joined: Sun Jan 10, 2021 7:43 am

Re: Trine 2 Complete Story *.lub (Text file)

Post by RDR2EXE »

puggsoy wrote:These are uncompressed, but otherwise they're exactly the same. Sorry :?

hey can you help me
viewtopic.php?f=12&t=14714
viewtopic.php?f=12&t=14714
jonastraducoes
Posts: 88
Joined: Sun Aug 18, 2019 1:33 am

Re: Trine 2 Complete Story *.lub (Text file)

Post by jonastraducoes »

shadow_lonely wrote:Hi! Could anyone make a quickbms script to unpack and reimport text for Trine 2 Complete Story?
Example file: Trine 2 Complete.rar
Thanks!


Buying the game Trine 3 steam has all the tools to translate the game!

To convert the .lub files to .lua, use this site and it's very good!

You change the .lua files in notepad ++

http://prntscr.com/xz8h9k

https://www.decompiler.com/

Attention: you need to have the original steam game that has the right tools!

I tested with generic games and it doesn't work!
alanmugiwara
Posts: 16
Joined: Fri Jun 15, 2018 2:46 pm

Re: Trine 2 Complete Story *.lub (Text file)

Post by alanmugiwara »

jonastraducoes wrote:
shadow_lonely wrote:Hi! Could anyone make a quickbms script to unpack and reimport text for Trine 2 Complete Story?
Example file: Trine 2 Complete.rar
Thanks!


Buying the game Trine 3 steam has all the tools to translate the game!

To convert the .lub files to .lua, use this site and it's very good!

You change the .lua files in notepad ++

http://prntscr.com/xz8h9k

https://www.decompiler.com/

Attention: you need to have the original steam game that has the right tools!

I tested with generic games and it doesn't work!



hank you for this. Works fone! But how converter .lua to .lub after edit files?
jonastraducoes
Posts: 88
Joined: Sun Aug 18, 2019 1:33 am

Re: Trine 2 Complete Story *.lub (Text file)

Post by jonastraducoes »

alanmugiwara wrote:
jonastraducoes wrote:
shadow_lonely wrote:Hi! Could anyone make a quickbms script to unpack and reimport text for Trine 2 Complete Story?
Example file: Trine 2 Complete.rar
Thanks!


Buying the game Trine 3 steam has all the tools to translate the game!

To convert the .lub files to .lua, use this site and it's very good!

You change the .lua files in notepad ++

http://prntscr.com/xz8h9k

https://www.decompiler.com/

Attention: you need to have the original steam game that has the right tools!

I tested with generic games and it doesn't work!



hank you for this. Works fone! But how converter .lua to .lub after edit files?


Buying the game Trine 3 steam has all the tools to translate the game!