-
Notifications
You must be signed in to change notification settings - Fork 3
Addon System
The addon system allows modders to distribute content as self-contained packages that can be installed, uninstalled, and managed without manually replacing files.
An addon is a .7z archive containing:
-
info.xml- A manifest file describing the addon - Mod files - The actual game files to be installed
The launcher searches for any .7z file in sd:/(-codespath:)/launcher/addons (or sd:/projectm/launcher/addons in the original PM launcher). Preincluded with Project M 3.5 was WiFi.7z, which served as the WiFi add-on.
- Easy Clean Builds: Disable all addons before applying upgrade patches. Returning to a clean build is extremely simple.
- Tournament Friendly: Swapping custom content to original is much easier if you use your Wii at tournaments.
- Easy Sharing: Share custom addons with others. They simply drop the file in the addons folder and use the launcher to install it—no hunting for file locations or manual backups needed.
- Optional Content: Mod teams may officially (or unofficially) release addon packs for stages, costumes, sound effects, music packs, etc.
<addon>
<title>My Cool Mod</title>
<code>MYMOD47</code>
<version>1.0</version>
<files>
<file source="pf/fighter/kirby/FitKirby.pac"
destination="sd:/(-codespath:)/pf/fighter/kirby/FitKirby.pac"
md5="037b67093d5160f02c29635e6e651591" />
</files>
</addon>Fields explained:
- title: Display name shown in the launcher UI (256 character max)
- code: Unique identifier (8 character max) used to track which addon owns which files
- version: Float for version comparison (supports upgrades)
-
files: List of files to patch, each with:
-
source: Path inside the .7z archive -
destination: Where to install on the SD -
md5: Expected hash of the file (integrity check)
-
You can create addons manually by editing the info.xml file and calculating MD5 hashes for your files. Alternatively, there was an Addon XML Generator tool released for PM 3.6 that automated this process with features like drag-and-drop file uploading, auto-complete paths, and built-in MD5 calculation. Note that this tool is quite old and was designed for the original PM launcher—if you use it with BrawlModLauncher, you may need to adjust the folder paths in the generated XML to match your build's structure.
There may be addon generation built into BrawlInstaller at a later time.
-
Backup Original Files: Before replacing any file, the launcher checks if it exists. If the file differs from the expected MD5, it backs up the original to
launcher/addons/backups/using the filename only. -
Extract & Validate: Each file is extracted from the .7z archive, its MD5 is verified against the manifest, then written to the destination.
-
Track Changes: The launcher logs all modified files in
launcher/addons/status.xmlwith the addon's code, so it knows which addon owns which file.
The launcher tracks each addon's state:
- NOT_INSTALLED: None of the addon's files are present
- INSTALLED: All files are present and match this addon's code
- INCOMPLETE: Only some files are installed
- CONFLICTING: Files are present but owned by a different addon (another addon modified them)
- UPGRADE: A newer version of an already-installed addon is available
When uninstalling, the launcher:
- Checks
status.xmlfor files owned by this addon - Restores the original file from
backups/if available - Deletes the backup after restoration
- Removes the file entry from
status.xml - If no backup exists, simply deletes the file
If two addons try to modify the same file:
- The first addon installs normally and backs up the original
- The second addon detects the file is already modified by a different code
- The second addon is marked as CONFLICTING and won't install
- User must uninstall the conflicting addon first
sd:/projectname/
├── launcher/
│ ├── addons/
│ │ ├── MyMod.7z # Addon package
│ │ ├── backups/ # Original file backups
│ │ │ └── fit.pac
│ │ └── status.xml # Tracks installed files
| Error | Description |
|---|---|
| -1 | Empty or unreadable 7z file |
| -2 | Empty or unreadable info.xml |
| -3 | XML parsing failed |
| -4 | No XML root element |
| -5 | No Title element |
| -6 | Blank Title element |
| -7 | No Code element |
| -8 | Blank Code element |
| -9 | No Version element |
| -10 | Blank Version element |
| -11 | No Files element array |
| -12 | No destination element in File element |
| Error | Description |
|---|---|
| -1 | Empty or unreadable 7z file |
| -2 | Empty or unreadable info.xml |
| -3 | XML parsing failed |
| -4 | No XML root element |
| -5 | No Files element array |
| -6 | No File element in Files array |
| -7 | Cannot create backup file |
| -8 | Cannot extract from 7z file |
| -9 | Cannot write new file |
| -10 | Cannot write log file |
| Error | Description |
|---|---|
| -1 | Empty or unreadable 7z file |
| -2 | Empty or unreadable info.xml |
| -3 | XML parsing failed |
| -4 | No XML root element |
| -5 | No Files element array |
| -6 | (Reserved) |
| -7 | Cannot restore file |
| -8 | Cannot write log file |
This system was originally developed for Project M to allow cosmetic and gameplay addons to be distributed and managed easily without requiring users to manually replace files or keep track of what they changed. Unfortunately Addons wear broken from 3.6 onward so they didn't see much use.