DEATHLOOP Subtitle File

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
CidQu
Posts: 44
Joined: Tue Sep 14, 2021 12:25 am

Re: DEATHLOOP Subtitle File

Post by CidQu »

h3x3r wrote:Game accepts decompressed files but you must also change ZSIZE and SIZE to the same values. I tried put decompressed english_m.lang at the end of archive and edit the OFFSET and ZSIZE/SIZE in the INDEX and the game works. But it's manual thing. One file is no problem but if you will want import multiple files that's the other story.


I didn't understand it. Just now I want to import english_m file with Turkish Translation. Now I don't know too much about this coding stuff, can you please explain me how did you done it?
h3x3r
Posts: 165
Joined: Wed Jun 01, 2016 5:53 pm

Re: DEATHLOOP Subtitle File

Post by h3x3r »

I did a good find. Game load unpacked files but you must dissable them in master_resources.index by renaming the name of file.
So for english_m.lang search for it in master_resources.index with hex editor and rename it to _nglish.lang. There are two of them.

Now create in base folder strings folder and put unpacked english_m.lang to it.
EDiT: It also works for decl files.
CidQu
Posts: 44
Joined: Tue Sep 14, 2021 12:25 am

Re: DEATHLOOP Subtitle File

Post by CidQu »

h3x3r wrote:I did a good find. Game load unpacked files but you must dissable them in master_resources.index by renaming the name of file.
So for english_m.lang search for it in master_resources.index with hex editor and rename it to _nglish.lang. There are two of them.

Now create in base folder strings folder and put unpacked english_m.lang to it.
EDiT: It also works for decl files.


OMG! That works!! Thank you so much
h3x3r
Posts: 165
Joined: Wed Jun 01, 2016 5:53 pm

Re: DEATHLOOP Subtitle File

Post by h3x3r »

aluigi wrote:Interesting, it really crashes if the output size is more than 700 Mb.
I don't think there is anything I can do, luckily it's enough to temporary rename the archive so that quickbms will skip its extraction (hopefully the other archives have smaller files).

Well I made workaround for it. Now it will unpack whole resources and compressed files which are above 700MB after decompress are unpacked as compressed.

Code: Select all

    if EXISTS != 0
        if ZSIZE == SIZE
            log NAME OFFSET SIZE 1         
        else
            goto OFFSET 1
            getdstring TYPE 4 1
            if TYPE u== "OOD"
                comtype oodle
            else
                print "Error: unknown compression %TYPE%, contact me"
                cleanexit
            endif
         if SIZE > 700000000  # workaround for bigger files which can't be decompressed, they are unpacked as compressed
            log NAME OFFSET ZSIZE 1 # workaround
         else # workaround
            get DUMMY long 1    # ever 8, maybe a relative offset to data
            get XSIZE long 1    # same as SIZE (it's not related to chunks)
            savepos TMP 1
            xmath ZSIZE "ZSIZE - (TMP - OFFSET)"
            math OFFSET = TMP
            clog NAME OFFSET ZSIZE SIZE 1
         endif # workaround
        endif
    endif
Shteblanc
Posts: 2
Joined: Sun Oct 24, 2021 7:13 pm

Re: DEATHLOOP Subtitle File

Post by Shteblanc »

h3x3r wrote:Here are UI Menu etc texts.


Can you please extract Russian text?
h3x3r
Posts: 165
Joined: Wed Jun 01, 2016 5:53 pm

Re: DEATHLOOP Subtitle File

Post by h3x3r »

Here you go...
Shteblanc
Posts: 2
Joined: Sun Oct 24, 2021 7:13 pm

Re: DEATHLOOP Subtitle File

Post by Shteblanc »

h3x3r wrote:Here you go...


Thanks!
CidQu
Posts: 44
Joined: Tue Sep 14, 2021 12:25 am

Re: DEATHLOOP Subtitle File

Post by CidQu »

Is there any way to repack? Changing .index file is not an option anymore... It only makes more problems with it.
CidQu
Posts: 44
Joined: Tue Sep 14, 2021 12:25 am

Re: DEATHLOOP Subtitle File

Post by CidQu »

. Getting this error every time. Tried with reimport 2 and 3.
"Unknown compression, please contact me."

Image
h3x3r
Posts: 165
Joined: Wed Jun 01, 2016 5:53 pm

Re: DEATHLOOP Subtitle File

Post by h3x3r »

