Git Product home page Git Product logo

3dstools's People

Contributors

abcboy101 avatar adibsurani avatar ihaveamac avatar littoma avatar mirusu400 avatar obsidianx avatar pleonex avatar tyulis avatar z6n4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

3dstools's Issues

Instructions for bcfnt.py

I can't seem to be able to use bcfnt.py. I tried typing "python bcfnt.py" in my cmd but it says:
"Traceback (most recent call last):
File "directory of the file", line 9, in
import png
ModuleNotFoundError: No module named 'png'"

I can't seem to find instructions in the readme for it either

Many problems when using `msbt.py` with python3

Currently trying to get msbt.py to work. Problems so far:

  • Invalid header magic bytes: b'MsgStdBn' (expected MsgStdBn). Fixed by replacing MSBT_MAGIC = 'MsgStdBn' with MSBT_MAGIC = b'MsgStdBn'
  • Invalid file size reported: 1614020608 (OS reports 13408) Weird but doesn't seem fatal
Traceback (most recent call last):
  File "/home/v/Downloads/msbt.py", line 624, in <module>
    msbt.to_json(args.json)
  File "/home/v/Downloads/msbt.py", line 164, in to_json
    label_lists = self.sections['LBL1']['data']
KeyError: 'LBL1'

Stuck with this one right now. Changing 'LBL1' to b'LBL1' doesn't help.

when extract nes remix .arc files ,show errors.

E:\website\WiiU\tools\3dstools-master\3dstools-master>sarc.py -xf Parts.arc
Invalid filename:
Hash: 0x0 (expected 0x75a5b6)
SARC archive is invalid

Can you add "wiiu nes remix Pack "to extract and pack .arc files to support?
thank you
attachment is "nes remix pack" orgin files.
layout.zip

png version?

Hello I'm trying to use the bflim tool, but I obtain this error

Traceback (most recent call last):
File "E:\pruebas\STG\pruebas\bflim.py", line 836, in
bflim.load(args.create)
File "E:\pruebas\STG\pruebas\bflim.py", line 273, in load
for row in list(pixels):
File "build\bdist.win32\egg\png.py", line 1427, in iterstraight
File "build\bdist.win32\egg\png.py", line 1656, in iterdecomp
File "build\bdist.win32\egg\png.py", line 1629, in iteridat
png.ChunkError: ChunkError: I/O operation on closed file

What version of png.py are you using?

Thanks

msbt.py Using a MSBT containing the Nintendo private-used 3DS Home Menu symbol leads to UnicodeEncodeError: 'ascii' codec can't encode character u'\ue073'

When runniny msbt.py with python2, I get the following error on a EU_English menu_msbt.lz (which is effectively a MsgStdBn/MSBT file) which is part of the european 3DS Home Menu:

Traceback (most recent call last):
  File "msbt.py", line 624, in <module>
    msbt.to_json(args.json)
  File "msbt.py", line 189, in to_json
    json.dump(output, open(filename, 'w'), indent=2, sort_keys=True, ensure_ascii=False)
  File "/usr/lib/python2.7/json/__init__.py", line 190, in dump
    fp.write(chunk)
UnicodeEncodeError: 'ascii' codec can't encode character u'\ue073' in position 9: ordinal not in range(128)

This character is within the Unicode Private Use Area and shows the 3DS home menu icon (e.g. displayed on the physical home menu button of each 3DS) when displayed on a 3DS.

After that error, the output .json looks like this:

