Skip to main content

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")

Metadata

Release files for pyemerald 0.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyemerald 0.5.2
File Size Uploaded
pyemerald-0.5.2.tar.gz 41.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyemerald 0.5.2
File Interpreter ABI Platform
pyemerald-0.5.2-py3-none-any.whl Python 3 none any Details

Total release size: 84.9 kB

Release files / pyemerald-0.5.2.tar.gz

Download URL pyemerald-0.5.2.tar.gz
Size 41.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f43a01db7402485228ba46d56265176ad01833dd2e110a77d8cf5ce01eb4ae3b
BLAKE2b-256 checksum
How to use checksums
ad0cf79cd88540256f05769fc8bfc47c74a9b140bd35839a566d634f43f7987d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.12 CPython/3.8.3 Linux/6.3.5-arch1-1

Release files / pyemerald-0.5.2-py3-none-any.whl

Download URL pyemerald-0.5.2-py3-none-any.whl
Size 43.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
beef4bf3493f234500448bed888a0820cefc70b8a25abe788eba3fcc8c066592
BLAKE2b-256 checksum
How to use checksums
776310588bf417cf0cb5180cf21fe731f4b3b410cec4428a42d32debecc919d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.12 CPython/3.8.3 Linux/6.3.5-arch1-1

Release history Release notifications | RSS feed

This release

0.5.2 This release

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page