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.

Table format conversion/decompression

Featured Replies

  • Author
  • Localization

lorak, posted Sat Aug 19, 2017 3:00 am (25719)


I have access to game saves and game files from a video game.
At this moment I am interested in editing certain tables form game files. Some of those game files tables also appear in game saves.
The problem is that the table formats in both ends look a bit different.

Table example from game saves:
Code:
xx xx xx xx 03 00 02 00 00 00 FF FF 04 00 00 00 
00 00 00 00 EC 4B 2C 66 03 00 00 00 B0 00 00 00
43 47 49 44 02 00 00 00 03 00 00 00 B2 00 00 00
4C 47 49 44 02 00 00 00 00 00 00 00 10 00 00 00
43 4E 41 4D A0 00 00 00 03 00 00 00 00 00 00 00
4E 43 63 6C 10 00 00 00 22 00 4E 46 43 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 41 00
23 00 41 46 43 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 61 74 61 62 61 73 65 5C
67 61 6D 65 6D 6F 64 65 73 5C 67 61 6D 65 6D 6F
98 14 67 3F 06 00 00 00 08 00 00 00 3F 00 00 00
00 00 00 00 xx xx xx xx xx xx xx xx xx xx xx xx


Table example from game files:
Code:
xx xx xx xx xx xx xx xx xx xx xx xx 03 00 02 00 
00 FF FF 04 00 00 00 00 00 00 00 B0 57 1E 7C 00
00 00 03 00 00 00 B0 44 49 47 43 00 00 00 02 00
00 00 03 00 00 00 B2 44 49 47 4C 00 00 00 02 00
00 00 00 00 00 00 10 4D 41 4E 43 00 00 00 A0 00
00 00 03 00 00 00 00 6C 63 43 4E 00 00 00 10 00
22 4E 46 43 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 40 00 00 23 41 46 43 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 61
73 65 5C 67 61 6D 65 6D 6F 64 65 73 5C 67 61 6D
65 6D 6F 64 65 2E 64 BE 49 5C B0 00 00 00 02 00
00 00 08 00 00 00 xx xx xx xx xx xx xx xx xx xx


What I already know from the tables above:
  • Both tables contain the same elements (information).
  • 1st two bytes in each table refer to maximum number of elements the table can hold (0003).
  • Next 2 bytes refer to current number of elements in the table (0002).
  • Byte 9 in game saves and (8 in game files) with hex-value 04 is the number of fields in the table (FFFF04).
  • In the first table (from game saves), the first field name is in bytes 28-31, byte 32 is the number of bits to allocate a value in that field. On the other hand, in the second table (from game files), the first field name is also in bytes 28-31, but byte 35 (not 32) is the number of bits to allocate a value in that field.
  • The first element of the game saves table starts at hex-value 22 in row 6 until hex-value 41 in row 7. In a similar way we can identify the first element in the game files table.
  • The second and last element of the game saves table starts at hex-value 23 in row 8 until byte 7 in row 9. In a similar way we can identify the first element in the game files table. Similar for the game files table.
  • We have some text from hex-value 61 in row 9 until byte 5 in row 11 in game saves table. For game file table this text starts in the last byte of row 9 until byte 11 in row 11.
  • Do not know about the rest of the bytes.

Below is the information stored in the tables above in a human friendly format:
Code:
CGID    LGID   CNAM    NCcl
 1       0      NFC    35
 0       0      AFC    34

It looks like an endianness related, decompression issue or something similar, in my humble opinion. I have an editor that can deal with game saves tables but cannot do it with game files tables. For that reason I would like to be able to swap between both "formats".

I have tried
Code:
quickbms -E
(to swap endianness) trying to convert from game saves to game files format and vice versa with no luck, the format is still incorrect in the end. Both files (tables) above can be downloaded from this link.

Thanks in advance.

Edit: Many thanks for moving this thread to Game archive sub-forum.
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.