Testing Mods - jam1garner/cargo-mextk GitHub Wiki
Using with m-ex itself
Now that you've built your .dat file you might be asking: ok, so what do I do with this?
Before we jump into that, let's go into how this whole system works:
- m-ex - a set of patches to Melee
- MexTK - "M-ex Toolkit", a set of command-line utilities for working with .dat files, mostly for
- mexTool - A GUI for working with .dat files, including applying m-ex patches
- m-ex api - a set of C headers for working with Melee's code
- cargo-mextk - a compiler/ISO management/package management utility built on top of MexTK
So basically, a code mod requires two things: the m-ex patches, and your modified dat. The modifications require m-ex to use additional data in your dat in order to load the mod. There are a few ways to apply the m-ex patches, however this guide will cover two ways: using mexTool and using cargo-mextk itself.
Using mexTool
While cargo-mextk isn't primarily designed for use with it, mexTool has everything you need to install your mod. Just add your modified .dat as you would any other and mexTool will also patch your ISO for you while adding the mod.
cargo-mextk
Using cargo-mextk has a system of carefully managing your ISO for you. This allows all edits to be entirely temporary. The way it manages this is by always having 2 copies of your ISO: one is your vanilla ISO, and the other is an extracted version of your ISO which is subject to modification. Whenever needed, cargo-mextk will check the extracted version against a vanilla ISO and restore any modified portions.
If you wish to manually trigger this, you can use the following command:
cargo mextk restore GALE01_v2
Similarly, cargo-mextk provides utilities for installing mods to your extracted ISO. If we want to install our mod to our extracted ISO, we can run the following command from within our project:
cargo mextk install
(and if you wish to restore your project while installing, simply add a --restore
flag to the end of the command)
Anytime you restore while installing, it will also install the m-ex patches, so it is recommended for an initial install to do so.
Dolphin Integration
Another feature cargo-mextk provides is the ability to run the current project in the Dolphin Emulator. To set this up, however, it needs to be able to find your Dolphin install. To do so, you need to add a folder containing dolphin-emu
(or on Windows, Dolphin.exe
) to your PATH variable.
To test that you have it added to path, open a new terminal and attempt to run it, either by typing Dolphin
(on Windows) or dolphin-emu
everywhere else.
(Note: on Windows you will likely need to restart your terminal for changes to PATH to take effect)
Once you have Dolphin added to path, all it takes to run your current project in dolphin is:
cargo mextk run