Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2010-12-17 04:02:46

Riverside
Member
Registered: 2010-12-12
Post 1/55

Noob trying to hack Crystal (Help)

Oh, hello... unlike other threads, in this thread I have not one specific problem, instead... well, I'm new in hacking so I need a lot of help trying to do stuff.

Well, let's start with something simple... and I hope I can get some help.

In Violet City there's tree that blocks your way to a hidden hyper potion

951159951159.jpg

I want to replace that three for a Rock smash boulder

That's all for now...

Tools that I got:

Hexpose
Crystalmap
Cry editor
CrysTrainereditor and TrnPKMN (don't work, I double kick them but they dont load)
Crystal sprite (doesn't work, it's unvalid with Win32 or something like that)
Item Editor
Crystal Mart
CrysPKMNStats (Doesn't work, but thanks to Guige's guide I know how to modify pokemon stats via hex)
Poketext
GSC Town Map Editor
GSC Wild Pokemon Editor

What I know:

Basic hex (basic = Guige's guide)
Crystalmap editing (basic too, I guess)
Some other tools that are no brainer.

Offline

#2 2010-12-17 06:34:23

Tauwasser
Member
Registered: 2010-10-16
Post 54/448

Re: Noob trying to hack Crystal (Help)

Rock Smash boulders are people events, unlike trees, which are part of the map.

You will need to replace the block with the tree with one without it and add a people event and then point that event to a rock smash boulder.
Basically, use CrystalMap to edit the tree away. Notice this maps Script and Event rombank. Find another map with a Rock Smash boulder. Copy its event data by hand. Note its script offset. Close Crystalmap. Use a hex editor and go to the offset you just noted. Copy the script to a new hex file. To read the script you will need something like my scripting doc. Beware, Crystal uses other commands, so you will have to add a shift in the command values at 0x52 (... 0x51 in Gold -> 0x51 in Crystal, 0x52 in Gold -> 0x53 in Crystal ...).
Now the hard part: Repoint the event data for Violet City. Add an additional people event and fill it with the data you copied for the Rock Smash boulder. Point the boulder's script to somewhere within the Script and Event bank of Violet City and put the script you copied earlier there. Done.

cYa,

Tauwasser

Offline

#3 2010-12-17 22:16:50

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 339/3,474

Re: Noob trying to hack Crystal (Help)

Another thing you will need to do is edit the spriteset for Violet city and edit it to load the sprite for rocksmash boulders, as they aren't there by default. I know where the tables are in gold, but I don't actually know where they are in crystal. Maybe someone who hacks crystal more will know where they are.

Offline

#4 2010-12-18 07:36:38

Miksy91
Member
Registered: 2010-10-16
Post 199/2,311

Re: Noob trying to hack Crystal (Help)

Mateo wrote:

Another thing you will need to do is edit the spriteset for Violet city and edit it to load the sprite for rocksmash boulders, as they aren't there by default. I know where the tables are in gold, but I don't actually know where they are in crystal. Maybe someone who hacks crystal more will know where they are.

About that spriteset thing, I was always wondering why some maps don't want to read some sprites whereas some else do.
Could you write the spriteset table somewhere here in tutorials section ? Thanks :)

Offline

#5 2010-12-18 08:36:38

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 340/3,474

Re: Noob trying to hack Crystal (Help)

Sure, no problem mate

Offline

#6 2010-12-18 10:55:57

Tauwasser
Member
Registered: 2010-10-16
Post 56/448

Re: Noob trying to hack Crystal (Help)

Mateo wrote:

Another thing you will need to do is edit the spriteset for Violet city and edit it to load the sprite for rocksmash boulders, as they aren't there by default. I know where the tables are in gold, but I don't actually know where they are in crystal. Maybe someone who hacks crystal more will know where they are.

Dang it, nice catch ;)

cYa,

Tauwasser

Offline

#7 2010-12-22 00:59:30

Riverside
Member
Registered: 2010-12-12
Post 2/55

Re: Noob trying to hack Crystal (Help)

Mateo wrote:

Another thing you will need to do is edit the spriteset for Violet city and edit it to load the sprite for rocksmash boulders, as they aren't there by default. I know where the tables are in gold, but I don't actually know where they are in crystal. Maybe someone who hacks crystal more will know where they are.

...so long story short, I can't replace the tree for a rock smash boulder :/

And I dont understand what Tauwasser means with "copying the script to a new hex file" and "my scripting doc", is that a program or something?