{
  "strings": {
    "base_2b_cancel": [
      "Back"
    ], 
    "base_2b_newmake": [
      "Create"
    ], 
    "create_bu": [
      "Save Data Backup"
    ], 
    "dat_bu_notitle": [
      "Could not display"
    ], 
    "dat_bu_sub0": [
      "Select a save location."
    ], 
    "dat_dlg_bu_brkn": [
      "The backup data management\ninformation is corrupted.\nWould you like to create the\ninformation again?\n\u000e\u0001", 
      "\u0002UBackup data titles may not be\ndisplayed properly afterwards.\u000f\u0001", 
      ""
    ], 
    "dat_dlg_bu_cr0": [
      "The saved backup data\nwill be overwritten.\n\nIs this OK?"
    ], 
    "dat_dlg_bu_cr1": [
      "Saving data...\n\nDo not remove the SD Card\nor turn off the power."
    ], 
    "dat_dlg_bu_cr1_jan": [
      "Saving data...\n\nDo not remove the microSD\ncard or turn off the power."
    ], 
    "dat_dlg_bu_cr1_sac": [
      "Saving data...\n\nDo not remove the microSD\ncard or turn off the power."
    ], 
    "dat_dlg_bu_cr2": [
      "Saved.\n\nSaved backup data can be\nrestored or deleted via\nData Management in the\nSystem Settings."
    ], 
    "dat_dlg_bu_crerr": [
      "Data could not be saved."
    ], 
    "dat_dlg_bu_crng": [
      "Failed to create backup data\nmanagement information."
    ], 
    "dat_dlg_bu_ining": [
      ""
    ], 
    "dat_dlg_bu_iniok": [
      ""
    ], 
    "dat_dlg_bu_init": [
      ""
    ], 
    "dat_dlg_bu_mkext": [
      "Creating save data backup\nmanagement information...\nDo not remove the SD Card\nor turn off the power."
    ], 
    "dat_dlg_bu_mkext_jan": [
      "Creating save data backup\nmanagement information...\n\u000e\u0001", 
      "\u0002ZDo not remove the microSD card\nor turn off the power.\u000f\u0001", 
      ""
    ], 
    "dat_dlg_bu_mkext_sac": [
      "Creating save data backup\nmanagement information...\n\u000e\u0001", 
      "\u0002ZDo not remove the microSD card\nor turn off the power.\u000f\u0001", 
      ""
    ], 
    "dat_dlg_bu_nosav": [
      "There is no save data that can\nbe backed up."
    ], 
    "dat_dlg_bu_re1": [
      "Restoring backup data...\nDo not remove the SD Card\nor turn off the power."
    ], 
    "dat_dlg_bu_re1_jan": [
      "Restoring backup data...\nDo not remove the microSD\ncard or turn off the power."
    ], 
    "dat_dlg_bu_re1_sac": [
      "Restoring backup data...\nDo not remove the microSD\ncard or turn off the power."
    ], 
    "dat_dlg_bu_re2": [
      "The save data has been\nrestored from the backup."
    ], 
    "dat_dlg_bu_re3": [
      "The save data has been\nrestored from the backup.\n\n\u000e\u0001", 
      "\u0002UThe restored backup data\nhas been deleted.\u000f\u0001", 
      ""
    ], 
    "dat_dlg_bu_reerr": [
      "The save data could not be\nrestored from the backup."
    ], 
    "dat_dlg_bu_unsup": [
      ""
    ], 
    "dat_dlg_sd_full": [
      "There is not enough free\nspace on this SD Card."
    ], 
    "dat_dlg_sd_full_jan": [
      "There is not enough free\nspace on this microSD card."
    ], 
    "dat_dlg_sd_full_sac": [
      "There is not enough free\nspace on this microSD card."
    ], 
    "dat_no_backup": [
      "There is no backup data."
    ], 
    "lau_1b_badge_plt": [
      "Place Badges"
    ], 
    "lau_1b_icon_big": [
      "Enlarge Icons"
    ], 
    "lau_1b_icon_small": [
      "Shrink Icons"
    ], 
    "lau_1b_make_folder": [
      "Create Folder"
    ], 
    "lau_1b_ok": [
      "OK"
    ], 
    "lau_1b_petit_open": [
      "HOME Menu Settings"
    ], 
    "lau_1b_start": [
      "Open"
    ], 
    "lau_1b_unwrap": [
      "Unwrap"
    ], 
    "lau_2b_close": [
      "Close"
    ], 
    "lau_2b_delete": [
      "Stop"
    ], 
    "lau_2b_folder_name": [
      "%d (New Folder)"
    ], 
    "lau_2b_folder_noname": [
      "(No name)"
    ], 
    "lau_2b_folder_open": [
      "Open"
    ], 
    "lau_2b_folder_setting": [
      "Settings"
    ], 
    "lau_2b_manual": [
      "Manual"
    ], 
    "lau_2b_property": [
      "View Details"
    ], 
    "lau_2b_restart": 

png.ProtocolError: ProtocolError:

PS C:\3dstools> python ./bffnt.py -xf Caption_00.bffnt
Traceback (most recent call last):
File "C:\3dstools\bffnt.py", line 1234, in
bffnt.extract(args.ensure_ascii)
File "C:\3dstools\bffnt.py", line 341, in extract
writer.write(file_, png_data)
File "C:\Users\Fyred\AppData\Local\Programs\Python\Python311\Lib\site-packages\png.py", line 668, in write
nrows = self.write_passes(outfile, check_rows(rows))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Fyred\AppData\Local\Programs\Python\Python311\Lib\site-packages\png.py", line 703, in write_passes
return self.write_packed(outfile, rows)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Fyred\AppData\Local\Programs\Python\Python311\Lib\site-packages\png.py", line 738, in write_packed
for i, row in enumerate(rows):
File "C:\Users\Fyred\AppData\Local\Programs\Python\Python311\Lib\site-packages\png.py", line 658, in check_rows
raise ProtocolError(
png.ProtocolError: ProtocolError: Expected 2048 values but got 4096 values, in row 0

Any way to use bcfnt.py ?

i would love it if i could convert bcfnt to bffnt, or at least extract json and font data from bcfnt like bffnt.py does for bffnt files

msbt.py Using a MSBT containing CJK unicode characters leads to UnicodeEncodeError: 'ascii' codec can't encode character in position

When runniny msbt.py with python2, I get the following error on chinese, japanese and korean variants of the menu_msbt.lz (which is effectively a MsgStdBn/MSBT file) files which of the respective regional 3DS Home Menus. Example error for one of those regions:

Traceback (most recent call last):
  File "msbt.py", line 624, in <module>
    msbt.to_json(args.json)
  File "msbt.py", line 189, in to_json
    json.dump(output, open(filename, 'w'), indent=2, sort_keys=True, ensure_ascii=False)
  File "/usr/lib/python2.7/json/__init__.py", line 190, in dump
    fp.write(chunk)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 9-13: ordinal not in range(128)

After that error, the output .json looks like this:

{
  "strings": {
    "lau_1b_make_folder": 

msbt.py Using a MSBT containing the german ü umlaut leads to UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc'

When runniny msbt.py with python2, I get the following error on a german menu_msbt.lz (which is effectively a MsgStdBn/MSBT file) which is part of the european 3DS Home Menu:

Traceback (most recent call last):
  File "msbt.py", line 624, in <module>
    msbt.to_json(args.json)
  File "msbt.py", line 189, in to_json
    json.dump(output, open(filename, 'w'), indent=2, sort_keys=True, ensure_ascii=False)
  File "/usr/lib/python2.7/json/__init__.py", line 190, in dump
    fp.write(chunk)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 12: ordinal not in range(128)

This character is ü, one of the letters used in german.

After that error, the output .json looks like this:

{
  "strings": {
    "base_2b_cancel": 

License

I noticed you haven't put a license on this. Would it be okay if I used some of this code in one of my projects?

msbt.py Using a MSBT containing the reference mark symbol ※ leads to UnicodeEncodeError: 'ascii' codec can't encode character '\u203b'

When runniny msbt.py with python2, I get the following error on a US_English menu_msbt.lz (which is effectively a MsgStdBn/MSBT file) which is part of the american 3DS Home Menu:

Traceback (most recent call last):
  File "msbt.py", line 624, in <module>
    msbt.to_json(args.json)
  File "msbt.py", line 189, in to_json
    json.dump(output, open(filename, 'w'), indent=2, sort_keys=True, ensure_ascii=False)
  File "/usr/lib/python2.7/json/__init__.py", line 190, in dump
    fp.write(chunk)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u203b' in position 17: ordinal not in range(128)

This character is (reference mark symbol)

After that error, the output .json looks like this:

{
  "strings": {
    "base_2b_cancel": [
      "Back"
    ], 
    "base_2b_newmake": [
      "Create"
    ], 
    "create_bu": [
      "Save-Data Backup"
    ], 
    "dat_bu_notitle": [
      "Could not display"
    ], 
    "dat_bu_sub0": [
      "Select a save location."
    ], 
    "dat_dlg_bu_brkn": [
      "The backup-data management\ninformation is corrupted.\nWould you like to create the\ninformation again?\n\u000e\u0001", 
      "\u0002UBackup-data titles may not be\ndisplayed properly afterward.\u000f\u0001", 
      ""
    ], 
    "dat_dlg_bu_cr0": [
      "The saved backup data\nwill be overwritten.\n\nIs this OK?"
    ], 
    "dat_dlg_bu_cr1": [
      "Saving data...\n\nDo not remove the SD Card\nor turn off the power."
    ], 
    "dat_dlg_bu_cr1_jan": [
      "Saving data...\n\nDo not remove the microSD\nCard or turn off the power."
    ], 
    "dat_dlg_bu_cr1_sac": [
      "Saving data...\n\nDo not remove the microSD\nCard or turn off the power."
    ], 
    "dat_dlg_bu_cr2": [
      "Saved.\n\nSaved backup data can be\nrestored or deleted via\nData Management in\nSystem Settings."
    ], 
    "dat_dlg_bu_crerr": [
      "Data could not be saved."
    ], 
    "dat_dlg_bu_crng": [
      "Failed to create backup-data\nmanagement information."
    ], 
    "dat_dlg_bu_ining": [
      ""
    ], 
    "dat_dlg_bu_iniok": [
      ""
    ], 
    "dat_dlg_bu_init": [
      ""
    ], 
    "dat_dlg_bu_mkext": [
      "Creating backup-data\nmanagement information...\nDo not remove the SD Card\nor turn off the power."
    ], 
    "dat_dlg_bu_mkext_jan": [
      "Creating backup-data\nmanagement information...\nDo not remove the microSD\nCard or turn off the power."
    ], 
    "dat_dlg_bu_mkext_sac": [
      "Creating backup-data\nmanagement information...\nDo not remove the microSD\nCard or turn off the power."
    ], 
    "dat_dlg_bu_nosav": [
      "There is no save data that can\nbe backed up."
    ], 
    "dat_dlg_bu_re1": [
      "Restoring backup data...\nDo not remove the SD Card\nor turn off the power."
    ], 
    "dat_dlg_bu_re1_jan": [
      "Restoring backup data...\nDo not remove the microSD\nCard or turn off the power."
    ], 
    "dat_dlg_bu_re1_sac": [
      "Restoring backup data...\nDo not remove the microSD\nCard or turn off the power."
    ], 
    "dat_dlg_bu_re2": [
      "The save data has been\nrestored from the backup."
    ], 
    "dat_dlg_bu_re3": [
      "The save data has been\nrestored from the backup.\n\n\u000e\u0001"

[bflim.py] error when doing png -> bflim

Tried in latest python 2 and 3 versions.
python 2(7.18):

Traceback (most recent call last):
  File "bflim.py", line 836, in <module>
    bflim.load(args.create)
  File "bflim.py", line 273, in load
    for row in list(pixels):
  File "C:\Python27\lib\site-packages\png.py", line 1610, in iter_bytes_to_values
    for row in byte_rows:
  File "C:\Python27\lib\site-packages\png.py", line 1654, in iter_straight_byte_rows
    for some_bytes in byte_blocks:
  File "C:\Python27\lib\site-packages\png.py", line 2236, in decompress
    for data in data_blocks:
  File "C:\Python27\lib\site-packages\png.py", line 1874, in iteridat
    raise ChunkError(e.args[0])
png.ChunkError: ChunkError: I/O operation on closed file

python3(.11.3):

Traceback (most recent call last):
  File "D:\romhack stuff\tools\3dstools-master\bflim.py", line 836, in <module>
    bflim.load(args.create)
  File "D:\romhack stuff\tools\3dstools-master\bflim.py", line 273, in load
    for row in list(pixels):
               ^^^^^^^^^^^^
  File "C:\Python3\Lib\site-packages\png.py", line 1545, in _iter_bytes_to_values
    for row in byte_rows:
  File "C:\Python3\Lib\site-packages\png.py", line 1587, in _iter_straight_packed
    for some_bytes in byte_blocks:
  File "C:\Python3\Lib\site-packages\png.py", line 2194, in decompress
    for data in data_blocks:
  File "C:\Python3\Lib\site-packages\png.py", line 1826, in iteridat
    type, data = self.chunk(lenient=lenient)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python3\Lib\site-packages\png.py", line 1399, in chunk
    data = self.file.read(length)
           ^^^^^^^^^^^^^^^^^^^^^^
ValueError: read of closed file

bffnt.py unknown version errors

Hello, when trying to use bffnt.py to extract some bffnt files from the Wii U version of Zelda Breath of the Wild, I get the following errors in Linux.
Unknown version: 0x00000003 (expected 0x04000000)
When trying under windows I am getting the following error
Invalid FFNT magic bytes: b'FFNT' (expected FFNT)
Would it be possible to update bffnt.py to handle these newer BFFNT files?

bffnt.py ImportError: No module named png

Hey! i'm trying to extract a Super Mario 3D World font file and I'm getting an error that says: No module named png. Any ideas why this happens?

C:\Users\Lare\Desktop\3dstools-master>bffnt.py -x MarioFont64.bffnt
Traceback (most recent call last):
  File "C:\Users\Lare\Desktop\3dstools-master\bffnt.py", line 9, in <module>
    import png
ImportError: No module named png`

BFFNT usage gives me the strange picture

When I was about to change the font file of Splatoon, using this script by the following command
python.exe -xf GambitMain.bffnt
It gives me no error, it worked fine, but the extracted sheets (images) are not okay.
It's almost pink-purple here. So is there a way to fix it?
GambitMain.zip
GambitMain_sheet0

Using with pypng 0.0.19

bffnt incorrectly decodes ETC1 image

I have a font file for which bffnt fails to produce valid pngs. The resulting images contain many 8x8 blocks as expected, but the colours are all incorrect. Incidentally, I have to force the version to be 4 in code to allow it parse successfully. The file is correctly decoded by BFFNTtoGTX.bms. Font file attached.
turbo_messageFontOutline_50.zip

Get a struct.error when pack png to bflim

Sorry for my bad English first.
I'm hacking Yoshi's Wooly World. When I pack the png, I get a struct error:

py -3 bflim.py -c B293EF93-org.png new.bflim
Traceback (most recent call last):
  File "bflim.py", line 835, in <module>
    bflim.save(args.bflim_file)
  File "bflim.py", line 297, in save
    FLIM_UNKNOWN2, FLIM_MULTIPLIER, FLIM_UNKNOWN3)
struct.error: argument for 's' must be a bytes object

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.