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

  • Thread starter Thread starter tesnos6921
  • Start date Start date
  • Views Views 7,314
  • Replies Replies 24
  • Likes Likes 8

tesnos6921

Active Member
Newcomer
Joined
Nov 1, 2015
Messages
28
Reaction score
55
Trophies
0
XP
392
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

Last edited by tesnos6921,
doesn't work with actual byamls, just prints errors
"stringtablenode initialized from wrong node type"
nice start though
 
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,
The Fourth Dimension (Super Mario 3D Land) editor has support for quite a few bym(a)ls. Might want to look at that.
 

Attachments

  • unknown.png
    unknown.png
    40.2 KB · Views: 455
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)
 
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
 
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