ROM Hack [Release] Various 3DS editing tools

Screw_the_Rules

Well-Known Member
Member
Joined
Jul 15, 2014
Messages
152
Trophies
0
Age
32
XP
2,096
Country
United States
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:
 

andibad

Soon™
Member
Joined
Sep 14, 2009
Messages
701
Trophies
0
Location
hospital
XP
247
Country
Indonesia
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,

Screw_the_Rules

Well-Known Member
Member
Joined
Jul 15, 2014
Messages
152
Trophies
0
Age
32
XP
2,096
Country
United States
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.
 

mooglazer

Well-Known Member
Member
Joined
Jun 24, 2007
Messages
213
Trophies
1
XP
690
Country
United States

Sonansune

Well-Known Member
Member
Joined
Jul 2, 2015
Messages
3,734
Trophies
1
XP
2,144
Country
Canada
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....
 

alan_mugiwara

Active Member
Newcomer
Joined
Mar 29, 2017
Messages
33
Trophies
0
Location
Brazil
Website
3dsounada.blogspot.com.br
XP
117
Country
Brazil
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: 261
Last edited by alan_mugiwara,

LeedleFace

Member
Newcomer
Joined
Feb 5, 2021
Messages
20
Trophies
0
Age
23
XP
110
Country
United States
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

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: Although it's kinda pointless to download them anyway since you get the movies in horrible quality