diff options
author | Rangi <remy.oukaour+rangi42@gmail.com> | 2019-09-01 22:31:47 -0400 |
---|---|---|
committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2019-09-01 22:31:47 -0400 |
commit | 3f79c6828a4ee636a1db638e7fc626a0919f14ef (patch) | |
tree | 697301b8f1785d0a269072172a684388a8f86931 | |
parent | 5842be512f6e3991e624bc9d8b311e5509b93aea (diff) |
Cleanup, local screenshots, and Tilemap Studio
-rw-r--r-- | Edit-the-Town-Map.md | 77 | ||||
-rw-r--r-- | Home.md | 3 | ||||
-rw-r--r-- | Remove-Artificial-Save-Delay.md | 2 | ||||
-rw-r--r-- | Running-Shoes.md | 6 | ||||
-rw-r--r-- | Tutorials.md | 9 | ||||
-rw-r--r-- | screenshots/tilemap-studio.png | bin | 0 -> 19446 bytes | |||
-rw-r--r-- | screenshots/town-map-ingame.png | bin | 0 -> 1440 bytes | |||
-rw-r--r-- | screenshots/town-map-tilemap-coords.png | bin | 0 -> 1785 bytes | |||
-rw-r--r-- | screenshots/town-map-tileset-coords.png | bin | 0 -> 399 bytes |
9 files changed, 60 insertions, 37 deletions
diff --git a/Edit-the-Town-Map.md b/Edit-the-Town-Map.md index ab94fee..d94bbe9 100644 --- a/Edit-the-Town-Map.md +++ b/Edit-the-Town-Map.md @@ -1,73 +1,92 @@ -In Pokemon Red, the town map is stored in a more compressed form than Pokemon Crystal. After some practice, though, editing the layout gets very easy. +In Pokémon Red, the Town Map is stored in a more compressed form than Pokémon Crystal. + +You can edit it with [Tilemap Studio](https://github.com/Rangi42/tilemap-studio), or to learn more about the compression format, use a hex editor. -All you really need is a hex editor. ## Contents 1. [The tileset](#1-the-tileset) -2. [How the compression works](#2-how-the-compression-works) -3. [Editing the layout](#3-editing-the-layout) -4. [Moving and Renaming Locations](#4-moving-and-renaming-locations) +2. [Editing with Tilemap Studio](#2-editing-with-tilemap-studio) +3. [How the compression works](#3-how-the-compression-works) +4. [Editing with a hex editor](#4-editing-with-a-hex-editor) +5. [Moving and Renaming Locations](#5-moving-and-renaming-locations) + ## 1. The Tileset -Pokemon Red uses a very simple and basic tile set for the town map, made of 16 tiles. It looks like this: +Pokémon Red uses a very simple tileset for the Town Map, made of 16 tiles. It looks like this: + + + +You can edit this tileset in [gfx/town_map.png](../blob/master/gfx/town_map.png). + +I added those numbers above it in the screenshot to aid in editing the layout. + - +## 2. Editing with Tilemap Studio -You can edit this tile set in [gfx/town_map.png](https://github.com/pret/pokered/blob/master/gfx/town_map.png) +The Town Map tilemap is in [gfx/town_map.rle](../blob/master/gfx/town_map.rle). The easiest way to edit it is in [Tilemap Studio](https://github.com/Rangi42/tilemap-studio), a program for Windows or Linux that can edit tilemaps in many different formats. + +To install Tilemap Studio, just follow the instructions in its [INSTALL.md](https://github.com/Rangi42/tilemap-studio/blob/master/INSTALL.md): download install.bat and tilemapstudio.exe from the latest release; run install.bat with admin privileges; and delete the downloaded files, since a shortcut to the installed copy of Tilemap Studio should now exist on your Desktop. If you need help using it, read the documentation in the Help menu. + +Anyway, pick the RBY Town Map format, open the [gfx/town_map.rle](../blob/master/gfx/town_map.rle) tilemap, and load the [gfx/town_map.png](../blob/master/gfx/town_map.png) tileset. Then place the tiles however you want and save the edited Town Map. That's all! + + + +Without a custom program, you would have to know what the compressed bytes in town_map.rle mean. Let's go over that next. -I added those numbers above it in the screenshot to aid in editing the layout. ## 2. How the compression works -Unlike Pokemon Crystal, Pokemon Red's town map layout uses a type of encoding called run-length encoding (RLE), which I will explain here. +Unlike Pokémon Crystal, Pokémon Red's Town Map layout uses a type of encoding called run-length encoding (RLE), which I will explain here. -Now, go ahead and open up [gfx/town_map.rle](https://github.com/pret/pokered/blob/master/gfx/town_map.rle) in a hex editor. My personal favorite hex editor is [FlexHEX](http://www.flexhex.com/), but any hex editor should work. +Open [gfx/town_map.rle](../blob/master/gfx/town_map.rle) in a hex editor. My personal favorite hex editor is [FlexHEX](http://www.flexhex.com/), but any hex editor should work. You should see that it starts with "7F 75 6C". If it doesn't, maybe you've edited this before, or you're looking at the wrong file (or you somehow aren't using your hex editor correctly)! -How RLE compression works is it takes it one byte at a time. We'll take the first one, $7F, for the first example. +How RLE compression works is it takes it one byte at a time. We'll take the first one, $7F, for the first example. + +First, the first digit in a byte represents the tile to be placed. in this one, it is tile 7, which, as you can see in my image above, is the blank white tile. -First, the first digit in a byte represents the tile to be placed. in this one, it is tile 7, which, as you can see in my image above, is the blank white tile. +The second byte is how many of that tile will be placed in a row. For this byte, that value is $F, or 15 in [decimal](https://www.rapidtables.com/convert/number/hex-to-decimal.html). That means that the engine will place 15 white tiles in a row, starting on the top-left of the screen. This is visible as the white part on the top of the screen behind where the names of locations are displayed. -The second byte is how many of that tile will be placed in a row. For this byte, that value is $F, or 15 in [decimal](https://www.rapidtables.com/convert/number/hex-to-decimal.html). That means that the engine will place 15 white tiles in a row, starting on the top-left of the screen. This is visible as the white part on the top of the screen behind where the names of locations are displayed. + - +The GBC screen is 20 tiles wide, so 5 more white tiles would need to be placed after this for the white line on top of the screen, and this is accomplished by the second byte, which is $75. Two bytes were needed for one type of tile because the highest number you can have using one digit of hex is 15. You can see that the rest of the code fits the rest of the map using the same method. Keep in mind that when the placement of tiles reaches the right-hand side of the screen, it will continue to place them on the left-hand side, one row down. -The GBC screen is 20 tiles wide, so 5 more white tiles would need to be placed after this for the white line on top of the screen, and this is accomplished by the second byte, which is $75. Two bytes were needed for one type of tile because the highest number you can have using one digit of hex is 15. You can see that the rest of the code fits the rest of the map using the same method. Keep in mind that when the placement of tiles reaches the right-hand side of the screen, it will continue to place them on the left-hand side, one row down. -## 3. Editing the Layout +## 3. Editing with a hex editor -Now, editing the layout shouldn't be that hard, provided you've been paying attention so far. It might be easier to start with a mockup of your map, and then converting that information into RLE code. +Now, editing the layout shouldn't be that hard, provided you've been paying attention so far. It might be easier to start with a mockup of your map, and then converting that information into RLE code. -All you have to do here is take the number of the tile you want to be placed next, then how many of them you want in a row (as a [hexadecimal number](https://www.rapidtables.com/convert/number/decimal-to-hex.html)). Remember, you can only place 15 tiles in a row with one byte. In order to add more, simply use the next byte for the same tile. Also, it is important to note that you should put $00 at the end of this to tell the game that you're done. +All you have to do here is take the number of the tile you want to be placed next, then how many of them you want in a row (as a [hexadecimal number](https://www.rapidtables.com/convert/number/decimal-to-hex.html)). Remember, you can only place 15 tiles in a row with one byte. In order to add more, simply use the next byte for the same tile. Also, it is important to note that you should put $00 at the end of this to tell the game that you're done. -The beauty of the disassembly is that the data for the new tile map can be larger than the original, without tedious repointing. If you run out of room, you can simply make the file larger, and it will still compile perfectly. +The beauty of the disassembly is that the data for the new tile map can be larger than the original, without tedious repointing. If you run out of room, you can simply make the file larger, and it will still compile perfectly. After you're done with this, save the .rle file, compile the ROM, and that's it! Done with the map! -However, if you moved towns and routes into different places, or plan on giving them different names, you will need to fix that. Lucky for you, that is a very simple process. +However, if you moved towns and routes into different places, or plan on giving them different names, you will need to fix that. Lucky for you, that is a very simple process. + ## 4. Moving and Renaming Locations -First, open up [text/map_names.asm](https://github.com/pret/pokered/blob/master/text/map_names.asm), and add or remove map names as desired, following the layout already there. It might go something like this: +First, open up [text/map_names.asm](../blob/master/text/map_names.asm), and add or remove map names as desired, following the layout already there. It might go something like this: ```diff +.NewCityName: + db "NEW CITY@" ``` -You can put new names in any order you want. Don't forget that the names can be a maximum of 15 characters long, and they must end with a "@", which means the end of a text string, internally. +You can put new names in any order you want. Don't forget that the names can be a maximum of 15 characters long, and they must end with a "@", which means the end of a text string, internally. -Next, open up [data/town_map_entries.asm](https://github.com/pret/pokered/blob/master/data/town_map_entries.asm), and add the correct codes for your new locations. Now, you might see that there are some numbers listed before the names, and those represent the coordinates of the area. You can use this image as a guide: +Next, open up [data/town_map_entries.asm](../blob/master/data/town_map_entries.asm), and add the correct codes for your new locations. Now, you might see that there are some numbers listed before the names, and those represent the coordinates of the area. You can use this image as a guide: - + -If you scroll down, you will see another section of code titled InternalMapEntries which should be updated with map info as well. +If you scroll down, you will see another section of code labeled `InternalMapEntries` which should be updated with map info as well. -Last, open up [data/town_map_order.asm](https://github.com/pret/pokered/blob/master/data/town_map_order.asm). This is the order which you scroll through the names in the map. You can sort these using the names given in the InternalMapEntries in [data/town_map_entries.asm](https://github.com/pret/pokered/blob/master/data/town_map_entries.asm). +Last, open up [data/town_map_order.asm](../blob/master/data/town_map_order.asm). This is the order which you scroll through the names in the map. You can sort these using the names given in the `InternalMapEntries` in [data/town_map_entries.asm](../blob/master/data/town_map_entries.asm). -As for making it correspond to an overworld map, you could refer to [some tutorials found in pokecrystal](https://github.com/pret/pokecrystal/wiki/Add-a-new-map-and-landmark) for help. I may add a tutorial for this for Pokered specifically sometime. +As for making it correspond to an overworld map, that's beyond this tutorial. I may add a tutorial for this some time. -If you've done all of this correctly, the game should compile, and you should see your beautiful custom town map there!
\ No newline at end of file +If you've done all of this correctly, the game should compile, and you should see your beautiful custom Town Map there! @@ -1,5 +1,6 @@ Welcome to the pokered wiki! + ## Pages -- **[Tutorials](Tutorials):** Lots of how-to guides for making custom games.
\ No newline at end of file +- **[Tutorials](Tutorials):** Lots of how-to guides for making custom games. diff --git a/Remove-Artificial-Save-Delay.md b/Remove-Artificial-Save-Delay.md index 83010e8..0071ae8 100644 --- a/Remove-Artificial-Save-Delay.md +++ b/Remove-Artificial-Save-Delay.md @@ -72,4 +72,4 @@ and [text.asm](https://github.com/pret/pokered/blob/master/text.asm) (about line ``` This optional change completely removes the "Would you like to SAVE the game?" choice, as well as the text and text pointer for it. -Done! The game should save quickly without going through that useless menu. Enjoy!
\ No newline at end of file +Done! The game should save quickly without going through that useless menu. Enjoy! diff --git a/Running-Shoes.md b/Running-Shoes.md index 77a690d..1698df8 100644 --- a/Running-Shoes.md +++ b/Running-Shoes.md @@ -4,7 +4,8 @@ Anyway, what this code does is it makes the player run at double walking speed w You should also note that your current save file may not be compatible with these changes, as you might be unable to move when you load the game. Restarting your progress will solve this issue, but if there is no problem, then no need to restart. -Here are the lines you gotta add in [home/overworld.asm](https://github.com/pret/pokered/blob/master/home/overworld.asm) starting at about line 284: +Here are the lines you gotta add in [home/overworld.asm](https://github.com/pret/pokered/blob/master/home/overworld.asm) starting at about line 284: + ```diff ... @@ -39,4 +40,5 @@ Here are the lines you gotta add in [home/overworld.asm](https://github.com/pret and a ... ``` -Done! Not too bad, eh?
\ No newline at end of file + +Done! Not too bad, eh? diff --git a/Tutorials.md b/Tutorials.md index a152ceb..e686040 100644 --- a/Tutorials.md +++ b/Tutorials.md @@ -6,9 +6,10 @@ This is how tutorials show changes made to files: +add green + lines ``` -There's not too much stuff here right now, but more may be added soon. +There's not too much stuff here right now, but more may be added soon. Here's all we have so far: -- [Editing the Town Map](https://github.com/pret/pokered/wiki/Edit-the-Town-Map) -- [Remove Artificial Save Delay](https://github.com/pret/pokered/wiki/Remove-Artificial-Save-Delay) -- [Running Shoes](https://github.com/pret/pokered/wiki/Running-Shoes)
\ No newline at end of file + +- [Editing the Town Map](Edit-the-Town-Map) +- [Remove Artificial Save Delay](Remove-Artificial-Save-Delay) +- [Running Shoes](Running-Shoes) diff --git a/screenshots/tilemap-studio.png b/screenshots/tilemap-studio.png Binary files differnew file mode 100644 index 0000000..fddad8f --- /dev/null +++ b/screenshots/tilemap-studio.png diff --git a/screenshots/town-map-ingame.png b/screenshots/town-map-ingame.png Binary files differnew file mode 100644 index 0000000..7a1c09b --- /dev/null +++ b/screenshots/town-map-ingame.png diff --git a/screenshots/town-map-tilemap-coords.png b/screenshots/town-map-tilemap-coords.png Binary files differnew file mode 100644 index 0000000..60a72f5 --- /dev/null +++ b/screenshots/town-map-tilemap-coords.png diff --git a/screenshots/town-map-tileset-coords.png b/screenshots/town-map-tileset-coords.png Binary files differnew file mode 100644 index 0000000..382f465 --- /dev/null +++ b/screenshots/town-map-tileset-coords.png |