CidQu wrote:Changing .index file is not an option anymore...

Really? Then you must did something wrong. Tested today on fresh installation and it works.
Image
CidQu
Posts: 44
Joined: Tue Sep 14, 2021 12:25 am

Re: DEATHLOOP Subtitle File

Post by CidQu »

h3x3r wrote:
CidQu wrote:Changing .index file is not an option anymore...

Really? Then you must did something wrong. Tested today on fresh installation and it works.
Image


Sorry for misleading. Changing .index works but if I load all the .decl files game just crashes while loading save. I tried with starting a new save but didn’t worked. Game always crashes while loading.

I changed decl/localized/english/ to decl/localized/_nglish/ It works with one or two decl file, but not works with all of them.

I’m sending the decl files, can you check it?

https://cdn.discordapp.com/attachments/ ... /decls.zip
h3x3r
Posts: 165
Joined: Wed Jun 01, 2016 5:53 pm

Re: DEATHLOOP Subtitle File

Post by h3x3r »

Image
Tested on latest decls and as you can see... So I assume you have something wrong with decl files.

EDiT: I tested yours decls and it's also works.
CidQu
Posts: 44
Joined: Tue Sep 14, 2021 12:25 am

Re: DEATHLOOP Subtitle File

Post by CidQu »

h3x3r wrote:Image
Tested on latest decls and as you can see... So I assume you have something wrong with decl files.

EDiT: I tested yours decls and it's also works.


Can you send the master_resource file that you created? It doesn’t work with our made obviously.
h3x3r
Posts: 165
Joined: Wed Jun 01, 2016 5:53 pm

Re: DEATHLOOP Subtitle File

Post by h3x3r »

Here you go. Dissabled all decls in localized/eng folder + english_m.lang.

Code: Select all

https://drive.google.com/file/d/1XBY1z0RAHJ5LUq0k0QqV0lt82VaX6vMI/view?usp=sharing
CidQu
Posts: 44
Joined: Tue Sep 14, 2021 12:25 am

Re: DEATHLOOP Subtitle File

Post by CidQu »

h3x3r wrote:Here you go. Dissabled all decls in localized/eng folder + english_m.lang.

Code: Select all

https://drive.google.com/file/d/1XBY1z0RAHJ5LUq0k0QqV0lt82VaX6vMI/view?usp=sharing


Same error, didn’t changed anything just put english_m and decls. english_m works but when loading in to the game game crashes. Tried with the file you sent.

Here is the screenshot:
https://i.hizliresim.com/t48xfa1.jpeg
CidQu
Posts: 44
Joined: Tue Sep 14, 2021 12:25 am

Re: DEATHLOOP Subtitle File

Post by CidQu »

h3x3r wrote:Here you go. Dissabled all decls in localized/eng folder + english_m.lang.

Code: Select all

https://drive.google.com/file/d/1XBY1z0RAHJ5LUq0k0QqV0lt82VaX6vMI/view?usp=sharing


Okey so "colt_wakeup.decl" is corrupted. That's why it crashes all the time. Sorry for disturbing you :( Thank you for everything h3x3r!
h3x3r
Posts: 165
Joined: Wed Jun 01, 2016 5:53 pm

Re: DEATHLOOP Subtitle File

Post by h3x3r »

You are wellcome. I am glad you figured it out.
CidQu
Posts: 44
Joined: Tue Sep 14, 2021 12:25 am

Re: DEATHLOOP Subtitle File

Post by CidQu »

h3x3r wrote:You are wellcome. I am glad you figured it out.


Hey h3x3r, where to find the english_m file? I was able to find it before the update. Now we need to translate new strings but couldn't extract english_m, maybe it is my dumbness but I don't know. Can you please check if you have time to do it? Thank you so much.

I extracted all resources but couldn't find the string folder.
by-freon
Posts: 20
Joined: Sat Dec 22, 2018 2:56 pm

Re: DEATHLOOP Subtitle File

Post by by-freon »

Texts for menu from update 13.05
h3x3r
Posts: 165
Joined: Wed Jun 01, 2016 5:53 pm

Re: DEATHLOOP Subtitle File

Post by h3x3r »

Updated aluigi script for latest version. They have added another int into the table. + Loc

Code: Select all

# Deathloop
# information provided by h3x3r https://zenhax.com/viewtopic.php?p=66383#p66383

get EXT extension
if EXT != "index"
    print "Error: you must select master_resources.index"
    cleanexit
