Skip to content

Instantly share code, notes, and snippets.

@huderlem
huderlem / map_constants_update.py
Last active September 3, 2022 19:43
Update new map constants
# This script will apply the same changes to your project as this PR: https://github.com/pret/pokeemerald/pull/1755/files
# You can run this before or after merging with upstream pret, so that your project's custom code and data are updated appropriately.
# To run this script:
# - Place this file in the root of your project. For example, pokeemearld/map_constants_update.py
# - Run "python map_constants_update.py"
import re
import glob
# 1. In map.json files, convert "dest_warp_id" to string value instead of integer. 127 becomes "WARP_ID_DYNAMIC". 126 becomes "WARP_ID_SECRET_BASE."