Citra Modding Framework

Citra’s robust modding framework supports various patch formats, offering flexibility and ease of distribution. Here’s a breakdown of its features and structure.

Directory Structure

Each game has a dedicated Mods directory. To access it:

  1. Right-click the game in Citra Emulator and select Open Mods Directory.
  2. Alternatively, locate it at load/mods/<Title ID> in the User Directory.

Example Directory Layout:

load/mods/<Title ID>
├── exefs
├── romfs
├── romfs_ext
└── exheader.bin

Note: Mods may include any combination of these files.

ExeFS: Modifying Game Executables

The exefs folder is for executable replacements or patches that alter game behavior. Supported file types include:

  • code.bin: Direct executable replacement.
  • code.ips: IPS patches (details on ZeroSoft or SMWiki).
  • code.bps: BPS patches (details on byuu).

Compatibility: ExeFS replacements/patches can also be placed directly in the mods folder for Luma3DS compatibility.

RomFS: Customizing Game Assets

The romfs directory houses replacements for game assets such as textures, sounds, or fonts. Citra uses a LayeredFS system, prioritizing modded files over base game assets.

Steps to Create RomFS Mods:

  1. Right-click the game and select Dump RomFS to extract its structure.
  2. Modify files within the dumped directory at dump/romfs/<Title ID>.
  3. Place the updated files in romfs under the Mods directory.

RomFS Extension (romfs_ext)

This directory extends RomFS capabilities by allowing:

  • File Deletions: Use .stub files to mark deletions.
  • File Patches: Apply .ips or .bps patches to existing files.

Caution: Patches load entire files into RAM, so avoid excessive use.

ExHeader: Extending System Capabilities

The exheader.bin file overrides the game’s ExHeader, enabling:

  • Additional RAM usage.
  • Custom codeset configurations for expanded functionality.

Example: Pokémon Ultra Sun Modding

For Pokémon Ultra Sun (Title ID: 00040000001B5000):

  1. Place mod files in load/mods/00040000001B5000.
  2. Include exefs, romfs, romfs_ext, and/or exheader.bin as needed.
  3. Empty folders are ignored.

Using Luma3DS Mods in Citra

Citra supports Luma3DS mods without modification. Simply move the Luma mod folder to the corresponding title’s directory in Citra, like so:

luma/titles/<Title ID>
├── romfs
│ └── (custom files)
├── code.bin / code.ips
└── exheader.bin

3GX Plugins in Citra

Citra can load 3GX plugins using the Luma3DS plugin loader format. Plugins can be placed in:

  1. sdmc/luma/plugins/<Title ID>/<filename>.3gx (game-specific).
  2. sdmc/luma/plugins/default.3gx (applies to all games).

Enabling Plugins:

  1. Add the .3gx plugin to the appropriate directory.
  2. Enable the 3GX Plugin Loader in Citra’s System settings.
  3. Run the game to apply the plugin.

Citra’s modding framework empowers users to customize gameplay, graphics, and functionality with remarkable ease and compatibility. Whether you’re enhancing assets or integrating advanced patches, this toolset ensures your games are tailored to your preferences.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *