Skip to main content

A package to modify save files from Pokemon Emerald

Project description

pyemerald

Pyemerald is a python package which lets you modify save files from Pokemon Emerald (Sapphire, Ruby, Leaf Green and Fire Red to come). It lets you modify Pokemon in your team and on the PC, and lets you modify items on the PC. It can also be used to inspect a Pokemons attributes like EV's (IV's to come).

Other and more advanced projects exist e.g. pkHex which inspired this project. However, it annoyed me that I was unable to run pkHex on Linux, and thus pyemerald was created.

Please make sure to never overwrite your original save file, as this software could accidentially make an invalid save file. You are responsible for using the software correctly.

Installation

Pyemerald can be installed from pypi with the following command:

pip install pyemerald

It has no dependencies so it should be a simple install.

Usage

Several examples are available in the examples folder. But basically it works by loading an .sav file using a Save object, which can then emit a Game object that is modifiable. Once modification is done, the Game object is passed back to the Save object and saved to a new file (Please always save to a new file, so you don't accidentially delete your current save file!).

from pyemerald.save import Save
from pyemerald.pokemon import PCPokemon
from pyemerald.moves import Move

save = Save.from_file("data/marie_treecko_pokedex_pc.sav")

game = save.to_game()

# Simple create pokemon
flygon = PCPokemon.from_name(
    name="Flygon",
    level=48,
    move_1=Move.from_name("Thunder"),
    move_2=Move.from_name("Thunder Punch"),
    move_3=Move.from_name("Ice Beam"),
    move_4=Move.from_name("Fly"),
)

# Add Pokemon to user PC
game.add_pc_pokemon(flygon)

# Put modification back to the Save Object
save.update_from_game(game)

# Write new Save file
save.to_file("data/emerald.sav")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyemerald-0.5.2.tar.gz (41.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyemerald-0.5.2-py3-none-any.whl (43.8 kB view details)

Uploaded Python 3

File details

Details for the file pyemerald-0.5.2.tar.gz.

File metadata

  • Download URL: pyemerald-0.5.2.tar.gz
  • Upload date:
  • Size: 41.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.8.3 Linux/6.3.5-arch1-1

File hashes

Hashes for pyemerald-0.5.2.tar.gz
Algorithm Hash digest
SHA256 f43a01db7402485228ba46d56265176ad01833dd2e110a77d8cf5ce01eb4ae3b
MD5 fb85d3faf90b9971a3af0b10306a0dbe
BLAKE2b-256 ad0cf79cd88540256f05769fc8bfc47c74a9b140bd35839a566d634f43f7987d

See more details on using hashes here.

File details

Details for the file pyemerald-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: pyemerald-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 43.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.8.3 Linux/6.3.5-arch1-1

File hashes

Hashes for pyemerald-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 beef4bf3493f234500448bed888a0820cefc70b8a25abe788eba3fcc8c066592
MD5 2fb88148457220f0975610d95ba817c1
BLAKE2b-256 776310588bf417cf0cb5180cf21fe731f4b3b410cec4428a42d32debecc919d2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page