Skip to main content

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.

Metadata

Release files for mnlscript 0.2.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mnlscript 0.2.6
File Size Uploaded Provenance Actions
mnlscript-0.2.6.tar.gz 45.3 kB Without provenance Details for mnlscript-0.2.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mnlscript 0.2.6
File Interpreter ABI Platform Actions
mnlscript-0.2.6-py3-none-any.whl Python 3 none any Details for mnlscript-0.2.6-py3-none-any.whl

Total release size: 105.0 kB

Release files / mnlscript-0.2.6.tar.gz

Download URL mnlscript-0.2.6.tar.gz
Size 45.3 kB
Tags Source
SHA-256 checksum
How to use checksums
be5c8b8fee56a0b2f8938f0bb03504fb25a53fb2a49d3d0257c5ba4cfb2980ea
BLAKE2b-256 checksum
How to use checksums
0dadc9967dcb1d6fd04ccb8811fc229c013084449c72fb0af2b9c286e6d8223f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.14.7 Linux/7.1.11-arch1-1

Release files / mnlscript-0.2.6-py3-none-any.whl

Download URL mnlscript-0.2.6-py3-none-any.whl
Size 59.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
75bcfda149c1555f88fbcbfd014ed8d695d0d48d274bc199d6db6b0384c9aef5
BLAKE2b-256 checksum
How to use checksums
dead603a47362d98d29c704c2f0f55e9ca5d4d80c682e13cdb4ef8766f277011
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.14.7 Linux/7.1.11-arch1-1

Security for mnlscript 0.2.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page