ROM Hack [Release] Various 3DS editing tools

  • Thread starter Thread starter ObsidianB
  • Start date Start date
  • Views Views 16,927
  • Replies Replies 34
  • Likes Likes 19
image.png snapshot.png
is seems bflim.py is not correctly read flim lenght attribute on flim header (since script think file lenght as flim header lenght).

my tool able to convert that (to png), is used etc1 (0xB, 11), no rotate, image used blocks (no separate palette file needed),and bflim version is 117571840 :
spc_text.png

since image width is 0x80 and alignment 0x80, so no need adjust them.
So exactly which parts of blfim.py did you change? I included a shot of what I changed, but when I tried changing what I think you said, I get this and I don't know how to edit that:
 
So i i understood well i have to edit this https://github.com/ObsidianX/3dstools/blob/master/bflim.py
and change
FORMAT_ETC1_2 = 0x13 to FORMAT_ETC1_2 = 0x11
FORMAT_ETC1 = 0x0A to FORMAT_ETC1 = 0x0B
FLIM_UNKNOWN1 = 0x07020000 to FLIM_UNKNOWN1 = 0x117571840

is this ok or i did not understood well.

ETC1 = 0xA (dec : 10), ETC1A4 = 0xB (dec : 11), sorry. ETC2 is 0x13 (dec : 19). 117571840 is decimal number of 0x07020000 (on hex). see : https://gist.github.com/andibadra/c12285fd4008bae0685dd9ae2280cc99#file-bflim-md .

View attachment 58844 View attachment 58845
So exactly which parts of blfim.py did you change? I included a shot of what I changed, but when I tried changing what I think you said, I get this and I don't know how to edit that:

on line 359 iirc, is should width, height ... not height, width. and also swap all that parameter on swizzle switch like on line 244. since swizzle texture is have swapped parameter for width and height.
 
Last edited by andibad,
ETC1 = 0xA (dec : 10), ETC1A4 = 0xB (dec : 11), sorry. ETC2 is 0x13 (dec : 19). 117571840 is decimal number of 0x07020000 (on hex).



on line 359 iirc, is should width, height ... not height, width. and also swap all that parameter on swizzle switch like on line 244. since swizzle texture is have swapped parameter for width and height.
I actually found a different method to get everything working for me. It's fine now. Thanks.
 
ETC1 = 0xA (dec : 10), ETC1A4 = 0xB (dec : 11), sorry. ETC2 is 0x13 (dec : 19). 117571840 is decimal number of 0x07020000 (on hex). see : https://gist.github.com/andibadra/c12285fd4008bae0685dd9ae2280cc99#file-bflim-md .



on line 359 iirc, is should width, height ... not height, width. and also swap all that parameter on swizzle switch like on line 244. since swizzle texture is have swapped parameter for width and height.
what do you mean by swizzle switch???:unsure:
sorry for the necrobump....
 
Helloo everybody. This is a great tool, but... I can't extract a .bffnt WiiU font.I try i't >>>bffnt.py -xf IconFont80.bffnt <<<< But I receive a error. What I can do to extraxt .bffnt file
 

Attachments

  • Captura de tela_2018-02-24_13-34-15.png
    Captura de tela_2018-02-24_13-34-15.png
    40.3 KB · Views: 293
Last edited by alan_mugiwara,
I keep getting these errors with the bflim.py:
Error 1:
Traceback (most recent call last):
File "C:\Users\logzi\Desktop\Temporary Stuff\TFH\3dstools-master\bflim.py", line 834, in <module>
bflim.extract()
File "C:\Users\logzi\Desktop\Temporary Stuff\TFH\3dstools-master\bflim.py", line 208, in extract
writer.write(file_, png_data)
File "C:\Users\logzi\AppData\Local\Programs\Python\Python311\Lib\site-packages\png.py", line 670, in write
nrows = self.write_passes(outfile, check_rows(rows))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\logzi\AppData\Local\Programs\Python\Python311\Lib\site-packages\png.py", line 704, in write_passes
return self.write_packed(outfile, rows)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\logzi\AppData\Local\Programs\Python\Python311\Lib\site-packages\png.py", line 736, in write_packed
for i, row in enumerate(rows):
File "C:\Users\logzi\AppData\Local\Programs\Python\Python311\Lib\site-packages\png.py", line 660, in check_rows
raise ProtocolError(
png.ProtocolError: ProtocolError: Expected 128 values but got 256 value, in row 0


Error 2:
File "C:\Users\logzi\Desktop\Temporary Stuff\TFH\3dstools-master\bflim.py", line 829, in <module>
bflim.read(args.bflim_file, parse_image=args.extract)
File "C:\Users\logzi\Desktop\Temporary Stuff\TFH\3dstools-master\bflim.py", line 167, in read
self.bmp = self._parse_image_data(bmp_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\logzi\Desktop\Temporary Stuff\TFH\3dstools-master\bflim.py", line 627, in _parse_image_data
pixel = self._get_rgba_pixel(data, format_, data_pos)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\logzi\Desktop\Temporary Stuff\TFH\3dstools-master\bflim.py", line 706, in _get_rgba_pixel
l = struct.unpack('B', data[index / 2])[0]
~~~~^^^^^^^^^^^
TypeError: byte indices must be integers or slices, not float

I've only tried two files, but they both give the same error every time

In case you're wondering, these files are from triforce heroes
 
Last edited by LeedleFace,

Site & Scene News

Popular threads in this forum