diff options
| author | Rangi <remy.oukaour+rangi42@gmail.com> | 2019-01-06 16:32:28 -0500 |
|---|---|---|
| committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2019-01-06 16:32:28 -0500 |
| commit | 48a3eef91fd55ca19775b7e02d483fca708d8e90 (patch) | |
| tree | 06514b30334da17e573ed03087ed2fc8679420fb /Edit-the-Town-Map.md | |
| parent | fe7d00fb85e8658eb95b0237430b1b0927072b48 (diff) | |
GSC Town Map Editor tutorial by bloodless
Diffstat (limited to 'Edit-the-Town-Map.md')
| -rw-r--r-- | Edit-the-Town-Map.md | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Edit-the-Town-Map.md b/Edit-the-Town-Map.md index fdb797a..1ff2499 100644 --- a/Edit-the-Town-Map.md +++ b/Edit-the-Town-Map.md @@ -7,6 +7,7 @@ The Town Map is a bit tricky to edit: it's one of the only things in pokecrystal 2. [The color palettes](#2-the-color-palettes) 3. [The Johto and Kanto tilemaps](#3-the-johto-and-kanto-tilemaps) 4. [The landmarks](#4-the-landmarks) +5. [GSC Town Map Editor](#5-gsc-town-map-editor) ## 1. The tileset @@ -100,3 +101,34 @@ If you're wondering why those offsets exist, it's because of how the GameBoy har > still affects the priority ordering - a better way to hide a sprite is to set its Y-coordinate offscreen. For more information on editing landmarks, see the tutorial on [how to add a new map and landmark](Add-a-new-map-and-landmark). + + +## 5. GSC Town Map Editor + +[Step 3](#3-the-johto-and-kanto-tilemaps) described how to edit the tilemaps using a hex editor, but it can be a visual pain to do so. An alternative is the [GSC Town Map Editor](https://hax.iimarckus.org/topic/97/) program by Harrison. + +Usually you shouldn't use old binary hacking programs with the disassembly, but this program has an Export Map function, which creates a .map file that's (almost) exactly the same as pokecrystal's .bin files. + +First, [download](http://kusabax.cultnet.net/pkmn/GSC%20Town%20Map%20Editor.zip) and unzip the program. Two files it includes are GSC Town Map Editor.exe and tileset.bmp. The tileset.bmp image is used by the program to render the Town Map; it's twice the size of town_map.png and uses colors. You can use MS Paint to resize and color town_map.png and save it as tileset.bmp. The download already includes an appropriate tileset.bmp for default GSC: + + + +Then run GSC Town Map Editor.exe, open your ROM with File→Open, and pick a region to edit. You'll see something like this: + + + +When you're done making edits, go to File→Export Map and overwrite johto.bin or kanto.bin. (The default extension is .map, but you can enter .bin instead.) The only difference between the exported file and the original is that GSC Town Map Editor does not put $FF at the end. So edit [engine/pokegear/pokegear.asm](../blob/master/engine/pokegear/pokegear.asm): + +```diff + JohtoMap: + INCBIN "gfx/pokegear/johto.bin" ++ db $ff + + KantoMap: + INCBIN "gfx/pokegear/kanto.bin" ++ db $ff +``` + +Now your edited map will show up when you rebuild the project! + +Note that GSC Town Map Editor, like most old binary hacking tools, makes assumptions about the exact addresses of various content in the ROM. If you make extensive edits to the disassembly project, the addresses could change. Then you'll get an "Access violation" error when you try to pick a region. If that happens, you'll just have to use a hex editor. |
