A script that convert WiiU BotW mods to Switch

Overview

UltimateBoTWConverter

A script that convert WiiU BotW mods to Switch. It uses every resource I could find under the sun that allows for conversion, with some modifications to accomodate for the central script. Thanks to HGStone and Törphedo for creating the bat script, and HGStone for testing as well. ONLY converter.py IS COMPLETELY MADE BY ME, THE ORIGINAL AUTHORS STILL DESERVE ALL THE CREDIT FOR THEIR WORK.

Requirements

  • Python 3.7 or 3.8 (If on Windows, you must check Add Python to PATH during installation)
  • A legal, unpacked dump of BoTW Switch (1.6.0)
  • BCML
  • leoetlino's sarc tool

The last two can be obtained through Python's pip, using pip install bcml for BCML, and pip install sarc for leoetlino's tool. Important: BCML must be set up and put in Switch mode, or the script won't work. Also, this script doesn't modify files inside any .pack, so you'll have to manually port those yourself.

Usage

Linux: Open a Terminal window in the script's folder, and run the script with either python converter.py "mod" or convert.sh "mod", replacing mod by your BNP mod/mods, or path/to/folder/with/bnps/*.bnp to convert every BNP in a folder. Windows Drag and drop your BNP into the included bat file

Added supported formats

BCML converter is still limited, so using other tools to convert those is our only option for now. With this script, I've added this formats to the supported list:

  • .bars
  • .bfstm
  • .sbfres (animations are untested, but I'm guessing there would be some problems)
  • .sbitemico
  • .hkcl
  • instSizes in ActorInfo.product.sbyml

It's worth considering that I'm still new to Python, so any feedback is appreciated!

Comments
  • need help

    need help

    I'm new at modding Botw and needing help to by using this. I wanna install mods for wii u on my switch but I have no idea how to use this converter. And I don't understand the usage.

    opened by Lioniox 35
  • ModuleNotFoundError: No module named 'bcml'

    ModuleNotFoundError: No module named 'bcml'

    Hi, Thanks for your efforts I think this is an amazing Tool

    However, each time I tried to convert a mod i faced the following issue

    Attempting to convert 1 of 1 mods, please wait...

    Traceback (most recent call last): File "/h/ubotwconverterv134/converter.py", line 20, in from bcml.install import open_mod, find_modded_files ModuleNotFoundError: No module named 'bcml'

    Processed 1 mods.

    • I have BCML 3.8.0, all settings for Switch
    • I Dumped my own Zelda cartbrige v1.6.0
    • Python 3.7.3

    001 002 003 004 005 006

    opened by anthsalmo 9
  • Error Cannot import name 'bars' from 'bars_py'(unknown location)

    Error Cannot import name 'bars' from 'bars_py'(unknown location)

    hi im trying to use the script by dragging and dropping the mod! on convert.bat but i get this error, am i missing something? image i have python 3.8.8 and bcml arealdy and installed some mods from switch

    opened by Naraxrealms 2
  • python: can't open file 'converter.py

    python: can't open file 'converter.py

    i keep getting "python: can't open file 'converter.py': [Errno 2] No such file or directory" error when using the bat file. what is the process of correcting this please. Screenshot (15)

    opened by linkle13 0
  • DragNDrop+

    DragNDrop+

    This add the ability to drag and drop multiple BNP at the same time This adds the ability to drag and drop from any directory it adds a nice title it keeps track of how many have been converted out of the total number dropped on the bat file

    opened by HGStone 0
  • no known parent package

    no known parent package

    when running the latest source I run into this error.

    Traceback (most recent call last): File "converter.py", line 24, in <module> from .bars_py import bars, bcf_converter ImportError: attempted relative import with no known parent package

    opened by HGStone 0
  • Issue converting WiiU .bnps into ones for Switch

    Issue converting WiiU .bnps into ones for Switch

    Whenever I try to convert a WiiU .bnp to Switch by dragging the file onto the convert.bat file it just says

    Traceback (most recent call last): File "C:\Users\airyt\Downloads\ubotwconverterv134\converter.py", line 20, in from bcml.install import open_mod, find_modded_files ModuleNotFoundError: No module named 'bcml'

    but I can run BCML from Command Prompt just fine.

    opened by AnkleCruncher 0
  • BfresPlatformConverter array lower bound issue during conversion

    BfresPlatformConverter array lower bound issue during conversion

    Attempting to convert Linkle 3.0 mod produces the following result. Mod files work in WiiU format and verified as non-corrupt. Assuming the following may be edge conditions of the process. Re-attempted in single-threaded mode, no change.

    2022-12-13 01:27:18,422 WARNING root content\Model\Armor_021.Tex1.sbfres could not be converted 2022-12-13 01:27:54,726 WARNING root content\Model\Armor_049.Tex1.sbfres could not be converted 2022-12-13 01:28:12,243 WARNING root content\Model\Armor_141.Tex1.sbfres could not be converted 2022-12-13 01:28:19,783 WARNING root content\Model\Armor_171.Tex1.sbfres could not be converted 2022-12-13 01:28:59,948 WARNING root content\Model\Armor_Default.Tex1.sbfres could not be converted 2022-12-13 01:28:59,953 WARNING root content\Model\Link.Tex1.sbfres could not be converted

    Unhandled Exception: System.ArgumentOutOfRangeException: Number was less than the array's lower bound in the first dimension.
    Parameter name: srcIndex
       at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
       at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length)
       at Syroot.NintenTools.Bfres.Swizzling.GX2.Decode(GX2Surface tex, Int32 ArrayIndex, Int32 MipIndex, String DebugTextureName)
       at Syroot.NintenTools.Bfres.WiiU.Texture.GetDeswizzledData(Int32 arrayLevel, Int32 mipLevel)
       at Syroot.NintenTools.Bfres.Switch.SwitchTexture.FromWiiU(Texture textureU)
       at Syroot.NintenTools.Bfres.PlatformConverters.TextureConverter.CreateBNTX(List`1 textureList)
       at Syroot.NintenTools.Bfres.ResFile.ConvertTexturesToBntx(List`1 textures)
       at Syroot.NintenTools.Bfres.ResFile.ChangePlatform(Boolean isSwitch, Int32 alignment, Byte versionA, Byte versionB, Byte versionC, Byte versionD, ConverterHandle handle)
       at BfresPlatformConverter.Program.Main(String[] args)
    
    opened by jedinjapan 0
  • convert_to_switch in cli gives this error same with building from source

    convert_to_switch in cli gives this error same with building from source

    Traceback (most recent call last): File "C:\Users\Cod3x\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\Cod3x\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 87, in run_code exec(code, run_globals) File "C:\Users\Cod3x\AppData\Local\Programs\Python\Python38\Scripts\convert_to_switch.exe_main.py", line 4, in File "C:\Users\Cod3x\AppData\Local\Programs\Python\Python38\lib\site-packages\ubotw_converter\converter.py", line 60, in logging.config.fileConfig(fname=LOG_CONF, defaults={"logfilename": ERROR_LOG, "loglevel": args.log_level.upper()}) File "C:\Users\Cod3x\AppData\Local\Programs\Python\Python38\lib\logging\config.py", line 71, in fileConfig formatters = _create_formatters(cp) File "C:\Users\Cod3x\AppData\Local\Programs\Python\Python38\lib\logging\config.py", line 104, in _create_formatters flist = cp["formatters"]["keys"] File "C:\Users\Cod3x\AppData\Local\Programs\Python\Python38\lib\configparser.py", line 960, in getitem raise KeyError(key) KeyError: 'formatters' image

    opened by Cod3xDev 0
  • Mods Wont install

    Mods Wont install

    I tried converting 10 different wiiu mods to switch and when adding any of them to BCML, it causes BCML to crash. Every time no matter the mod. I tried different weapons, different armors, nothing seems to work properly.

    BCML works with all other mods I have added to it, it is only converted ones that dont seem to work.

    opened by joeb2000 0
Releases(v1.3.3)
  • v1.3.3(Dec 24, 2021)

    Changelog

    1.3.3

    • Added .shknm2 support
    • Added .bcamanim support
    • The script now uses multiprocessing to make things faster (if things break, let me know!)
    • If the script does not find the necessary programs, it will download them before conversion starts

    1.3.4

    • Added an updated bat script
    • Added single core mode (by adding -s to the command)
    • Added an option to specify a name for the output file (using -o <filename>)
    • Fixed conversion for bars files inside eventpacks

    The script now comes bundled with the necessary programs, along with a version of BfresPlatformConverter that uses the latest libraries. This essentially means better support for animations and bfres files in general. Thanks to @Waikuteru for letting me know how this build performs, and @KillzXGaming for providing it.

    Usage

    Type python path/to/converter.py [mod] in your Command Line Interface of choice(CMD, Terminal, etc.), or just drag and drop your bnp to the bat file if you are on Windows.

    Source code(tar.gz)
    Source code(zip)
    UBotWConverterv1.3.4.7z(21.55 MB)
  • v1.3.2(Dec 2, 2021)

    Changelog

    • Fixed 'method object is not iterable' when converting .bars files (1dd0dc549e549c16ab884f85f5df2b8887a21f51)
    • Fixed "argument of type 'WindowsPath' is not iterable" when converting hkx files (aa59e6a2c5342a6b5eaaeebc1bc64d73d83d0f77)
    • BootUp.sblarc is now removed from the result if found, due to it not being used on Switch (cb5ecdc3f5dd5955b2ef2be240722234e3349a7a)

    Usage

    Type python path/to/converter.py [mod] in your Command Line Interface of choice(CMD, Terminal, etc.), or just drag and drop your bnp to the bat file if you are on Windows.

    Source code(tar.gz)
    Source code(zip)
    UBotWConverter.7z(38.84 KB)
  • v1.3.1(Nov 29, 2021)

    Changelog

    • Fixed HKXConvert being downloaded for every hkx file. It should now download only once. (6f3a021eab3dca24490d37e6763c9694e1908c49)
    • Fixed lookup of wrong hkx files (47edfadc30e834db16786ecc02458b373f174b8e)
    • Fixed .bars files outside packs not being converted (445133ecb43714e55a2acd900d9201e1e41ea89d)
    • Deleted check for list-type warnings, since it was added to BCML (445133ecb43714e55a2acd900d9201e1e41ea89d)
    • Added support for files inside event packs (e9af25f618e7186a71b78247ff3e1060ad16508d)
    • Added RSTB recalculation after conversion is finished (ab90505d048fc34748bfbed3825e7043e5fbeecf)
    • Added error logging (ab90505d048fc34748bfbed3825e7043e5fbeecf)

    Usage

    Type python path/to/converter.py [mod] in your Command Line Interface of choice(CMD, Terminal, etc.), or just drag and drop your bnp to the bat file if you are on Windows.

    Source code(tar.gz)
    Source code(zip)
    UBotWConverter.7z(38.73 KB)
  • v1.3.0(Nov 23, 2021)

    Changelog

    • Removed InstSize conversion since it was added to BCML
    • Fixed some files not being found on Windows
    • Fixed sarc files rebuilding without folders
    • Rewrote the bars portion of the script, and moved it to a new repo
    • Added a check when trying to use the script with Switch BNPs
    • Fixed .bfstp files not converting properly when no matching .bfstm was provided

    Note: ~~.bfstp conversion has yet to be tested thoroughly on systems other than Linux. If there are any problems, please let me know by opening an issue on Github.~~ .bfstp conversion seems to work fine as of now (thanks @HGStone for letting me know), but if there are still any issues, feel free to let me know.

    Usage

    Type python path/to/converter.py [mod] in your Command Line Interface of choice(CMD, Terminal, etc.), or just drag and drop your bnp to the bat file if you are on Windows.

    Source code(tar.gz)
    Source code(zip)
    UBotWConverter.7z(38.27 KB)
  • v1.2.0(Nov 5, 2021)

    Changelog

    • Fixed BFSTM files not converting properly to Switch (Thanks a lot to HGStone for providing documentation and testing!)
    • Fixed script not finding bars files inside TitleBG
    • Fixed an error where Tex2 files would throw a "FileNotFound" error, despite converting properly
    • Pack files should now not get compressed into Yaz0
    • Added an option to keep the downloaded files (a prompt will appear when the script ends)

    Usage

    Type python path/to/converter.py mod in CMD (if on Windows) or Terminal (if on an Unix based system), or drag and drop your bnp to the .bat file if you are on Windows.

    Source code(tar.gz)
    Source code(zip)
    UBoTWConverter.7z(38.66 KB)
  • v1.1.0(Nov 3, 2021)

    Changelog

    • Added support for files inside .pack archives
    • Added support for .bflim files
    • Removed dependency on leoetlino's sarc tool
    • The script will now put BCML in Switch mode once it's run

    Usage

    Type python path/to/converter.py mod in CMD (if on Windows) or Terminal (if on an Unix based system), or drag and drop your bnp to the bat file if you are on Windows.

    Source code(tar.gz)
    Source code(zip)
    UBoTWConverter.7z(38.07 KB)
  • v1.0.0(Oct 30, 2021)

