https://github.com/huderlem/gomons
Go library that can read and modify Pokémon Emerald save files
https://github.com/huderlem/gomons
go golang pokemon save-editor
Last synced: about 1 year ago
JSON representation
Go library that can read and modify Pokémon Emerald save files
- Host: GitHub
- URL: https://github.com/huderlem/gomons
- Owner: huderlem
- Created: 2019-09-28T00:15:33.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-08-30T13:56:02.000Z (almost 3 years ago)
- Last Synced: 2025-04-13T16:08:09.169Z (about 1 year ago)
- Topics: go, golang, pokemon, save-editor
- Language: Go
- Homepage:
- Size: 110 KB
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-game-file-format-reversing - gomons - Go library that can read and modify Pokémon Emerald save files. (Game & Studio Tools / Game Freak)
README
# gomons
This is a Go library that can read and modify Pokémon Emerald save files. It is very much a work in progress, but contributions are welcome. Currently, it only supports save files generated by the no$gba emulator.
## Example Usage
Here is a full working example that does some basic reading and modification.
```go
package main
import (
"bufio"
"fmt"
"os"
"github.com/huderlem/gomons/gen3"
)
func main() {
gameSave, _ := gen3.LoadSaveFile("pokeemerald.sav")
if err := gameSave.CheckCorruption(); err != nil {
// Save file is corrupted.
return
}
// Print the player's name.
fmt.Println(gameSave.GetPlayerName())
// Give the player 9,999 money.
gameSave.SetMoney(9999)
// Save the modified save file to disk.
f, _ := os.Create("pokeemerald.modified.sav")
defer f.Close()
fileWriter := bufio.NewWriter(f)
gameSave.Write(fileWriter)
fileWriter.Flush()
}
```