Also, I'm just learning what pointing is, how to do it and how to use it so I don't think I could point anything to anywhere right now.

there's no tutorial for pointing right? (for crystal)

Offline

#8 2010-12-22 01:54:14

77/700

Re: Noob trying to hack Crystal (Help)

Tauwasser wrote:

Beware, Crystal uses other commands, so you will have to add a shift in the command values at 0x52 (... 0x51 in Gold -> 0x51 in Crystal, 0x52 in Gold -> 0x53 in Crystal ...).

Do you know what 0x52 does in Crystal? Or the other commands that were added to the end, after 0xA4? As I recall Crystal's 0x52 acted just like Crystal's 0x51, but I didn't check the code to be sure. (I haven't looked at this in a long time and my numbers might be wrong, but you know what I mean.)

Riverside wrote:
Mateo wrote:

Another thing you will need to do is edit the spriteset for Violet city and edit it to load the sprite for rocksmash boulders, as they aren't there by default. I know where the tables are in gold, but I don't actually know where they are in crystal. Maybe someone who hacks crystal more will know where they are.

...so long story short, I can't replace the tree for a rock smash boulder :/

Sure you can. Just take it slowly and learn the basics, then move up to more complicated stuff.

Riverside wrote:

And I dont understand what Tauwasser means with "copying the script to a new hex file"

"Make a new file in your hex editor and copy the bytes into it"

Riverside wrote:

and "my scripting doc", is that a program or something?

Tauwasser's scripting doc

#9 2010-12-31 07:02:42

Riverside
Member
Registered: 2010-12-12
Post 3/55

Re: Noob trying to hack Crystal (Help)

Well, thanks for the help but I think I'll leave it stand by for now. I've been trying to learn how to edit maps (new bark town) and even if I would like to edit a lot of stuff, I dont think I can so I guess I better edit map by map.

However, there's a little problem I have... this time editing moves, it's doesnt seem complicated so I guess I wont get lost with some help and I dont think it will take much time editing.

I've read Giegue's guide and according to it the form of editing moves it's:

[Move hex value] [Move effect] [Move type] [Move hit ratio / FF (I'm guessing it's accuracy, but it also may mean base power of the move, dont know)] [Move PPs]

5 bytes I suppose.

The guide provides the hex value for Mud slap (BD), the move I want to edit, and I found a gameshark value's guides that states Ground type value is 04. I have no idea of how to know the move effect byte, move hit ratio / FF always ends in either 01 or 00, and i think it doesnt work that way, dunno.  I'm probably doing it wrong.

The move PPs is 0A (10 PPs)

So until now it would look like this

BD [Move effect] 04 [Move hit ratio/FF] 0A

You don't know how many times I've tried to look for this, but I just can't find it. Maybe I skipped it by accident or I dont know.

I've tried assuming 00 in move hit ratio/ff. assuming 01, assuming you dont have to divide by ff, assuming its accuracy, assuming its base power and nothing works.

So... any idea about what I'm doing wrong? what I want to do is give Mud slap 40 base power and 5 more PPs... that's all. (and knowing how to edit one move, I would know how to edit more moves as I want to edit other moves too)

Thanks.

Offline

#10 2010-12-31 07:17:12

99/700

Re: Noob trying to hack Crystal (Help)

Riverside wrote:

I've tried assuming 00 in move hit ratio/ff. assuming 01, assuming you dont have to divide by ff, assuming its accuracy, assuming its base power and nothing works.

The accuracy should be FF, because FF⁄FF = 1 = 100%, but we still don’t know the effect byte. Through logical reasoning, though, we don’t need to search for bytes at all.

Giegue’s guide lists the offset of attack data as 0x41AFE. Each attack takes up 7 bytes. So the nth attack is located at the offset (n − 1) × 7 + 0x41AFE. With this calculation we can see that attack 0xBD is located at offset 0x42022. And sure enough:

BD 49 14 04 FF 0A FF

Also, Giegue’s guide is incorrect in one aspect here. The purpose of the first byte is not to give the attack number (although through happenstance it does always match the attack number). Instead, the first byte defines what animation the attack uses. Since animations are stored in the same order as attacks, the numbers will always match up—but you can swap them in and out to your heart’s desire (say, change the byte to 49 to match Leech Seed).

#11 2010-12-31 08:46:08

Miksy91
Member
Registered: 2010-10-16
Post 237/2,311

Re: Noob trying to hack Crystal (Help)

I actually helped him to solve this problem already but I didn't quite understand how they would have used the first byte in the move data without any reason (BD) but now I know too.

