Git Product home page Git Product logo

Comments (20)

Random06457 avatar Random06457 commented on June 5, 2024

I have the same problem

from 3dstools.

SamusAranX avatar SamusAranX commented on June 5, 2024

For some reason, this won't work with Python 3, that's where your "Invalid FFNT magic bytes" error comes from.
The version error seems to be legit, though.

from 3dstools.

ObsidianX avatar ObsidianX commented on June 5, 2024

I don't have time at the moment to add support for a new BFFNT version but I'm more than happy to accept pull requests :)

from 3dstools.

 avatar commented on June 5, 2024

I also received in the windows system:'Unknown version: 0x00000003 (expected 0x04000000)'errors.
Which version of python should I use?

from 3dstools.

ObsidianX avatar ObsidianX commented on June 5, 2024

I also received in the windows system:'Unknown version: 0x00000003 (expected 0x04000000)'errors.
Which version of python should I use?

That error means you're trying to parse a newer version of BFFNT than this script understands.

from 3dstools.

CyberSlimp avatar CyberSlimp commented on June 5, 2024

Can You fix "Unknown version: 0x00000003 (expected 0x04000000)" please?

from 3dstools.

ObsidianX avatar ObsidianX commented on June 5, 2024

It's not a bug, that's adding support for version 4 which may be significantly different.

from 3dstools.

CyberSlimp avatar CyberSlimp commented on June 5, 2024

Yes exactly. Already read the specification. Support for the 4th version is planned?

from 3dstools.

ObsidianX avatar ObsidianX commented on June 5, 2024

I will not be adding support, myself, but I am always open to Pull Requests.

from 3dstools.

Tyulis avatar Tyulis commented on June 5, 2024

Can you try now? I pull requested to add version 3 and Python3 support

from 3dstools.

CyberSlimp avatar CyberSlimp commented on June 5, 2024

Hi, great news.
I try unpack bffnt but see error

G:\Zelda-Decompress\3dstools-master>bffnt.py -xf CKingMain.bffnt
Traceback (most recent call last):
File "G:\Zelda-Decompress\3dstools-master\bffnt.py", line 1257, in
bffnt.read(args.file)
File "G:\Zelda-Decompress\3dstools-master\bffnt.py", line 160, in read
self._parse_tglp_header(data[position:position + TGLP_HEADER_SIZE])
File "G:\Zelda-Decompress\3dstools-master\bffnt.py", line 654, in _parse_tglp_header
magic, section_size, cell_width, cell_height, baseline_position, max_char_width, sheet_size, num_sheets, sheet_pixel_format, num_sheet_cols, num_sheet_rows, sheet_width, sheet_height, sheet_data_offset = struct.unpack(TGLP_HEADER_STRUCT_3 % self.order, data)
struct.error: unpack requires a string argument of length 32

I make something wrong?

from 3dstools.

Tyulis avatar Tyulis commented on June 5, 2024

Don't worry, it's a program error. I think i see what kind of error it is, but can you send the bffnt file, for further testing? And which Python version do you use?

from 3dstools.

CyberSlimp avatar CyberSlimp commented on June 5, 2024

OK, i add file. I use 2.7 Python bcs with v3 I had some problems
CKingMain.zip

from 3dstools.

Tyulis avatar Tyulis commented on June 5, 2024

Ok... Not as i thought, this is not a "renamed" CFNT (which have normally version 3). I tried and it works if extracted as v4, but... The result is very strange. A bugged blue image. I see 2 possibilities: a bug in the decompression algorithm (because the texture is compressed), or a different structure. While i haven't find the problem, this issue has to be reopened...

from 3dstools.

Tyulis avatar Tyulis commented on June 5, 2024

Do you have some other files like this one, to do comparisons? This would be helpful.

from 3dstools.

CyberSlimp avatar CyberSlimp commented on June 5, 2024

Hello.
I dont have more same files, but i can convert it file to good reading GTX files and convert it to DDS with this BFFNTtoGTX.zip quickbms script, And after some steps i can make PNG - ckingmsg_43x51_0

But i cant convert it back to BFFNT file after make changes in PNG(

from 3dstools.

Tyulis avatar Tyulis commented on June 5, 2024

I don't really know GTX and DDS formats, but i see that this script extracts header and creates GTX headers from this, but left data unchanged... What do you used to convert GTX to DDS and DDS to PNG?

from 3dstools.

CyberSlimp avatar CyberSlimp commented on June 5, 2024

Hi.
For GTX to DDS i use this script
For DDS to PNG this software
And sometime i use fix for DDS (if corrupt background), its a QuickBMS script.

from 3dstools.

Tyulis avatar Tyulis commented on June 5, 2024

Ok, i'll try to see that. Thanks for help.

from 3dstools.

Tyulis avatar Tyulis commented on June 5, 2024

Fixed the version issue. The problem is with the texture decompression or format

from 3dstools.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.