Compiler and decompiler for the Mario & Luigi scripting language from and to Python.
Project description
mnlscript.py
Compiler and decompiler for the Mario & Luigi scripting language from and to Python.
Installation
pip3 install mnlscript
Usage
Bowser's Inside Story
First, you'll need mnltools.py in order to unpack and repack the ROM:
pip3 install mnltools
Then you can unpack and decompile the game:
mnl-nds-unpack bis.rom
mnlscript-bis-decompile
Afterwards, to compile and repack:
mnlscript-bis-compile [SCRIPTS TO COMPILE]
mnl-nds-pack -o bis.rom
[SCRIPTS TO COMPILE] should be a space-separated list of the scripts to compile (e.g. scripts/fevent/009c.py scripts/fevent/021d.py, or scripts/fevent/{009c,021d}.py if your shell supports it).
Although you can leave this blank to recompile all scripts, this is not recommended as it is slow and unnecessary.
Dream Team (Bros.)
First, you'll need to extract the RomFS, for example through Azahar (or any Citra fork). Unfortunately, Azahar doesn't support extracting the ExeFS, so you'll have to extract it separately, e.g. with CTRTool:
ctrtool --exefsdir=exefs dt.cci
You'll want to put these exefs and romfs folders side by side inside the Mods directory for your game (to locate this directory in Azahar, right-click on the game and press “Open > Mods Location”).
Take note of the name of the directory (the title ID), as you'll need to substitute it in the following commands.
Now, open the directory where you would like to work on your mod in a terminal.
If your system supports it, you should create a symbolic link to the game's Mods directory named data:
- Windows (PowerShell, may need to run as Administrator):
New-Item -ItemType SymbolicLink -Path .\data -Target $env:APPDATA\Azahar\load\mods\<TitleID> - Linux:
ln -s ~/.local/share/azahar-emu/load/mods/<TitleID> data - macOS:
ln -s "$HOME/Library/Application Support/Azahar/load/mods/<TitleID>" data
And then you can decompile and compile the game:
mnlscript-dt-decompile
mnlscript-dt-compile [SCRIPTS TO COMPILE]
If you can't use symlinks, add the -d /path/to/mods/<TitleID> argument to both of the above commands.
[SCRIPTS TO COMPILE] should be a space-separated list of the scripts to compile (e.g. scripts/fevent/0082.py scripts/fevent/00a0.py, or scripts/fevent/{0082,00a0}.py if your shell supports it).
Although you can leave this blank to recompile all scripts, this is not recommended as it is very slow and unnecessary.
There is no need to repack the ROM, as it is loaded as a mod.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mnlscript-0.2.2.tar.gz.
File metadata
- Download URL: mnlscript-0.2.2.tar.gz
- Upload date:
- Size: 45.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.13.2 Linux/6.13.7-arch1-1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
504e9dafdd8fbb5b38e9e31a9256f603cbdb8c4c1ece82a9e35b5488a63ba4e8
|
|
| MD5 |
db964391d0de917c3cea8009997c4f5a
|
|
| BLAKE2b-256 |
1f323168107ac4cff0344999cc803b44a7fa743946c8b44c8820b1b2223b5276
|
File details
Details for the file mnlscript-0.2.2-py3-none-any.whl.
File metadata
- Download URL: mnlscript-0.2.2-py3-none-any.whl
- Upload date:
- Size: 59.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.13.2 Linux/6.13.7-arch1-1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94dda79889a01fe7f383a858b84c36e68b030a41f61796080ee2c0ab7f94b395
|
|
| MD5 |
724745ba76892aef50ffea9cb82e0cfe
|
|
| BLAKE2b-256 |
1665faf1d9c832351824aeb7c9a4e12705fc5d338bd058b564d097fcda8d565e
|