ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Wed Dec 08, 2021 4:07 am

All times are UTC




Post new topic  Reply to topic  [ 32 posts ]  Go to page 1 2 Next
Author Message
PostPosted: Tue Feb 09, 2021 12:03 pm 

Joined: Tue Feb 09, 2021 11:55 am
Posts: 16
hello, i am trying to translate the pc game lacrimosa of dana,
I have a couple of little problems,

I have a file called font.itf but I have no idea how to open it or edit to put the symbols ¿¡ that are used in spanish to open question-exclamation do not appear.

On the other hand, I have a lot of .itp files that I have no idea how to open them, because I guess a lot of text is in image format...and it is compressed there.?


thanks


Top
   
PostPosted: Sun Feb 14, 2021 9:26 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 12674
Please upload that file (or files) to allow other users to analyze it.


Top
   
PostPosted: Sun Feb 14, 2021 11:23 am 

Joined: Tue Feb 09, 2021 11:55 am
Posts: 16
aluigi wrote:
Please upload that file (or files) to allow other users to analyze it.


one font are .itf and the other example for a .itp
http://www.mediafire.com/file/89qqx49wj ... t.itf/file
http://www.mediafire.com/file/ltserlvka ... 4.itp/file


Top
   
PostPosted: Thu Feb 18, 2021 8:24 am 

Joined: Wed Apr 17, 2019 4:03 pm
Posts: 20
Hi, buddy, Maybe I can help. I've made some fan translations of falcom games (zwei!! series) and do love this game very much .
and I have a version of fan translation of this game in my language (not made by me, though).
I'll try to figure out the data format and put results here~(maybe in 1 to 2 weeks)
However I know nothing about BMS script, so I cannot write BMS script for you, instead, I can show you python/c++ source code to extract them or create a simple executable to do this.


Top
   
PostPosted: Thu Feb 18, 2021 12:03 pm 

Joined: Tue Feb 09, 2021 11:55 am
Posts: 16
haibaer wrote:
Hi, buddy, Maybe I can help. I've made some fan translations of falcom games (zwei!! series) and do love this game very much .
and I have a version of fan translation of this game in my language (not made by me, though).
I'll try to figure out the data format and put results here~(maybe in 1 to 2 weeks)
However I know nothing about BMS script, so I cannot write BMS script for you, instead, I can show you python/c++ source code to extract them or create a simple executable to do this.


all help is welcome.

In the case of the game, there are only two problems, they are all the images in .itp format (you have to open them to have an editable image format) and the font file to add some of them.
The game text there is no problem.

I'll keep an eye out for your information

can you tell me in which language it has been translated, can you give me a link to the translation so I can have a look at it?

thanks ^^


Top
   
PostPosted: Sun Feb 21, 2021 12:37 pm 

Joined: Wed Apr 17, 2019 4:03 pm
Posts: 20
Those itp files are actually DDS files swizzled and compressed.
I still need some time to write a program to extract it.

itf files should be easier, most of glyphs are in 8-bit greyscale bitmaps.

The following code snippet shows how to decompress the data part of itp files.

I'll write a complete executable when possible and put it here.

Code:
def decompress(filedata):
  width, height = struct.unpack('<II', filedata[0x10:0x18])
  print(width, height)
  if filedata[0x50:0x54] != b'IDAT':
    raise Exception('error format')

  offset = 0x74
  bitmap = bytearray()
  next_chunk_offset = offset + 8 + struct.unpack('<I', filedata[offset:offset+4])[0]
  offset += 0xc

  while True:
    count += 1
    arg1 = filedata[offset]
    arg2 = filedata[offset+1]
    offset += 2
    if arg1 == 0:
      bitmap += filedata[offset:offset+arg2]
      offset += arg2
    else:
      start = -arg2 - 1 + len(bitmap)
      for i in range(arg1):
        bitmap += bitmap[start + i].to_bytes(1, byteorder='little')

      offset += 1
      bitmap += filedata[offset].to_bytes(1, byteorder='little')

    if offset >= next_chunk_offset:
      if filedata[offset:offset+4] == b'IEND':
        break
      offset = next_chunk_offset
      next_chunk_offset = offset + 8 + struct.unpack('<I', filedata[offset:offset+4])[0]
      print(format(next_chunk_offset, 'x'), format(struct.unpack('<I', filedata[offset:offset+4])[0], 'x'))
      offset += 0xc

  bitmap = unswizzle(bitmap)
 


Top
   
PostPosted: Sun Feb 21, 2021 3:15 pm 

Joined: Tue Feb 09, 2021 11:55 am
Posts: 16
wow haibaer its amazing!, if helps i found a extractor for the itp for lacrimosa of dana.
https://github.com/Coxxs/itpcnv-dana ..it's a simple javascript .. (sorry i dont know anything of programming)

the question of that is how to compress again the image file when it is edited


Top
   
PostPosted: Mon Feb 22, 2021 2:34 am 

Joined: Wed Apr 17, 2019 4:03 pm
Posts: 20
cloudyst wrote:
wow haibaer its amazing!, if helps i found a extractor for the itp for lacrimosa of dana.
https://github.com/Coxxs/itpcnv-dana ..it's a simple javascript .. (sorry i dont know anything of programming)

the question of that is how to compress again the image file when it is edited


I'm writing the encoder, it should be quiet easy.
Besides, you can try put your modified image with same name (in DX10 dds format) in the "texpack" folder.
If I didn't think it wrong,the game will try to load corresponding file in that folder first.


Top
   
PostPosted: Mon Feb 22, 2021 7:48 am 

Joined: Tue Feb 09, 2021 11:55 am
Posts: 16
haibaer wrote:
cloudyst wrote:
wow haibaer its amazing!, if helps i found a extractor for the itp for lacrimosa of dana.
https://github.com/Coxxs/itpcnv-dana ..it's a simple javascript .. (sorry i dont know anything of programming)

the question of that is how to compress again the image file when it is edited


I'm writing the encoder, it should be quiet easy.
Besides, you can try put your modified image with same name (in DX10 dds format) in the "texpack" folder.
If I didn't think it wrong,the game will try to load corresponding file in that folder first.


yes if put dds in the texpack works :o , but there are more than 400images (only in help and topics)...will consume more (or a lot) vram if I do this?


Top
   
PostPosted: Mon Feb 22, 2021 8:24 am 

Joined: Wed Apr 17, 2019 4:03 pm
Posts: 20
I can't guarantee the usage of vram, but it should be ok as the official updating did the same thing.
And my encoder won't do any compression, because it's not an easy work to recover it's original compression strategy(I can try some strategies, but there's no guarantee about it's compression ratio, sorry I'm not familiar with compression techniques), so the itp files will be larger than it's original size.


Top
   
PostPosted: Mon Feb 22, 2021 9:59 am 

Joined: Tue Feb 09, 2021 11:55 am
Posts: 16
well, in the end it's testing it. I think is not compresion but keep the original format is better?

I also don't know if the itp are loaded when starting the game or work in another way, besides I suppose that if someone want to port the translation to the console version... they don't have a "texpack" folder.


Top
   
PostPosted: Sun Feb 28, 2021 9:54 am 

Joined: Wed Apr 17, 2019 4:03 pm
Posts: 20
Here goes the beta version of the converter.
It's not fully tested, so I'm not sure if it works for all files, and uses no compression.
I don't have much time to test it, maybe I need your help :)
https://www23.zippyshare.com/v/Pd5WxsxF/file.html

I'll fix bugs if you find any and add a LZ77 based compression strategy to reduce the file size when I get some free time.


Top
   
PostPosted: Sun Feb 28, 2021 12:30 pm 

Joined: Tue Feb 09, 2021 11:55 am
Posts: 16
haibaer wrote:
Here goes the beta version of the converter.
It's not fully tested, so I'm not sure if it works for all files, and uses no compression.
I don't have much time to test it, maybe I need your help :)
https://www23.zippyshare.com/v/Pd5WxsxF/file.html