P.S
That's probably the offset for G/S.
It's 0x4201F in Crystal so the move data begins at 0x41AFB (actually, only three bytes in front of the offset in G/S) :D

Last edited by Miksy91 (2010-12-31 08:47:06)

Offline

#12 2011-01-11 00:57:32

Riverside
Member
Registered: 2010-12-12
Post 4/55

Re: Noob trying to hack Crystal (Help)

Thanks for you help. The fact that the first byte it's the move animation might help in the future. I still have some questions but I'll leave those for later, I dont' want to rush.

Miksy91 wrote:

I actually helped him to solve this problem already but I didn't quite understand how they would have used the first byte in the move data without any reason (BD) but now I know too.

P.S
That's probably the offset for G/S.
It's 0x4201F in Crystal so the move data begins at 0x41AFB (actually, only three bytes in front of the offset in G/S) :D

Yeah, thanks a lot. Thanks to you I understand a lot about editing attacks, and editing a lot of stuff.

Anyways, I got this problem...

I want to do this: http://img593.imageshack.us/img593/5946/nbtl.jpg (did this with paint) without f*cking up other buildings that use the same blocks as Elm lab's.

The problems are 2

1.- I don't know how to do. so it doesn't affect the other buildings that use the same blocks
2.- The stairs aren't from the Tileset 1 (New bark town and probably other cities), but from Tileset 9 (A tileset used for caves)

Miksy helped me with this, but even so I can't manage to do this for several reasons, also, I found a problem with Miksy's help, and it's that he suggested me to replace a tile, but I don't think there's any tile I could replace without screwing up other maps that use the same tile.

Until now, all I know/got is this:

-Each tile is composed by 10 (16 in decimals) bytes
-I also know the structure of the tileset header, if it matters
-Tile data (or however it's called) for New Bark Town (crystal) starts in $19906 OR $19908 (I had problems with both, but it's either one of them, or close to them. According to Miksy it's $19908). I can see this quite clearly in TLP
-Tile data for Cave Tileset (Crystal) starts in $1EA8C, $1EA8E or close. It seems like a mess in TLP
-The tiles I want to use from the cave tileset are 36 and 37 (left and right part of the stairs"). They SHOULD be located in 1EDDC/1EDEC/close (or 1EDDE/1EDEE/close) and 1EDEC/1EDFC/close (or 1EDEE/1EDFE/close)

Here is a comparison on how I see things in the New bark town tileset and in the cave tileset

82852852852.png

I don't know if it matters, but it worries me a bit.

If you want, I can explain how I did ended in $1EA8C...

Until now all I tried was:

-I tried to find the offset were the block 36 and 37 in Cave tileset.
-Once I thought I got them, I replaced the tile 2 from Tileset 1 (new bark) with the 10 bytes from what I thought was block 36. The tile got screwed and it affected every building that used tile 2, regardless of Tileset.

Last edited by Riverside (2011-01-11 00:58:40)

Offline

#13 2011-01-11 01:13:26

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 422/3,474

Re: Noob trying to hack Crystal (Help)

Well in Newbark town, there are unused tiles you could copy the stair tiles over without messing anything up. They are the sloped corner roof like tiles next to the "GYM" tiles. You can copy the 2 tiles for stairs over these (or draw them in, stairs arent that complicated to look at and redraw, I've done it myself a time or two). That will get them in the tileset so you can make a new block.

Then you just find an unused block and edit it to look like the side of Elm's lab, but with the stairs. A quick look shows that block &h33 is not used, and can be replaced for your new block.

Offline

#14 2011-01-11 01:25:02

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 423/3,474

Re: Noob trying to hack Crystal (Help)

Also no need to be worried on the cave tileset, not all tilesets are able to be edited directly in TLP. Some tilesets (like Newbark) are not compressed, and can be edited as you see. Others like the cave tileset are compressed, and therefor have to be decompressed to edit. Whether or not a tileset is compressed is determined by the first couple of bytes before the actual image data. You see how there is a little line of grabage pixels before the tiles start, and again in between some of the rows? those are actually small headers telling the game how many tiles to load, and that they are not compressed.

Offline

#15 2011-01-11 07:24:29

Cloud
Member
Registered: 2010-12-18
Post 44/285

Re: Noob trying to hack Crystal (Help)

so, you must decompress them using Agixp? right?

Offline

#16 2011-01-11 17:18:05

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 424/3,474

Re: Noob trying to hack Crystal (Help)

That would be the way, but I'm not sure if Agixp works for Crystal. Also, you could save the pic from the "tile viewer" or whatever in the emulator, change the pallet to match somethign exported from TLP, then copy one of the decompressed tilesets, paste the tiles over the old ones, and change the tileset header to point to your new tileset. It sounds complicated, but I do it all the time and can tell you that after you do it once, it becomes easier and easier and now I can do it without thinking. I can walk you through it in more detail if you want to try that.

Offline

#17 2011-01-12 04:31:30

Luigi-San
Member
Registered: 2010-10-16
Post 27/128

Re: Noob trying to hack Crystal (Help)

Cloud96 wrote:

so, you must decompress them using Agixp? right?

You can use this to decompress the graphics. I don't think it works with Crystal, though.

Offline

#18 2011-01-12 09:22:44

Tauwasser
Member
Registered: 2010-10-16
Post 75/448

Re: Noob trying to hack Crystal (Help)

Graphics compression did not change between Gold/Silver and Crystal, so all tools will work. Tools that rely on some pointer table being at a specific offset will most-likely not work in auto-repoint mode.

cYa,

Tauwasser

Offline

#19 2011-01-12 15:35:07

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 425/3,474

Re: Noob trying to hack Crystal (Help)

I seem to remember Agixp crashing when I attempted to load Crystal

Offline

#20 2011-01-12 23:32:30

Cloud
Member
Registered: 2010-12-18
Post 45/285

Re: Noob trying to hack Crystal (Help)

I change my hack base rom to gold now because hacking crystal is a pain for me. Crystal map  won't load the people and sign event in violet city properly.

My advice is: Hacking crystal is hard to do for a noob because information and tutorial are slim about it. But if you really want to hack crystal , I believe all member here will help you as they can and you must believe in yourself and your heart that you can do it. Shine will come once you believe in your heart. Good luck with your hack,man ;-)

Last edited by Cloud (2011-01-12 23:41:22)

Offline

#21 2011-01-13 00:59:35

Riverside
Member
Registered: 2010-12-12
Post 5/55

Re: Noob trying to hack Crystal (Help)

Cloud96 wrote:

My advice is: Hacking crystal is hard to do for a noob because information and tutorial are slim about it. But if you really want to hack crystal , I believe all member here will help you as they can and you must believe in yourself and your heart that you can do it. Shine will come once you believe in your heart. Good luck with your hack,man ;-)

Ha, thanks

Yeah, Miksy also suggested me to change to Gold, but being sincere, I'll do all I can to hack Crystal and only Crystal. (I could use Gold as a help to figure things out, im not that extreme)

Mateo wrote:

Well in Newbark town, there are unused tiles you could copy the stair tiles over without messing anything up. They are the sloped corner roof like tiles next to the "GYM" tiles. You can copy the 2 tiles for stairs over these (or draw them in, stairs arent that complicated to look at and redraw, I've done it myself a time or two). That will get them in the tileset so you can make a new block.

Then you just find an unused block and edit it to look like the side of Elm's lab, but with the stairs. A quick look shows that block &h33 is not used, and can be replaced for your new block.

Mateo wrote:

Also no need to be worried on the cave tileset, not all tilesets are able to be edited directly in TLP. Some tilesets (like Newbark) are not compressed, and can be edited as you see. Others like the cave tileset are compressed, and therefor have to be decompressed to edit. Whether or not a tileset is compressed is determined by the first couple of bytes before the actual image data. You see how there is a little line of grabage pixels before the tiles start, and again in between some of the rows? those are actually small headers telling the game how many tiles to load, and that they are not compressed.

Thanks, it worked perfectly, I got my 2-floors Elm's Lab!

elmls.jpg

In the end it was way easier to just design the stairs via TLP, thanks for the tip.

Now I want to edit the collision data but I dont know how. I know the form of the block is currently 07070707 (it's a wall, you can't walk over it) and the form it should have it's 07710700 (Top right corner is a door and you can walk over the bottom right corner) but what I do with this? I mean, how do I find the collision data for that block (block 33)

Offline

#22 2011-01-13 02:47:13

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 426/3,474

Re: Noob trying to hack Crystal (Help)

The pointer for it will be in the tileset header, its the same format as gold's tileset headers. Do a search for the tileset graphics pointer and that should get you to the tileset header.

Offline

#23 2011-01-13 19:51:01

Riverside
Member
Registered: 2010-12-12
Post 6/55

Re: Noob trying to hack Crystal (Help)

Mateo wrote:

The pointer for it will be in the tileset header, its the same format as gold's tileset headers. Do a search for the tileset graphics pointer and that should get you to the tileset header.

OK, I understand.

Now comes the  hard part... urgh...

I want to "create" a house of 2 floors based on the players's house... the problem? I dont know how.

I guess I could use the same trick that I used with the stairs and all, but if I replace an existing tile/block it will get replaced for every map that uses the same tiles I guess (I replaced block 33 in Tileset 1 and it also got replaced in Tileset 37 (ecruteak), 35 (violet) and probably in more (in some other cities like goldenrod or azaleo, block 33 didnt got replaced though)

My fear is that if I replace the tiles and blocks in an unused map, the tiles and blocks will get replaced also in other maps, and I dont think there's enough unused blocks to build all I need to create the house of 2 floors. I don't need 2 maps to build the house, I just need a map big enough to create 2 separated rooms on it, like "Beta NBT" in CrystalMap

TL;DR: There's any way to know what maps willl be affected if I change the tiles/blocks?

Offline

#24 2011-01-13 20:21:22

Tauwasser
Member
Registered: 2010-10-16
Post 76/448

Re: Noob trying to hack Crystal (Help)

Riverside wrote:

I dont think there's enough unused blocks to build all I need to create the house of 2 floors.

So you're saying the regular blocks aren't good enough for your second story? Then you'll have to repoint and expand the blockdata to fit everything in ;)

Riverside wrote:

TL;DR: There's any way to know what maps willl be affected if I change the tiles/blocks?

You don't change tiles or blocks per map, but per tileset, so it's somewhat trivial to find out what maps will be affected: All maps sharing the tileset you're changing will be affected, whether the block is used on the map or not.

cYa,

Tauwasser

Offline

#25 2011-01-14 16:23:39

Riverside
Member
Registered: 2010-12-12
Post 8/55

Re: Noob trying to hack Crystal (Help)

Tauwasser wrote:
Riverside wrote:

I dont think there's enough unused blocks to build all I need to create the house of 2 floors.

So you're saying the regular blocks aren't good enough for your second story? Then you'll have to repoint and expand the blockdata to fit everything in ;)

Well, what I was trying to say was that I dont think there was enough unused blocks (like the block 33 from newbark) and that I didnt wanted to modify regular blocks if possible because that could affect the other maps.

In any case, I know what a pointer is, but I still don't know how to use them so I couldnt repoint anything at the moment. For now I'll try and see if I can use the regular blocks without affecting any non-beta map.

----------------------------------------------------------------------------

EDIT: I got another problem.

To find the Tileset header, what I was doing until now was finding the Block Data Pointer (3 bytes) and once I got the Block Data Pointer, going back 3 bytes so I could find the Graphic Pointer (3 bytes). This has worked so far with the Cave Tileset, New bark town Tileset and Azalea town Tileset that I used as test, but now I'm trying to do this with the "unused cities tileset" and it isn't working :S

To find the Block Data pointer what I've been doing so far was this:

-Check out the Block 01 of the map with Crystalmap (Offset 32A00 for Unused cities), then go back 16 bytes (because each block consist in 4x4 bytes) to "Block 00" and once there, find a 3-bytes pointer. Once I find the 3 bytes pointer, go back 3 bytes and follow that 3 bytes pointer (graphics pointer)

Now, just to test this works, here's an example of this for Tileset 45 (Blackthorn)

Block 1 = Offset 19C1E
Block 0 = Offset 19C0E
3-bytes pointer to Block 0 (Block data pointer) = Hex 06 0E 5C
Graphic pointer = Hex 06 06 50
Where the graphic pointer leads us = Offset 19006

If we open with TLP pro the offset 19006, we can see it contains the tiles of the map.

But this doesn't work with the tiles for unused cities. I'll try with "Beta NBT" from Crystalmap

Block 1 = Offset 32A00
Block 0 = Offset 329F0
3-bytes pointer to Block 0 (Block data pointer) = Hex 0C F0 69

And that's all, I can't do anything else since that Hex doesn't even exist. I tried also using the Block 1 and it doesnt work aswell.

I'm guessing it has to do with the fact that those maps aren't used, so they don't have to point anywhere, but I'm not sure if that's how this works and I'm correct... also, I can't try any other way to reach where the tiles are stored since that's the only way I know.

Last edited by Riverside (2011-01-14 16:25:24)

Offline

Board footer

Powered by FluxBB