Skip to main content

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

mnlscript-0.2.3.tar.gz (45.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mnlscript-0.2.3-py3-none-any.whl (59.4 kB view details)

Uploaded Python 3

File details

Details for the file mnlscript-0.2.3.tar.gz.

File metadata

  • Download URL: mnlscript-0.2.3.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

Hashes for mnlscript-0.2.3.tar.gz
Algorithm Hash digest
SHA256 bcbdb63760e7224cf3ffe45af1d5d599008081ea1580c9d828ce80310ccb362e
MD5 f0ea6993035dbf2cb8261e215c13cbdb
BLAKE2b-256 27621b4bcd84153c4dbf3e5fa63436f0a36a80862a92a550ba40b60f1a0bab82

See more details on using hashes here.

File details

Details for the file mnlscript-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: mnlscript-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 59.4 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

Hashes for mnlscript-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d777c67d5511cfcd1229030194dd8473173eb6e5cf0c5f64da3b0e065a6220a4
MD5 4aacf7ae661b819bd99d2f26e47db329
BLAKE2b-256 11c7fbb7b3331b4ef2dd62bb753e21ab151cadc8cece9ce9d83c5a82e525b557

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page