Hacking byaml.py: command line python tool to convert .byaml to .xml

tesnos6921

Active Member
OP
Newcomer
Joined
Nov 1, 2015
Messages
28
Trophies
0
XP
372
Country
United States
This has been my pet project over the past week or so. It's nowhere near as nice as the tools available for Wii U, but those either only supported big endian or just wouldn't work for me. I may implement .xml to .byaml conversion in the future, it depends on if someone else makes something better (probable) and if that sort of thing is ever going to even be needed. This may also work for 3DS, but I personally haven't tried.

To use this tool, open the directory containing byaml.py and your files and then run the following command:
python byaml.py 'your filename here'.byaml 'your output name here'.xml
Replacing 'your filename here' with the input file's name and 'your output name here' with what you want the output file to be called.

Python 2.7 ONLY

Revisions:
0.1: (8/27/2017) Initial release
0.1.1: (8/28/2017) Several bugfixes, including:
- StringValueTable couldn't not exist
- Nodes within a dictionary node would have improper names in output file
- Several bugs with the handling of Paths, the PathValueTable, and arrays
- Addition of the --incpvtbl option, which specifies that the file contains a PathValueTable
0.1.2: (8/28/2018) Several more bugfixes:
- PathValueTable can now not exist
- The "Fours" issue is now fixed (The output file would only contain a fourth of the available strings within the file, rendering it useless)

If you are having trouble, please try to use the --incpvtbl option before contacting me.

Thanks to the folks who made this http://mk8.tockdom.com/wiki/BYAML_(File_Format) page, I wouldn't have been able to do this without it.
 

Attachments

  • byaml.zip
    2.8 KB · Views: 219
  • byamlv0.1.1.zip
    3 KB · Views: 154
  • byamlv0.1.2.zip
    3 KB · Views: 406
Last edited by tesnos6921,

pinkupi13

Well-Known Member
Member
Joined
May 8, 2016
Messages
158
Trophies
0
XP
681
Country
Australia
doesn't work with actual byamls, just prints errors
"stringtablenode initialized from wrong node type"
nice start though
 

KillzXGaming

Well-Known Member
Member
Joined
Jan 2, 2016
Messages
1,629
Trophies
0
Age
28
XP
1,618
Country
United States
I get "Root node is not an arry or dictionary node" for most of them. Managed to only get a few splatoon 2 ones working. I can send any byaml files your way if you need some to help test.
 
Last edited by KillzXGaming,

Hiccup

Well-Known Member
Member
Joined
Nov 21, 2009
Messages
1,000
Trophies
1
XP
1,786
Country
The Fourth Dimension (Super Mario 3D Land) editor has support for quite a few bym(a)ls. Might want to look at that.
 

victormr21

Well-Known Member
Member
Joined
Dec 29, 2015
Messages
565
Trophies
0
XP
498
Country

Attachments

  • unknown.png
    unknown.png
    40.2 KB · Views: 432

victormr21

Well-Known Member
Member
Joined
Dec 29, 2015
Messages
565
Trophies
0
XP
498
Country
Sorry, I forgot to mention this is for python 2.7 only. I'll update the OP.
Congratulations! I installed Python 2.7 and it Works but i think it doesnt extract full file, because MK8DX's course byamls only content Cameras, areas... Or maybe Nintendo made them like that, but thanks!

--------------------- MERGED ---------------------------

I don't remember the command to call a specific version of python, can someone give it ?
put at the begin of the command C:\Python27 or 34 (your version)
 

Mat37

Well-Known Member
Member
Joined
Dec 3, 2016
Messages
790
Trophies
0
Age
22
Location
Does it matter ?
XP
1,379
Country
France
Congratulations! I installed Python 2.7 and it Works but i think it doesnt extract full file, because MK8DX's course byamls only content Cameras, areas... Or maybe Nintendo made them like that, but thanks!

--------------------- MERGED ---------------------------


put at the begin of the command C:\Python27 or 34 (your version)
Thanks, but i get rootnode is not defined
 

victormr21

Well-Known Member
Member
Joined
Dec 29, 2015
Messages
565
Trophies
0
XP
498
Country
Thanks, but i get rootnode is not defined
Put:
Code:
C:\Python27\python.exe byaml.py nameofbyaml.byaml nameofoutputfile.xml
If that gives you an error code use this:
Code:
C:\Python27\python.exe byaml.py --incpvtbl nameofbyaml.byaml nameofoutputfile.xml
I had that error before, and if im not wrong, thats because incorrect Python version
Bye!
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: