Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

The Legend of Heroes: Trails of Cold Steel III (Steam) PKA & PKG file help

Featured Replies

  • Author
  • Localization

Mysticus, posted Sat Aug 15, 2020 5:00 pm (58087)


Does anybody of you know some program or script to extract this assets.pka file from Trails of Cold Steel 3?
I tried with the ToCS script of Luigi but I ended up with the big dat file.
Also the script doesn't work well with pkg files.
I need help please.
  • Author
  • Localization

aluigi, posted Mon Aug 17, 2020 10:27 am (58114)


The parts of the table containing offset and size of the files are encrypted.
The demo of the game doesn't use encryption.
I don't think I can do anything but I will keep you update if I have news.
  • Author
  • Localization

Ekey, posted Mon Aug 17, 2020 6:29 pm (58126)


I'm not sure about encrypted values because they are repeated in the next table, it looks more like 2 hashes like MD5/SHA1. The second table has values more similar to toc.

I think it looks like this:
First table - filenames hashes
The second table - hashes toc

Example for first entry > asset_D3D11.xml :

We have a two values (hashes) after the file name in first table
Code:
17 3E BC 7E 83 09 36 69 F8 EA 57 0B 2C F6 DE 9E
97 02 C7 75 8F 97 2D 0A 5C F5 6C FE CF D5 7B FF


These hashes are also in the second table:
Code:
17 3E BC 7E 83 09 36 69 F8 EA 57 0B 2C F6 DE 9E
97 02 C7 75 8F 97 2D 0A 5C F5 6C FE CF D5 7B FF


And toc after them with structure (Int64, Int, Int, Int) (Offset, ZSize, Size, CompType)
Code:
30 3D A1 01 00 00 00 00 3D 04 00 00 EA 0F 00 00 04 00 00 00


The table is quite huge since the archive size is 20GB, therefore, the cutted piece on first post is not complete :)

I cut out 20mb - that's enough for research: https://www112.zippyshare.com/v/fWq9fBrL/file.html

Edited:

Code:
  if ( CompType & 1 )
  {
    Type = "LZSS";
  }
  else if ( CompType & 4 )
  {
    Type = "LZ4";
  }
  else if ( CompType & 8 )
  {
    Type = "LZMA";
  }
  else
  {
    Type = "none";
    if ( CompType & 0x10 )
      Type = "ZSTD";
  }


Edited2: I can confirm i was right :)

Image

Offset
303DA10100000000 -> 27344176

ZSize
3D040000 -> 1085

Size
EA0F0000 -> 4074

Comtype -> 4 (LZ4)

Code:


   
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
   




:mrgreen:
  • Author
  • Localization

aluigi, posted Mon Aug 17, 2020 8:45 pm (58127)


Where is this second TOC?
In the sample there is only filename hashes.

*edit* ok it was in the part not available in the sample
  • Author
  • Localization

Ekey, posted Tue Aug 18, 2020 12:08 am (58130)


Good job :P
  • Author
  • Localization

Mysticus, posted Tue Aug 18, 2020 7:40 am (58153)


Thank you very much for being so kind, Luigi!
I deeply owe you one.
  • Author
  • Localization

aluigi, posted Thu Nov 19, 2020 12:03 pm (60429)


I have a couple of questions about this game and the script I made:

1) are we sure the compression of Type & 1 is "lzss"?
In my original script of 2017 I used "nislzs" (with ZSIZE and SIZE repeated in the first 8 bytes)

2) the new script doesn't work with the PKG file provided by Mysticus in the first topic and those of the demo too.
So is the script supposed for the PKA files only?
  • Author
  • Localization

aluigi, posted Thu Nov 19, 2020 1:01 pm (60438)


I just checked on my own and I was right.
PKA and PKG are different.
And yes, it's nislzs.
I removed the script above and put everything in the following:
http://aluigi.org/bms/legend_of_heroes.bms
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.