Validate UC alumni identifier numbers with Python 3.

UC number validator Validate UC alumni identifier numbers with Python 3. Getting started Install the library with: pip install -U ucnumber Usage from

Open Source eUC 1 Jul 07, 2021
Anki for desktop computers

Anki This repo contains the source code for the computer version of Anki. If you'd like to try development builds of Anki but don't feel comfortable b

Ankitects 12.9k Jan 09, 2023
An Notifier Program that Notifies you to relax your eyes Every 15 Minutes👀

Every 15 Minutes ⌛ Every 15 Minutes is an application that is used to Notify you to Relax your eyes Every 15 Minutes, This is fully made with Python a

FSP Gang s' YT 2 Oct 18, 2021
The program calculates the BMI of people

Programmieren Einleitung: Das Programm berechnet den BMI von Menschen. Es ist sehr einfach zu handhaben, so können alle Menschen ihren BMI berechnen.

2 Dec 16, 2021
Análise do Aplicativo Prévias PSDB 2021

Análise do Aplicativo Prévias PSDB 2021 Com a recente polêmica sobre o aplicativo usado nas Prévias do PSDB de 2021, fiquei curioso para saber como er

Paulo Matias 18 Jul 31, 2022
bib2xml - A tool for getting Word formatted XML from Bibtex files