I'll fix bugs if you find any and add a LZ77 based compression strategy to reduce the file size when I get some free time.


can explain how work? i put a file in file to execute them a show this error.
https://ibb.co/p0YXyg9 (this name files not found)


p.d lol, to enter zippyshare i need a vpn from spain ... :o


Top
   
PostPosted: Sun Feb 28, 2021 12:39 pm 

Joined: Wed Apr 17, 2019 4:03 pm
Posts: 20
Oh, I see. It needs some dlls to run. It should be easy to get those dlls from internet.
Anyway, I'll try to compile it with another compiler to remove these dependencies.
I'm not familiar with zippyshare either, tell me if you have a better way to share files :)

And, it's a CLI program, you can execute it in powershell.


Top
   
PostPosted: Sun Feb 28, 2021 1:31 pm 

Joined: Tue Feb 09, 2021 11:55 am
Posts: 16
you can use http://www.mediafire.com


i need an explanation for a noob, i know a little the comands for powershell but execute the file and do nothing. Need a command to convert and re-convert¿?


Last edited by cloudyst on Mon Mar 01, 2021 8:01 am, edited 1 time in total.

Top
   
PostPosted: Mon Mar 01, 2021 2:20 am 

Joined: Wed Apr 17, 2019 4:03 pm
Posts: 20
try this one.
http://www.mediafire.com/file/y8pa0y5hv ... t.exe/file

About how to use this, just open the powershell and execute the executable.
itp_cvt.exe -to_dds filename -> convert itp file to dds file
itp_cvt.exe -to_itp filename -> convert dds file to itp file


Top
   
PostPosted: Mon Mar 01, 2021 8:04 am 

Joined: Tue Feb 09, 2021 11:55 am
Posts: 16
yep, works and dont work... the itp for example works..but i try others (or convert a .dds i have and the game crash) and dont work...i think because are diferent size?
https://ibb.co/vjVQD8H


Top
   
PostPosted: Mon Mar 01, 2021 8:26 am 

Joined: Wed Apr 17, 2019 4:03 pm
Posts: 20
cloudyst wrote:
yep, works and dont work... the itp for example works..but i try others (or convert a .dds i have and the game crash) and dont work...i think because are diferent size?
https://ibb.co/vjVQD8H


Could you tell me the file name that failed? And when do the game crash(corresponding game save data would be helpful)?


Top
   
PostPosted: Mon Mar 01, 2021 8:37 am 

Joined: Tue Feb 09, 2021 11:55 am
Posts: 16
http://www.mediafire.com/file/ynafhxkyy ... op.7z/file

more itp to try...

the only works is tipbg04 .. the same in example... unfortunately it's one that has no text and I can't check in game .. the others are dds mine (works in folder textack)..but i supose not extrack with this there are problems?

I tried to transfer this dds to itp and the game breaks before I get to the menu, this is just the initial menu of the game.
http://www.mediafire.com/file/5xh9ujvf7 ... n.dds/file


Top
   
PostPosted: Mon Mar 01, 2021 9:40 am 

Joined: Wed Apr 17, 2019 4:03 pm
Posts: 20
cloudyst wrote:
http://www.mediafire.com/file/ynafhxkyy571qe0/Desktop.7z/file

more itp to try...

the only works is tipbg04 .. the same in example... unfortunately it's one that has no text and I can't check in game .. the others are dds mine (works in folder textack)..but i supose not extrack with this there are problems?

I tried to transfer this dds to itp and the game breaks before I get to the menu, this is just the initial menu of the game.
http://www.mediafire.com/file/5xh9ujvf7 ... n.dds/file


http://www.mediafire.com/file/g6bsqyo5f ... 1.exe/file

fixed, all your uploaded files should be converted to dds file correctly :) :D
And about dds to itp, your dds file should use DX10 format and bc7 compression.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 32 posts ]  Go to page 1 2 Next

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited