Thanks to visit codestin.com
Credit goes to github.com

Skip to content

p2gz/p2gz

Repository files navigation

P2GZ - Pikmin 2 Practice ROM

A work-in-progress practice tool for Pikmin 2 speedrunning, based on the Pikmin 2 decompilation project.

NB: you will need to supply your own copy of a Pikmin 2 USA .iso (GPVE01)

To open or close the GZ menu, double-press Dpad Left while in game.

Index

Dependencies

Pre-requisites:

  1. python3
  2. ninja
  3. nodtool
  4. cube
  5. wine (if not on windows)

Windows

On Windows, it's highly recommended to use native tooling. WSL or msys2 are not required.

  • Install Python and add it to %PATH%.
  • Download ninja and add it to %PATH%.
    • Quick install via pip: pip install ninja

macOS

  • Install ninja:

    brew install ninja
  • Install wine-crossover:

    brew install --cask --no-quarantine gcenx/wine/wine-crossover

After OS upgrades, if macOS complains about Wine Crossover.app being unverified, you can unquarantine it using:

sudo xattr -rd com.apple.quarantine '/Applications/Wine Crossover.app'

Linux

  • Install ninja.
  • For non-x86(_64) platforms: Install wine from your package manager.
    • For x86(_64), wibo, a minimal 32-bit Windows binary wrapper, will be automatically downloaded and used.

Building

  • Clone the repository:

    git clone https://github.com/p2gz/p2gz.git
  • Place your USA Pikmin 2 (GPVE01) .iso in the main directory.

  • Run:

    python3 build.py
  • Open root/sys/main.dol via Dolphin to see your changes.

    • Alternatively, add a shortcut to your Dolphin executable in the main directory as Dolphin.exe.lnk and run:
      python3 build.py --restart-dolphin

To add new source code files to the DOL:

  • Uncomment the final "lib": "moddingU" bracket in configure.py - change the name to whatever you like, and feel free to add more than one new lib using this as a template.
  • Add any new files along with their paths as Object(Matching, folder/file.cpp) where indicated.
  • Within the link_order_callback function below the object configuration, uncomment and add each new file with its path within src, as indicated.

To add or replace compressed asset files (anything with a .szs extension):

  • uncompresses your szs asset (preferabbly with cube)
  • Save all of the uncompressed elements inside the directory assets/path/to/asset/.
    • asset/ is another directory that is the name of your asset, i.e. sheargrub.szs will become assets/path/to/sheargrub/
  • Add assets/path/to/asset to the P2GZ_CUSTOM_ASSETS_COMPRESSED array in build.py.

To add or replace uncompressed asset files:

  • Save the new file(s) in assets/path/to/asset.
  • Add assets/path/to/asset to the P2GZ_CUSTOM_ASSETS_UNCOMPRESSED array in build.py.

Once built, the new DOL will exist at root/sys/main.dol, along with a Dolphin-readable directory of all game files.