endif
callfunction BUILD_ARCHIVE_NUM 1

get FNAME BASENAME
get TYPE byte   # 5 for index, 4 for resources
idstring "SER"
endian big
get IDXSIZE long
getDString ZERO 0x18
get FILES long
endian little

math LAST_ARCHIVENUM = -1
for i = 0 < FILES
    get FILEID long
    get FTSTRLEN long
    getDString FILETYPE FTSTRLEN
    get FPSTRLEN long
    getDString SHORT_NAME FPSTRLEN
    get FFPSTRLEN long
    getDString NAME FFPSTRLEN
    get OFFSET longlong
    get SIZE long
    get ZSIZE long
    get DUMMY long  # ever zero, even if compressed
    get UNKN long   # ever zero, even if compressed
    get UNK long
    get ARCHIVENUM short
	string NAME p "%s/%s" FNAME NAME

    if ARCHIVENUM != LAST_ARCHIVENUM
        math LAST_ARCHIVENUM = ARCHIVENUM
        getarray TMP 0 ARCHIVENUM
        open FDSE TMP 1 EXISTS  # I leave this choice in case we only want few archives
    endif

    if EXISTS != 0
        if ZSIZE == SIZE
            log NAME OFFSET SIZE 1			
        else
            goto OFFSET 1
            getdstring TYPE 4 1
            if TYPE u== "OOD"
                comtype oodle
            else
                print "Error: unknown compression %TYPE%, contact me"
                cleanexit
            endif
			if SIZE > 700000000  # workaround for bigger files which can't be decompressed, they are unpacked as compressed 
				log NAME OFFSET ZSIZE 1 # workaround
			else # workaround
            get DUMMY long 1    # ever 8, maybe a relative offset to data
            get XSIZE long 1    # same as SIZE (it's not related to chunks)
            savepos TMP 1
            xmath ZSIZE "ZSIZE - (TMP - OFFSET)"
            math OFFSET = TMP
            clog NAME OFFSET ZSIZE SIZE 1
			endif # workaround
        endif
    endif

next i

startfunction BUILD_ARCHIVE_NUM
# you can also use: putarray 0 -1 file
putarray 0   0 rsc_decl_0.resources
putarray 0   1 rsc_gen_0_0.resources
putarray 0   2 rsc_gen_0_1.resources
putarray 0   3 map_menu_0.resources
putarray 0   4 map_antenna_01_p_0.resources
putarray 0   5 map_antenna_02_p_0.resources
putarray 0   6 map_antenna_03_p_0.resources
putarray 0   7 map_antenna_04_p_0.resources
putarray 0   8 map_island_01_p_0.resources
putarray 0   9 map_island_02_p_0.resources
putarray 0  10 map_island_03_p_0.resources
putarray 0  11 map_outro_p_0.resources
putarray 0  12 map_outro_02_0.resources
putarray 0  13 map_tutorial_01_p_0.resources
putarray 0  14 map_tutorial_02_0.resources
putarray 0  15 map_upper_antenna_p_0.resources
putarray 0  16 map_uppercity_01_p_0.resources
putarray 0  17 map_uppercity_02_p_0.resources
putarray 0  18 map_uppercity_03_p_0.resources
putarray 0  19 map_uppercity_04_p_0.resources
putarray 0  20 map_wharf_01_0.resources
putarray 0  21 map_wharf_03_0.resources
putarray 0  22 map_wharf_04_0.resources
putarray 0  23 rsc_images_0_0.resources
putarray 0  24 rsc_images_0_1.resources
putarray 0  25 rsc_images_0_2.resources
putarray 0  26 rsc_images_0_3.resources
putarray 0  27 rsc_images_0_4.resources
putarray 0  28 rsc_images_0_5.resources
putarray 0  29 rsc_images_0_6.resources
putarray 0  30 rsc_images_0_7.resources
putarray 0  31 rsc_images_0_8.resources
putarray 0  32 rsc_images_0_9.resources
putarray 0  33 rsc_images_0_10.resources
putarray 0  34 rsc_images_0_11.resources
putarray 0  35 rsc_images_0_12.resources
putarray 0  36 rsc_images_0_13.resources
putarray 0  37 rsc_images_0_14.resources
putarray 0  38 sfx/rsc_sounds_0_0.resources
putarray 0  39 sfx/rsc_sounds_0_1.resources
putarray 0  40 rsc_anims_0_0.resources
putarray 0  41 rsc_ui_0_0.resources
putarray 0  42 rsc_ui_0_1.resources
putarray 0  43 rsc_ui_0_2.resources
putarray 0  44 rsc_ui_0_3.resources
putarray 0  45 rsc_ui_0_4.resources
putarray 0  46 rsc_ui_0_5.resources
putarray 0  47 rsc_images_1_0.resources
putarray 0  48 rsc_images_1_1.resources
putarray 0  49 rsc_images_1_2.resources
putarray 0  50 rsc_images_1_3.resources
putarray 0  51 rsc_images_1_4.resources
putarray 0  52 rsc_images_1_5.resources
putarray 0  53 rsc_images_1_6.resources
putarray 0  54 rsc_images_1_7.resources
putarray 0  55 rsc_images_1_8.resources
putarray 0  56 sfx/rsc_sounds_1_0.resources
putarray 0  57 rsc_anims_1_0.resources
putarray 0  58 rsc_images_2_0.resources
putarray 0  59 rsc_images_2_1.resources
putarray 0  60 sfx/rsc_sounds_2_0.resources
putarray 0  61 rsc_anims_2_0.resources
putarray 0  62 rsc_images_3_0.resources
putarray 0  63 rsc_images_3_1.resources
putarray 0  64 sfx/rsc_sounds_3_0.resources
putarray 0  65 rsc_anims_3_0.resources
putarray 0  66 rsc_images_4_0.resources
putarray 0  67 sfx/rsc_sounds_4_0.resources
putarray 0  68 rsc_anims_4_0.resources
putarray 0  69 rsc_images_5_0.resources
putarray 0  70 sfx/rsc_sounds_5_0.resources
putarray 0  71 rsc_anims_5_0.resources
putarray 0  72 rsc_images_6_0.resources
putarray 0  73 sfx/rsc_sounds_6_0.resources
putarray 0  74 rsc_anims_6_0.resources
putarray 0  75 rsc_images_7_0.resources
putarray 0  76 sfx/rsc_sounds_7_0.resources
putarray 0  77 rsc_anims_7_0.resources
putarray 0  78 rsc_images_8_0.resources
putarray 0  79 sfx/rsc_sounds_8_0.resources
putarray 0  80 rsc_anims_8_0.resources
putarray 0  81 rsc_images_9_0.resources
putarray 0  82 sfx/rsc_sounds_9_0.resources
putarray 0  83 rsc_anims_9_0.resources
putarray 0  84 rsc_images_10_0.resources
putarray 0  85 sfx/rsc_sounds_10_0.resources
putarray 0  86 rsc_anims_10_0.resources
putarray 0  87 rsc_images_11_0.resources
putarray 0  88 sfx/rsc_sounds_11_0.resources
putarray 0  89 rsc_anims_11_0.resources
putarray 0  90 rsc_images_12_0.resources
putarray 0  91 sfx/rsc_sounds_12_0.resources
putarray 0  92 rsc_anims_12_0.resources
putarray 0  93 rsc_images_13_0.resources
putarray 0  94 sfx/rsc_sounds_13_0.resources
putarray 0  95 rsc_anims_13_0.resources
putarray 0  96 rsc_images_14_0.resources
putarray 0  97 sfx/rsc_sounds_14_0.resources
putarray 0  98 rsc_anims_14_0.resources
putarray 0  99 rsc_images_15_0.resources
putarray 0 100 sfx/rsc_sounds_15_0.resources
putarray 0 101 rsc_anims_15_0.resources
putarray 0 102 eLID_English/rsc_sounds_16_0.resources
putarray 0 103 eLID_French/rsc_sounds_17_0.resources
putarray 0 104 eLID_Italian/rsc_sounds_18_0.resources
putarray 0 105 eLID_German/rsc_sounds_19_0.resources
putarray 0 106 eLID_Spanish/rsc_sounds_20_0.resources
putarray 0 107 eLID_Russian/rsc_sounds_21_0.resources
putarray 0 108 eLID_Polish/rsc_sounds_22_0.resources
putarray 0 109 eLID_MexicanSpanish/rsc_sounds_23_0.resources
putarray 0 110 eLID_BrazilianPortuguese/rsc_sounds_24_0.resources
putarray 0 111 eLID_Japanese/rsc_sounds_26_0.resources
endfunction
Last edited by h3x3r on Fri Oct 07, 2022 4:15 pm, edited 1 time in total.