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 | |
parent | fe7d00fb85e8658eb95b0237430b1b0927072b48 (diff) |
GSC Town Map Editor tutorial by bloodless
-rw-r--r-- | Add-a-new-tileset.md | 4 | ||||
-rw-r--r-- | Edit-the-Town-Map.md | 32 | ||||
-rw-r--r-- | Tutorials.md | 1 | ||||
-rw-r--r-- | screenshots/gsc-town-map-editor-tileset.bmp | bin | 0 -> 13366 bytes | |||
-rw-r--r-- | screenshots/gsc-town-map-editor.png | bin | 0 -> 5412 bytes |
5 files changed, 35 insertions, 2 deletions
diff --git a/Add-a-new-tileset.md b/Add-a-new-tileset.md index 5c7b0e4..97d786f 100644 --- a/Add-a-new-tileset.md +++ b/Add-a-new-tileset.md @@ -132,13 +132,13 @@ Then create **data/tilesets/museum_collision.asm**. This should also be an empty At this point, you *could* design the blocks one by one, using a text editor for museum_collision.asm and a hex editor for museum_metatiles.bin. Just like you could have designed the tiles in a graphics editor, and the palette map in a text editor. But that's tedious and error-prone. -Instead, you can use [Polished Map](https://github.com/Rangi42/polished-map). It's a program for editing maps and tilesets. Just open any of the [maps/\*.blk](../tree/master/maps/) files and pick "museum" as its tileset. As long as the graphics, palette map, metatiles, and collision files exist, this will work. Then click Tools → Resize Blockset… (or the blue **±** button) to add some blocks to the sidebar, and right-click one of them to open the block editor: +Instead, you can use [Polished Map](https://github.com/Rangi42/polished-map). It's a program for editing maps and tilesets. Just open any of the [maps/\*.blk](../tree/master/maps/) files and pick "museum" as its tileset. As long as the graphics, palette map, metatiles, and collision files exist, this will work. Then click Tools→Resize Blockset… (or the blue **±** button) to add some blocks to the sidebar, and right-click one of them to open the block editor:  Just place the tiles and type the collision values for each block. Tiles are selected from the tileset, and valid collision values are in [constants/collision_constants.asm](../blob/master/constants/collision_constants.asm). -You can also edit the tileset graphics and palette map from within Polished Map. Just click Tools → Edit Tileset… (or the green puzzle piece button): +You can also edit the tileset graphics and palette map from within Polished Map. Just click Tools→Edit Tileset… (or the green puzzle piece button):  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. diff --git a/Tutorials.md b/Tutorials.md index a9e4c4f..c8a13c6 100644 --- a/Tutorials.md +++ b/Tutorials.md @@ -98,6 +98,7 @@ Tutorials may use diff syntax to show edits: - Implement dynamic overhead+underfoot bridges - Sideways stairs, with step types for diagonal movement and collisions to trigger it - Pan the camera for cutscenes by making the player invisible +- Short beeping for low HP - Gain experience from catching Pokémon - Trainer dialog and music change for their last Pokémon - TM/HM item balls say the move name diff --git a/screenshots/gsc-town-map-editor-tileset.bmp b/screenshots/gsc-town-map-editor-tileset.bmp Binary files differnew file mode 100644 index 0000000..3707147 --- /dev/null +++ b/screenshots/gsc-town-map-editor-tileset.bmp diff --git a/screenshots/gsc-town-map-editor.png b/screenshots/gsc-town-map-editor.png Binary files differnew file mode 100644 index 0000000..06ec312 --- /dev/null +++ b/screenshots/gsc-town-map-editor.png |