The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > Tools, Tutorials & Resources
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.
New threads in this forum are to be approved by a moderator before they are displayed.


Advertise here

Reply
 
Thread Tools
  #1    
Old May 12th, 2013, 11:01 AM
BallMaster's Avatar
BallMaster
HEX cracker
 
Join Date: Jan 2013
Location: Finland
Age: 16
Gender: Male

Advertise here
Hello and welcome to my first ever tutorial on Pokemon hacking!
Now I'll teach you how to edit the town map of Red/Blue/Yellow. We'll do it in hex but don't worry
about that. For Yellow editors the offstets mentioned will be different but the codes are same.

Things needed: - a ROM of Red/Blue/Yellow
- a HEX editor ( I use Translhextion )
- an emulator ( VisualBoyAdvance is great )
- a RBY text table ( in attachments, change extension to .tbl )

Let's get started. Remember to backup your Rom

Part 1; The Image

Quote:
The town map in RBGY is stored using RLE(Run Lenth Encoding) compression,
So for example you want to lay down 4 land tiles you would with out RLE
compression: 06 06 06 06, which RLE compression you write the Hexadecimal
number of the Tile down then the number of times you would like to lay it
down on the screen, e.g. 64.
The map is at x71100 - x711AA in Red/Blue.

There's 16 tiles to choose from. (check the attachments for more info)
0x- Blank tile
1x- Weird vertical line ( isn't used in game )
2x- Weird horizontal line ( isn't used in gme )
3x- Weird ball like thing ( isn't used in game )
4x- Sea tile
5x- City tile
6x- Land tile
7x- Route tile ( also used in the most upper area where the name is displayed )
8x- Coast tile ( bottom, left )
9x- Coast tile ( bottom, right )
Ax- Coast tile ( Upper, right )
Bx- Coast tile ( Upper, left )
Cx- Sidearea tile
Dx Sea "intersection"
Ex- Sea route ( horizontal )
Fx- Sea route ( vertical )

Your map can be 20 tiles wide and 18 tiles high, though the most upper tiles
should be left with no. 7 since the name is displayed there.
Let's get editing.

The map's pointer is at 710D1, so change that to an empty space and owerwrite the old map's data. (If you're unfamiliar with pointers check the bottom spoiler)

Now you can write the map. It's really simple.
If you for example want 4 water tiles in a row you just write 44 ( 4x for water tile, x4 for 4 tiles)
When one row is full it begins on the next one, but if you hav a tile in the end of a row
and the same in the beginning of the nex the you should write them seperatly and not together.

I recomend you check your game every five bytes or so in case you mess upp. Believe me that's easy.

Part 2; The locations

Once you're done with the image you'll notice that the locations are screwed, so let's fix that.
Now there are 47 possible locations on the map already, but i'm not shure how to add more or delete properly...yet.
So try to keep it under 47.
The areas are at x71313.
Now every area uses 3 bytes; 1 byte for location on the map and 2 bytes for name pointer.
Pallet town's location byte is B2 which means 2 tiles left and B tiles down ( B=11 )
Since the biggest single value in Hex is F/16 you cannot cover the entire map.
The two last tiles on the left and right side are innaccessible and the most upper and lowest tiles are innaccessible.
The locations data is a bit messed up but i have them written down here:
( remember there's a 2-byte pointer after each location )

Now your locations are fixed but the order of them might be wrong. To simply change that
goto x70F11. Here's where the order of the areas are. The first byte: 00 represents Pallet town
and the second: 0C is route 1. Check below if youre lazy.
Spoiler:

Pallet - 00
Route1 - 0C
Viridian - 01
Route2 - 0D
Forest - 33
Cave - C5
Pewter - 02
Route3 - 0D
Moon - 3B
Route4 - 0F
Cerulean - 03
Route24 - 23
route25 - 24
Cottage - 58
Route5 - 10
Route6 - 11
Vermilion- 05
Anne - 5F
Route9 - 14
Tunnel - 51
Route10- 15
Lavender- 04
Tower - 8F
Route8 - 13
Route7 - 12
Celadon - 06
Saffron - 0A
Route11- 16
Route12- 17
Route13- 18
Route14- 19
Route15- 1A
Route16- 1B
Route17- 1C
Route18- 1D
Fuchsia- 07
Safari - D9
Route19- 1E
Seafoam- 9F
Route20- 1F
Cinnabar- 08
Route21 - 20
Route22 - 21
Victory - C6
Indigo - 09
Power - 53

So if you change the first byte to 07, then Fuchsia city will be firts on the map.
Do not insert any random numbers. just use the ones that are specified.

Part 3 The names

The names are ofcourse all wrong. Editing this is probably the easyest part, but without a text table it's not that easy.
After the location byte I already gave you comes the text pointer to that area. Simply change the pointer to an empty space and write your own name there, remebre 50 ends the name.
Once your done you can delete the old text data at x71473.

Thanks for reading and hope this helps some of you guys.
If you have any problems just comment or PM and I'll try to help.

Credits to: Datacrystala & Cartmic & Miksy91
Attached Images
File Type: png Map info.png‎ (2.9 KB, 8 views) (Save to Dropbox)
Attached Files
File Type: txt RBY table.txt‎ (533 Bytes, 8 views) (Save to Dropbox)

Last edited by BallMaster; May 20th, 2013 at 07:01 AM.
Reply With Quote
Reply
Quick Reply

Sponsored Links


Advertise here
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 01:01 AM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.