bib2xml - A tool for getting Word formatted XML from Bibtex files Processes Bibtex files (.bib), produces Word Bibliography XML (.xml) output Why not

Matheus Sartor 1 May 05, 2022
Customisable coding font with alternates, ligatures and contextual positioning

Guide Ligature Support Links Log License Guide Live Preview + Download larsenwork.com/monoid Install Quit your editor/program. Unzip and open the fold

Andreas Larsen 7.6k Dec 30, 2022
WinBoost: Boost your windows system.

Winboost runs a complete checkup of your entire system locating junk files, speed-reducing issues and causes of any system or application glitches or crashes. Through a lot of research and testing, w

Smit Parmar 4 Oct 01, 2021
Snek-test - An operating system kernel made in python and assembly

pythonOS An operating system kernel made in python and assembly Wait what? It us

TechStudent10 2 Jan 25, 2022
Assignment for python course, BUPT 2021.

pyFuujinrokuDestiny Assignment for python course, BUPT 2021. Notice username and password must be ASCII encoding. If username exists in database, syst

Ellias Kiri Stuart 3 Jun 18, 2021
Procscan is a quick and dirty python script used to look for potentially dangerous api call patterns in a Procmon PML file.

PROCSCAN Procscan is a quick and dirty python script used to look for potentially dangerous api call patterns in a Procmon PML file. Installation git

Daniel Santos 9 Sep 02, 2022
全局指针统一处理嵌套与非嵌套NER

GlobalPointer 全局指针统一处理嵌套与非嵌套NER。 介绍 博客:https://kexue.fm/archives/8373 效果 人民日报NER 验证集F1 测试集F1 训练速度 预测速度 CRF 96.39% 95.46% 1x 1x GlobalPointer (w/o RoPE

苏剑林(Jianlin Su) 183 Jan 06, 2023
Some basic sorting algos

Sorting-Algos Some basic sorting algos HacktoberFest 2021 This repository consists of mezzo-level projects that undertake a simple task and perform it

Manthan Ghasadiya 7 Dec 13, 2022
This python code will get requests from SET (The Stock Exchange of Thailand) a previously-close stock price and return it in Thai Baht currency using beautiful soup 4 HTML scrapper.

This python code will get requests from SET (The Stock Exchange of Thailand) a previously-close stock price and return it in Thai Baht currency using beautiful soup 4 HTML scrapper.

Andre 1 Oct 24, 2022
Pre-crisis Risk Management for Personal Finance

Антикризисный риск-менеджмент личных финансов Риск-менеджмент личных финансов условиях санкций и/или финансового кризиса: делаем сегодня все, чтобы за

Dmitry Petukhov 593 Jan 09, 2023
The worst and slowest programming language you have ever seen

VenumLang this is a complete joke EXAMPLE: fizzbuzz in venumlang x = 0

Venum 7 Mar 12, 2022
A python package to manage the stored receiver-side Strain Green's Tensor (SGT) database of 3D background models and able to generate Green's function and synthetic waveform

A python package to manage the stored receiver-side Strain Green's Tensor (SGT) database of 3D background models and able to generate Green's function and synthetic waveform

Liang Ding 7 Dec 14, 2022
token vesting escrow with cliff and clawback

Yearn Vesting Escrow A modified version of Curve Vesting Escrow contracts with added functionality: An escrow can have a start_date in the past.

62 Dec 08, 2022
A simple and efficient computing package for Genshin Impact gacha analysis

GGanalysisLite计算包 这个版本的计算包追求计算速度,而GGanalysis包有着更多计算功能。 GGanalysisLite包通过卷积计算分布列,通过FFT和快速幂加速卷积计算。 测试玩家得到的排名值rank的数学意义是:与抽了同样数量五星的其他玩家相比,测试玩家花费的抽数大于等于比例

一棵平衡树 34 Nov 26, 2022
Ml-design-patterns - Source code accompanying O'Reilly book: Machine Learning Design Patterns

This is not an official Google product ml-design-patterns Source code accompanying O'Reilly book: Title: Machine Learning Design Patterns Authors: Val

Google Cloud Platform 1.5k Jan 05, 2023