You are not logged in.
Written by Mateo
To explain to people how you go about repointing and editing tilesets in Gold and Silver (I assume its the same for Crystal, also, but I don’t hack crystal, so go figure)
Medium, Need basic understanding of Hex Editor and Pointers
What you will need:
Pokémon Gold or Silver Version ROM (US English)
Hex Editor (i.e., Hex Workshop)
Calculator (Windows CALC.EXE)
Pointer Calculator (Take your pick)
Tile Editor (TLP will be used in this tuorial)
Ok, the first step is to open your rom in TLP and find Tileset #1(Outside tileset). You then using plus and minus keys at the top of the keyboard, have it so it is showing the top row of tiles right, then lower it by so the colors are right but there is one little row of what looks like garbage at the top of the first tile.
now copy the whole tileset and paste it into a blank space in the rom. make you sure you have the tileset GFX, plus the two bytes before and after the GFX themselves.
EDIT: Since this is probably still confusing, to make it easier I have uploaded this:
A blank tileset image you can just import in TLP at the offset you want to point to, and draw your tiles over the blank ones (using + and - keys to leave the random black and red pixel lines where they are)
You now draw or paste your tiles over the existing ones in the tileset(the one you just pasted in the blank space). After you are done with that, save the rom. Write down the offset of the 2 bytes before the GFX started. You will need it later.
Now, open your Rom in a Hex Editor, such as Hex Workshop. Now, I will explain to you exactly what you need to do, so if you are not familiar with hex you should still be able to do this step. Now, while keeping the hex editor open, open your calculator and figure up the following equation to find what offset to go to: 156BE + (F * Tileset #) so if you were making a replacement for tileset 4 (the houses in cherry grove) you would set it to scientific mode, click over to hex, and type (F) (x) (4) (+) (1) (5) (6) (B) (E) (=). that would tell you the offset where Tileset #4’s header starts. now, when you get there, the data is stored in this manner: [Graphics Ptr, 3 byte] [Block Data Ptr, 3 byte] [Collision/Effect data ptr, 3 byte] [Animation Ptr, 2 byte] [Unused (00 00), 2 byte] [Palette Data Ptr, 2 byte. Animation data is always bank 3F, Palettes are always bank 02.
Open your pointer calculator and calculate a 3-byte pointer to the offset where you saved the GFX(remember, the offset I told you to write down). Now in your hex editor, while at the offset of the header, type the pointer over the first 3 bytes of the tileset header. Now save your Rom, and if all went correctly it should be done.
This part is fairly simple if you follow directions.
Ok, first step is to find a good stretch of blank space in the rom. It can be in any bank(also this step is only necessary if you wish to add more blocks than the original tileset had to begin with).
Next, Open up your pointer calculator and calculate a 3 byte pointer to the blank space you found. Using the formula above, find the header and insert this pointer over the old one.
Now that it is repointed, open up Goldmap 1.6 and load a map with your tileset. You will see everything is blank. Now what you do is go through and simply make every block you want. Long process, but its the only way to do it. Save and your block data is set up!
This is very similar to editing block data. Repoint to a stretch of blank space, then type in the collision/effect data manually. Collision data for each block is 4 Bytes long, in the order of Upper Left, Upper Right, Bottom Left, Bottom Right. See the attatched list of collision/effect data for which values to use.
00 = Land 01 = Grass 02 = ? 03 = ? 04 = ? 05 = ? 06 = 07 = Wall 08 = ? 09 = ? 0A = ? 0B = ? 0C = ? 0D = ? 0E = ? 0F = Wall? 10 = Bushy Effect (No Wild Pokemon) 11 = ? 12 = Cutable Tree 13 = ? 14 = Slightly odd Bush effect W/ Wild Pokemon 15 = Headbuttable Tree 16 = ? 17 = ? 18 = Bushes w/ Wild Pokemon 19 = ? 1A = Cutable Tree? 1B = ? 1C = Bushy Effect? 1D = Headbutt Tree? 1E = ? 1F = ? 20 = Surfable Water With Bushy Effect 21 = Surfable Water? 22 = Surfable Water? 23 = Slip N Slide! 24 = Whirlpool 25 = Water? 26 = Water 27 = Water Wall 28 = Water / Bush? 29 = Cave Water 2A = Water ? 2B = ? 2C = Whirlpool? 2D = Water? 2E = Water? 2F = Wall? 30 = Surfable WAter - Moves you Right 31 = Surfable WAter - Moves you Left 32 = Surfable WAter - Moves you Up 33 = Waterfall 34 = Surfable WAter - Moves you Right? 35 = Surfable WAter - Moves you Left? 36 = Surfable WAter - Moves you Up? 37 = Surfable Water - Moves you South 38 = Surfable WAter - Moves you Left? 39 = Surfable WAter - Moves you Right? 3A = Surfable WAter - Moves you North? 3B = Waterfall? 3C = Surfable WAter - Moves you Left? 3D = Surfable WAter - Moves you Right? 3E = Surfable WAter - Moves you North? 3F = Surfable WAter - Moves you South? 40 = ? 41 = Moves you Right 42 = Moves you Left 43 = Moves you North 44 = Moves you South 45 = ? 46 = ? 47 = ? 48 = ? 49 = Moves you Right? 4A = Moves you Left? 4B = Moves you North? 4C = Moves you South? 4D = ? 4E = ? 4F = ? 50 = Moves you Right? 51 = Moves you Left? 52 = Moves you North? 53 = Moves you Down? 54 = ? 55 = ? 56 = ? 57 = ? 58 = Moves you Right? 59 = Moves you Left? 5A = Moves you Up? 5B = Moves you Down? 5C = ? 5D = ? 5E = ? 5F = ? 60 = Fall Pit 61 = ? 62 = Wall? 63 = ? 64 = ? 65 = ? 66 = ? 67 = ? 68 = ? 69 = ? 6A = Wall? 6B = ? 6C = ? 6D = ? 6E = ? 6F = ? 70 = Walk South into Wall to Warp 71 = Door (Moves you South when Walked upon the Tile) 72 = Walk on WArp 73 = ? 74 = ? 75 = ? 76 = Walk left into Wall to Warp 77 = 78 = 79 = 7A = Stairway 7B - Cave Ent (Moves you South when Walked upon the Tile) 7C = WArp Pad 7D = 7E = Walk Right into WAll to Warp 7F = 90 = Can Talk to an NPC 2 blocks away 91 = Bookshelf 92 = Wall? 93 = Computer 94 = Radio 95 = Town Map 96 = Freezer 97 = "Its a TV" 98 = Wall? 99 = Wall? 9A = Wall? 9B = Wall? 9C = Wall? 9D = Window 9E = ? 9F = Incense Burner A0 = East Ledge A1 = West Ledge A2 = North Ledge A3 = South Ledge A4 = South Ledge (Cannot Rejump until you reset map) A5 = ? A6 = ? B2 = Cant Walk north B3 = Cant Walk South B4 = Cant walk East B5 = Cant Walk West
There is no need to repoint, as this is always the same size. Simply follow the pointer in the header, which you calculate using the formula above.
Data is stored as follows:
The data is simply a list of which pallete colour for each tile stored in order. Each pallete is half a byte, stored backwards. for example, if the first 2 pallets in the tileset are "0" and then "3", the byte would be "30" and so on. A list of Pallet numbers follows:
0 = grey 1 = red/pink 2 = green 3 = water color (blue) 4 = orange 5 = brown 6 = roof color
Once you have your pallet allocations set up, you can test it by loading it in Goldmap again. That is the beauty of Goldmap 1.6: Everything read from the rom.
Unfortunately, at this time I do not have a full list of what goes here. All I can say is, find a tileset with the animations you like, such as Tileset 1 if you want whirlpool, tileset 2 or 3 if you just want Flowers and water, and so on, and copy its pointer. Once I compile a list of them, they will be included in here as well.
Credits go out to Hyper Hacker for info on header setup,
Coolboyman for his info on all the tile effects,
Jigglypuff for making Goldmap 1.6, and Momma for buying
this laptop, without it I wouldnt be sitting here typing this mofo
right now ^_^.
Whatever you do, work heartily, as for the Lord and not for
men, knowing that from the Lord you will receive the
inheritance as your reward.
how to make what not garbagey looking, exactly? I'm assuming you mean the fact that most of the tilesets are compressed, so you can't edit them in tile layer pro. You will have to decompress these using AGIXP and then reinsert them once you edit them.
I'm starting to get better at this, as I managed to edit some collision data yesterday, but the one problem is that AGIXP tends to make the newily inserted tileset glitchy, not to mention that in order to insert a tileset, you have to make it all blue and yellow......
Also, can you tell us how to insert completely new tilesets, like Koolboyman did in Prism?
Well to do that you would have to repoint the table of tileset headers and add your new ones to the end.
Also, you don't have to make them blue and yellow, you just tell it which colour is the light one and which is dark like when inserting any other graphic, then tell it where to insert manually instead of clicking on pokemon or trainer pics. I routinely insert tileset graphics using other colours that arent blue and yellow and they work.
But it appears all glitchy when I insert it with AGIXP and not the way I want it, it always appears the opposite colors of what I want it, and then when I try to insert it again, it fouls up even more, making it look like Glitch City, eventually crashing and locking up the rom
Well, are you inserting them as compressed or uncompressed? and did you choose the lighter colour as the top colour and the darker colour as the second colour? just trying to think of anything that would do it.
that's odd. I've never had it give me problems inserting them compressed that way. Have you double checked the pointer to make sure you didn't accidentally have it pointing like a byte or so off from the right offset?
Funny, when I read this tutorial a couple of months ago, I didn't understand a thing about it.
Suddenly now, it's all clear :D
Last edited by Miksy91 (2010-11-12 21:21:17)
I made a similar tutorial a while ago, but for some reason I never published it. Reading this, I realize that it won't be necessary. I can however supplement yours with my findings.
Additional collision data:
(Noticed that some of these things weren't in/properly explained.)
14: Park extra tall grass (encounters possible)
A0: Jump when going east
A1: Jump when going west
A2: Jump when going north
A3: Jump when going south
A4: Jump when going south or east
A5: Jump when going south or west
B0: Can't enter or leave spot from east
B1: Can't enter or leave spot from west
B2: Can't enter or leave spot from north
B3: Can't enter or leave spot from south
B4: Can't enter or leave spot from south or east
B5: Can't enter or leave spot from south or west
Nice job with the tutorial otherwise. You had found a few collision types that I never noticed.
I didn't understand. What is GFX?
Oh... Ok,that's make sense now.
Not sure if this belongs here exactly but it's something I found that may help others out having to do with tileset editing, not so much the headers, but a certain aspect of it.
This is for those of you who use custom tilesets using your own arrangements and those pesky roof tiles get in the way when you load the map, replacing your custom tiles.
It's a simple fix:
Go to 0x1c00e. This little ASM script tells the game to load the graphics for the rooftiles (replacing the real tiles).
If you go to this address in TLP or any other gfx editor you'll see the graphics for the roof tiles just after it.
Replace the 21 with a C9.
The 21 byte in ASM means to load something from the 2byte pointer next to it, which in this case points to the graphics a few bytes ahead, and the C9 is a return code, meaning stop this script and return to what it was doing prior.
So we're telling it to stop before it loads the roof tiles.
Hopefully this is all accurately explained and in the right section lol.
Feel free to correct my explanation.
I also have a question.
I need a collision data tile property that will act as a wall unless walked into from the left, in which case it would act as a warp. I've tried using 76 and 7E but they seem to do nothing but act as floor tiles.
Is there something already like this in the game, or would I have to program it in myself?
If so how/where would I need to look into doing that?
The ones you are looking at are for the carpets, which have to be placed next to a wall. If you walk on them normally they are floor, but if you try to walk against the wall from this tile (the direction varying with which collision byte you use) then it acts as a warp. Hope that helps
Im confused by this. Please help me step by step
Ok, the first step is to open your rom in TLP and find Tileset #1(Outside tileset). You then using plus and minus keys at the top of the keyboard, have it so it is showing the top row of tiles right, then lower it by so the colors are right but there is one little row of what looks like garbage at the top of the first tile. now copy the whole tileset and paste it into a blank space in the rom. make you sure you have the tileset GFX, plus the two bytes before and after the GFX themselves. EDIT: Since this is probably still confusing, to make it easier I have uploaded this: A blank tileset image you can just import in TLP at the offset you want to point to, and draw your tiles over the blank ones (using + and - keys to leave the random black and red pixel lines where they are)
- I open the rom
- Eksport and Copy the first tileset (newbark)
- Paste the tileset in blank space(black one,right?)
make you sure you have the tileset GFX, plus the two bytes before and after the GFX themselves.
What byte do you mean by this? In TLP, i see there is no byte. It is 2048k,Offset,00%,2BPP in TLP. The tileset GFX is the one i eksported one,right?
Last edited by Cloud (2011-01-13 11:27:59)
The pointer in the tileset header points to a line of garbage pixels right before the actual graphics start. Those are the 2 bytes before the graphics. the black line after the graphics are the last bytes. make sure you have those included in the selection.
I use a shortcut because i still confused with this. I insert the GFX using agiXP in 146C00 and use melash tileset editor to point the tileset 0 to 146C00. It can be used,right ? But then, in tileset editor, it appear like this.
Because i still don't know and confuse with palette editing.
Oh, and i use your tileset from another thread here...he..he...
Last edited by Cloud (2011-02-12 15:33:06)
Ok, if you insert it using AGIXP, you just point it to the offset you told agixp to insert it at. My example dealt with decompressed tilesets, which need those 2 bytes to say they are uncompressed. AGIXP will have the header declare it to be compressed already, so you point to the same location you inserted to.
Ok, the pallete problem clear along with agixp. But how do you make the block for a map border to not make it odd looking. I use a tree as a border and it's odd looking because it doesn't have it wood. Can you post a picture of a block border you make,please?