Skip to content

Project Structure

Here are the important files and folders in a Paper Mario DX mod.

  • README.md
  • Directoryassets
    • Directorydx Assets provided by DX (do not edit)
      • …
    • Directoryus Assets dumped from the baserom (do not edit)
      • …
  • Directorysrc Your mod's code and assets
    • Directorydx
      • config.h Mod configuration
    • …
  • … Other files/folders are internal to DX

The assets folder

The assets folder contains the game content (not engine code) that DX and the base game provide: assets/dx/ holds DX's changes, and assets/us/ the base game's content, split from your copy of the game.

Your mod's content goes in src, alongside its code. Content is layered: src/ takes priority over assets/dx/, which takes priority over assets/us/. For example, the file assets/us/msg/0C_Chapter1.msg can be overridden by creating a file at src/msg/0C_Chapter1.msg. You can create the msg folder if it doesn't exist.

Because the layers share one layout, this manual writes paths relative to them. For example, battle/actor/gloomba.c means the file at that path in src/, assets/dx/, or assets/us/, and dx/config.h means src/dx/config.h. When the manual asks you to create a file, create it under src/.

Removing content

To remove something a lower layer provides, create a .meta file containing delete: true at the same path in src/. For a folder, put the .meta file inside it. For example, src/sprite/npc/Goomba/.meta removes the Goomba sprite.

Sprites

Every NPC sprite folder in the layers, such as sprite/npc/Goomba/, is built into the game. To add one, create its folder under src/sprite/npc/. Refer to sprites and their animations by the names in their headers, such as ANIM_Goomba_Idle from sprite/npc/Goomba.h, never by number: sprite IDs follow the sprites' names in alphabetical order, so they change when you add or remove one.

The src folder

This folder contains C code for the game engine. You can edit it freely, just note that you may get merge conflicts when updating to a new version of DX.

The dx/config.h file

This is where you configure mod settings like the mod name and new game start, the debug menu, and more. You don't need to understand C code to use these options — just edit the file.