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.

Format IDX

Featured Replies

  • Author
  • Localization

cover1995, posted Fri Nov 28, 2014 2:32 pm (2029)


We unpacked resources in order to translate the texts and names of subjects and objects from chineese into another language. But the problem is chineeze words and sentences have much less symbols than the same English or Russian ones. So after the process of translation the size of these files has been enlarged and it became impossible to reimport these enlarged files. So it is of no sense to unpack and translate the files.

Do we need to unpack, translate, change the size and try to repack the definite files? My experience shows that it all is in vain. So is it possible to create a new archive which will have the same file structure but will not dictate the definite file size? I mean, we could unpack all the archive files, change them (enlarge their size) and then create a new (but in fact it will be just the same) archive which would have the same structure and the same list of files.

data.cnt http://rghost.ru/59275513
data.idx http://rghost.ru/59275522
  • Author
  • Localization

aluigi, posted Fri Nov 28, 2014 2:57 pm (2031)


Any solution is not easy but "probably" the simplest one is:

1) finding the exact part in the uncompressed IDX file where are located the OFFSET and SIZE field.
You can use quickbms -V -0 (zero) to find the offset in the IDX file where are located these two fields, for example:
Code:
. 00112233 get     OFFSET     0x00004455 4
  |                |          |          |
  |                |          |          size of the field (4 is long)
  |                |          value
  |                name of the field
  offset of the field in the file


2) take note of the current size of the CNT archive, it will be the new OFFSET field.

3) append the new modified file to the CNT one by using a hex editor or a script like the following:
Code:
get SIZE asize
append
log "data.cnt" 0 SIZE
open FDSE "data.cnt"
get OFFSET asize
math OFFSET -= SIZE
print "new OFFSET %OFFSET|x%"
print "new SIZE   %SIZE|x%"
quickbms script.bms new_file c:\folder_of_the_game

4) open the IDX file with a hex editor and go to the position where are located the OFFSET and SIZE field of the new file you appended and replace these values with the new ones

I think it's easier than what it seems.
  • Author
  • Localization

cover1995, posted Sat Nov 29, 2014 12:00 pm (2051)


Unfortunately I appeared to be too dumm to follow your instruction. I don't understand why it doesn't work.
I can describe my actions step by step.
We have 3 files: "data.idx" "data.cnt" and "data" (we've unpacked the last file from "data.cnt" with the help of 7zip).
1) According to step 1 I am to find offset and size of the needed file.
quickbms -V -0 script.bms data.idx .\ > INFO.txt (in your message it was script.bms on the previous page)
I create file INFO.txt and seek information about the needed file inside it (FONTS.INI):
Image
Do I understand it properly? This is the information about the location of FONTS.INI inside of "data".

2) According to step 2 I am to note the CNT archive's size, but for what? Did you mean the size of "data.cnt"? May be you meant the size of "data"?

3) Format CNT ("data.cnt") is absolutely unreadable as well as rar or zip. On the contrary I can read "data" as a txt file.

I've stuck ((( I cannot execute neither step 2 nor 3 ((
Would you please make the instruction a little bit more detalized?
  • Author
  • Localization

aluigi, posted Sat Nov 29, 2014 3:29 pm (2053)


Basically the idea of this trick is appending your modified file at the end of the archive and so you must modify the OFFSET and SIZE values on the index file so that instead of reading the old file it will read the new one without problems of size.

In your example 0xc4c is the position of the index file where is located the OFFSET field of the file you extracted.
So you must replace that value in IDX with the current size of DATA (not data.cnt) because it will be the new offset.

Append your file.ini at the end of DATA.
Go to offset 0xc50 of IDX and write the size of file.ini

Save IDX and DATA, compress DATA as DATA.cnt and you should be fine.


PS: in my previous description I forgot that the cnt file is compressed and not the idx one, that's the reason about the IDX, CNT and no-extension confusion.
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.