Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#76 2011-01-30 18:07:56

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

Re: Noob trying to hack Crystal (Help)

EDIT: Ah I think I got it, it was a mistake I made >_< I replaced the "lenght of data" from the first sprite (male hiro) by accident >____<

Sorry

Last edited by Riverside (2011-01-30 20:37:49)

Offline

#77 2011-02-01 00:49:11

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

Re: Noob trying to hack Crystal (Help)

Tauwasser wrote:

You need to put your graphics into the ROM and calculate a 3byte pointer to the offset where you put it. Then determine image type and data length and standard palette and put it into a new entry in the list. Then put it on some map and you're done.

cYa,

Tauwasser

Ok... let's see what I did wrong...

So I created my sprites using TLP, then I found the 3 byte pointer for each sprite (the girl and marill) wich are 2F 007C for the girl and 2F 807D for the marill.

Now, the sprite definition structure is this

[2byte pointer to Graphics] [length of the data] [Rombank graphics] [Image type] [standard-pallette]

For the girl it would be

[007C] [XX] [2F] [YY] [ZZ]

XX = I'm pretty sure is C0
YY = I'm pretty sure is 01 (motion sprite)
ZZ = Since I want her to use the same color pallette as the male hiro, and the male hiro uses "00", I guess this would be 00

It would end up being

[007C] [C0] [2F] [01] [00]

I placed both the first sprite definition for the girl and the marill after the sprite definition for the last sprite in crystal (eusine's) so I don't see anything wrong here...

Then I created another people event in New bark town, the structure for peoples events is

[Picture][Y from top+4][X from left+4][0-4 for regular, 6-9 for static facing][Movement][Clock-/Time setting (2byte)][Color|Function][Range of sight for trainers][2byte pointer to script][Bit no. of BitTable1 (Hidden if set)(FFFF for none)(2byte)]

so besides all the stuff, the "picture" byte is the one that goes first. For Male hiro it would be 01, for Eusine it would be 66 and since I added the girl and the marill's sprite definition AFTER eusine's I'm guessing the girl would be 67 and the marill 68, right?

So what should I do? the sprite doesn't load. Instead of loading the sprite I want, it loads the sprite of Hiro (if you chose male, it loads the male sprite, if you chose female, it loads the female sprite)

I got this problem with many sprites actually. I've tried for example with Falkner's or Oak's sprites and they don't load (it loads hiro) but both Oak and Falkner sprites (Oak in Mr. Pkmn house's and Falkner in his gym) load fine. But for example if I try to load the Rival's sprite, it loads fine. Same with the sprite for old men or suicune (raikou, entei and eusine dont load though)

Any idea about what's going on?

Last edited by Riverside (2011-02-01 00:51:04)

Offline

#78 2011-02-01 07:55:50

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

Re: Noob trying to hack Crystal (Help)

Riverside wrote:

So what should I do? the sprite doesn't load. Instead of loading the sprite I want, it loads the sprite of Hiro (if you chose male, it loads the male sprite, if you chose female, it loads the female sprite)

I got this problem with many sprites actually. I've tried for example with Falkner's or Oak's sprites and they don't load (it loads hiro) but both Oak and Falkner sprites (Oak in Mr. Pkmn house's and Falkner in his gym) load fine. But for example if I try to load the Rival's sprite, it loads fine. Same with the sprite for old men or suicune (raikou, entei and eusine dont load though)

Any idea about what's going on?

That's why I said you should use an in-door map to test. Out-door maps like new bark town (maps with tilesets 0x01 or 0x02) use pre-defined sets of allowed sprites, something I dubbed sprite sets.

Try placing the even inside Hero's downstairs house, for instance.

cYa,

Tauwasser

Offline

#79 2011-02-01 15:04:03

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

Re: Noob trying to hack Crystal (Help)

Oh, thanks.

It does work :) but the sprite sets can't be changed for out-door maps? because if that's so it kinda sucks. I have a plan B if the sprite sets can't be changed, but I would like to know.

Offline

#80 2011-02-01 16:30:43

tekcoR
Member
From: Celadon City
Registered: 2010-10-16
Post 32/165

Re: Noob trying to hack Crystal (Help)

Riverside wrote:

Oh, thanks.

It does work :) but the sprite sets can't be changed for out-door maps? because if that's so it kinda sucks. I have a plan B if the sprite sets can't be changed, but I would like to know.

Of course they can be changed. Look at "Spritesheets". It's a bit tricky but doable.


Cya

Offline

#81 2011-02-01 18:43:08

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

Re: Noob trying to hack Crystal (Help)

EDIT: Disregard this post, I solved this... but it's weird. I was using CrystalMap (I modified events.ini to match the values on my hack) to change and test the sprites faster, but it didn't worked and when I tried it by using hex it worked fine. It seems that for some reason CrystalMap was not modifying the sprites.

On another note, it seems like in Pokemon Crystal, New bark town has 25 sprites programed to load compared to the mere 13 that GS have. Weird. This may be useful if someone else wants to hack Crystal or if someone wants to make a ROM map or something

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

tekcoR wrote:
Riverside wrote:

Oh, thanks.

It does work :) but the sprite sets can't be changed for out-door maps? because if that's so it kinda sucks. I have a plan B if the sprite sets can't be changed, but I would like to know.

Of course they can be changed. Look at "Spritesheets". It's a bit tricky but doable.

Hmm... I don't get it...

I found that the Spritesheet for New bark town is apparently on Offset 145F5 in Pokemon Crystal, because when I replace the bytes there for 00s, the sprites get deleted.

However, if I replace for example the byte 3A (the fat guy sprite) for 3B (the fisherman sprite) and then I go to the people event for the fat guy and replace the sprite number from 3A to 3B, the fat guy still doesn't show the fisherman sprite, instead, it shows hiro's sprite like when I replace the bytes for 00 or when I use a sprite that isn't included in the outdoor map...

It seems like the Spritesheep for Cherrygrove begins in 1460E in Crystal, so I also replaced it there to test it out, but it doesn't work either. (Since there's no routegate between NBT and cherrygrove I placed it in both)

Last edited by Riverside (2011-02-01 19:00:35)

Offline

#82 2011-02-02 00:00:09

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

Re: Noob trying to hack Crystal (Help)

Ok, it's not solved at all...

The girl sprite loads fine, it's perfect, but the Marill sprite...

I don't know why. I double checked it and I still don't get why...

Well, the thing it's that the Marill overworld sprite uses 4 blocks instead of 1 block (like the snorlax in vermillion) the Graphic loads fine, but the collision data or whatever the sprite has it's the one for big sprites (like snorlax as I said, or like the lapras doll). Also, the color pallette that the marill sprite uses it's green regardless of what I do to the sprite definition...

And last but not least, when you talk to the marill the sprite loads fine until you talk above him. when you talk above him the sprite dissapears when the text box is loaded, then marill re appears when the text box is gone. It doesn't matter that much since I don't plan on loading a text box with the marill.

I seriously don't know what's wrong since the sprite definition has the right pointer and uses the same length of the data, bank, Image type and pallette standard as the girl.

Anyways, it's not THAT important since marill will only appear once, and it will be just running away and that's all.

I don't know if anyone noticed but I'm trying to re-create the Lyra & Marill event from HG SS... now, to do that I need to use scripts right?

The question is which scripts makes the things I want to make? for example, which one makes it so once I leave Hiro's house, marill comes walking, then the girls comes out from the stairs and then they walk away?

Offline

#83 2011-02-02 00:31:24

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

Re: Noob trying to hack Crystal (Help)

Riverside wrote:

The question is which scripts makes the things I
want to make? for example, which one makes it
so once I leave Hiro's house, marill comes
walking

You can use trigger event.

Riverside wrote:

then the girls comes out from the stairs
and then they walk away?

Sorry, I don't know. It's confusing.

Offline

#84 2011-02-02 01:52:04

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

Re: Noob trying to hack Crystal (Help)

You would use a trigger for her walking as well. Make it show her event, move it around, show text, move it around and hide it. The event of her herslef would just be an object event that does nothing.

Offline

#85 2011-02-02 17:18:12

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

Re: Noob trying to hack Crystal (Help)

Cloud96 wrote:
Riverside wrote:

then the girls comes out from the stairs
and then they walk away?

Sorry, I don't know. It's confusing.

Oh, it's because I added some stairs in Elm's lab

ssssskn.png

The red line is the girl and the green one is the marill

The event goes like this: Marill appears, follows the green line pattern in the pic, faces Hiro and cries (marill's cry) OR jumps when facing Hiro, then the girl appears from those stairs and follows the red line pattern, faces Marill and then Marill faces her and then dissapears (he goes inside his pokeball) and the girl then walks away. If possible, make it so when the girl appears custom music plays (like when you encounter eusine or clair)

Now, I have never done a script, so this is my first time doing this and I would like to see if this is how scripts works: This is for the girl event (after marill appears)

Trigger event form is [Number][Y position][X position][00][Script pointer (2byte)][00][00]

Number = I don't know :S
y, X positon = Thats easy. 06 0D.
Script pointer = The pointer to the whole script.

And the script would be like:

68 67 XXXX

68 = moving code [68][Person][2byte pointer to moving data]
67 = it says [person]. Im guessing it's the sprite? or it is the People event?
XXXX = The pointer to this other script

0C 0C 0C 0C 0C 03 46 05 02 0E 0E 49

0C = one step down, so I need 5 of those I guess
03 = turn head right
46 = wait for time
05 = the seconds she's waiting (she sees marill, then she waits a couple of seconds so marill face her and then marill dissapears)
02= turn head left
0E = one step left, 2 of them
49 = hide person

Is this how it works? I haven't done the music code because I don't find it.

Offline

#86 2011-02-04 17:42:00

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

Re: Noob trying to hack Crystal (Help)

Oh, I tried to script but the game always crashed before doing anything.

Then I tried to look to scripts that are similar to the one I want to do (for example, when you encounter eusine in Ecruteak's pokemon center, your rival in cherrygrove or when the girl in new bark town stops you if you dont have a pokemon)

I "discovered" (probably you guys knew this already) that the "object event" pointer for Crystal is EF26 compared to 2812 from GS

Anyways, since Eusine and Rival use object event in their pointers, I don't know how to follow them so I can see their script.

When I looked to the script in the girl from new bark who annoys you I saw that she doens't use Object event (I don't know what object event means anyways) so I have been able to follow her 2byte pointer. Then, I compared both the GS script and the Crystal script and found this

Gold: (probably Silver too)

7E 4E 00 75 02 02 47 4C 3E 41 53 49 75 00 03 68 02 DE 40 47 4C 48 41 53 49 6F 02 00 68 02 EA 40 70 47 4C 68 41 53 49 0F 3C 00 90

Crystal:

7E 4E 00 76 02 02 47 4C 34 41 54 49 76 00 03 69 02 D4 40 47 4C 3E 41 54 49 70 02 00 69 02 E0 40 71 47 4C 5E 41 54 49 0F 3D 00 91

(I've ignored the different bytes used for pointing because there's no point marking them)

As I said before, I never scripted (I only did that small text box script, but it was too simple to consider it a script to me) and I did this to see how a real script looks and how they are armed and I have some questions.

1.- Why there's so many codes from Crystal that are "off by one" compared to GS? I know the "Crystal scripting information" thread mentions something similar to this, but it doesn't mention it more in-depth, like what codes are "off by one" or how to identify them. As far as I see it seems kind of random (GS 75 -> Crystal 76, but GS 7E = Crystal 7E)

2.- What does the [Person] byte means? or how do I determine it's value? I 've seen it a lot. For example, in this script it was used twice

[75][Person][Facing]

75 02 02

75 00 03

[68][Person][2byte pointer to moving data]

68 02 DE 40

68 41 53 49

[6F][Person2][Person1]

6F 02 00

3.- Well, another difference between Crystal and GS and that I haven't seen in the Crystal scripting thread is that it seems like the 0F codes are "one off" too.

(GS) 0F 3C 00 -> (Crystal) 0F 3D 00 (both end music and returns to the normal map music)

I think that's all. Other than those differences between GS and Crystal, I think everything about scripting it's clear to me (for now at least) besides the [person] byte which seems important to make all this work. I really don't know anything about this byte since, for example, I can guess that Hiro may be 00 and the annoying girl may be 02, but in one script it uses the [person] value 41 and that throw me off.

Anyways, I hope you can help me figure some things out. Specially the person byte since the other are a little easier to figure out. (if something don't work, just add one more byte :P)

Last edited by Riverside (2011-02-04 17:45:13)

Offline

#87 2011-02-04 21:14:10

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

Re: Noob trying to hack Crystal (Help)

Each person in people data has its own person byte number.
I think the player in each map has 01 and the people in the map follow it.

Actually, I don't think it's actually defined by any byte but instead the event data of the first person in the people event data is the first (possibly 02) and the second person in people event data 03 etc.

Last edited by Miksy91 (2011-02-04 21:15:57)

Offline

#88 2011-02-05 08:45:51

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

Re: Noob trying to hack Crystal (Help)

Riverside wrote:

I "discovered" (probably you guys knew this already) that the "object event" pointer for Crystal is EF26 compared to 2812 from GS

Anyways, since Eusine and Rival use object event in their pointers, I don't know how to follow them so I can see their script.

Well, you already found their script! They are "Object Events", which means that these objects are used in some kind of other even where they need to be presented, moved etc. That's how the programmers used it anyway. The other two aren't used anywhere, so it's not clear what a "BG Event" or "Coordinates Event" would be (as opposed to "Object Event", which does alter coordinates of persons, too).

The script you're looking for is either a trigger script or within another person's script, since naturally, these events cannot be talked to (so you cannot execute their script anyhow). The object event script is only useful while debugging. You hit it and you know that that person wasn't supposed to be there, yet it doesn't crash the game.

Riverside wrote:

1.- Why there's so many codes from Crystal that are "off by one" compared to GS? I know the "Crystal scripting information" thread mentions something similar to this, but it doesn't mention it more in-depth, like what codes are "off by one" or how to identify them. As far as I see it seems kind of random (GS 75 -> Crystal 76, but GS 7E = Crystal 7E)

It seems new codes were added in-between other codes and some were deleted/altered. So far, I only checked out which codes were inserted. There is one instance for 0x52, the 3byte-version of 0x51. It seems they redid the text engine a bit and deleted the in-text code that would access text from another bank. A real shame, since this far less useful than an in-text code :( Another instance is 0x9F, which is squeezed in there. It's for item-giving with some variable for the number of items instead of the actual number. However, there is a deletion somewhere in the 70's and insertion somewhere in the 80' or 90' again. This may possibly also just be a re-ordering.

Riverside wrote:

2.- What does the [Person] byte means? or how do I determine it's value? I 've seen it a lot. For example, in this script it was used twice

The person byte refers to the data as it is laid out in RAM.
The RAM layout will put Hero in there, an empty spot and then the rest of the map's actual event data.

  • Hero

  • emty spot

  • map event #0

  • map event #1

  • ...

  • map event #D

Since this list is zero-based, Hero is 0x00, the empty spot would be 0x01 (there is code in there that suggests this would be the spot for a Pokémon following the hero), map event #0 would be 0x02 and so on. Map event #D would be 0x0F. The're a limit of 0x10 events in there, that's why I mentioned the last event. Also, keep in mind that there is a max on the actual people events on-screen, which is 0x0D including hero. You have to count big Poképuppets as 0x04 events for this to work.

Riverside wrote:

one script it uses the [person] value 41 and that throw me off.

You probably parsed this script wrong. Possible values for it are 0x00 thru 0x0F and that is all.

Riverside wrote:

3.- Well, another difference between Crystal and GS and that I haven't seen in the Crystal scripting thread is that it seems like the 0F codes are "one off" too.

It may seem like that, but it gets really fuzzy towards the end of the list as far as I have noticed. So I wouldn't count too much on this.

cYa,

Tauwasser

Last edited by Tauwasser (2011-02-05 09:10:11)

Offline

#89 2011-02-07 01:21:28

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

Re: Noob trying to hack Crystal (Help)

Ok, I got it, thanks.

I also commited one or two mistakes while writting the bytes (for example, in Gold the code is 7E while in Crystal it's 7F, "off by one")

I would modify it but i'm tired now. One quick question

[[Number1 of pointers] Number1 * [2byte pointer to script][00][00]][[Number2 of pointers] Number2 * [Number][2byte pointer to script]]

Once I finish my script I'll have to repoint the script header, add one more to the number1 of pointers and one more 2bte pointer to script?

Offline

#90 2011-02-07 15:37:26

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

Re: Noob trying to hack Crystal (Help)

You would usually use a trigger script, so you just need to add one pointer for the first part, if none are there. If there is already one, check out if you can combine your script into its script.

cYa,

Tauwasser

Offline

#91 2011-02-09 05:42:44

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

Re: Noob trying to hack Crystal (Help)

Tauwasser wrote:

You would usually use a trigger script, so you just need to add one pointer for the first part, if none are there. If there is already one, check out if you can combine your script into its script.

cYa,

Tauwasser

I don't understand it all (I think I got an idea though), but I haven't looked any script header in long time, so I guess it's natural. (how could I add something without repointing?)

Anyways, what porpuse it would serve?

Anyways, I finished my script :D It works perfectly. If anyone wants to look at it, I uploaded it on youtube: http://www.youtube.com/watch?v=3Z2JgHKyVfI

I got one questions... when I was scripting, everything was fine until I tried to add text. Once I added text the script won't read any other code. For example, if I used 52 [3byte pointer to text] (crystal) and then I added 69 06 [2byte pointer to moving data) the trigger event won't read the code 69. It would stop at 52. If I remove the code 52 then it would go back to normal and read everything fine. Any idea on why?

Well, thanks a lot guys. Now I got a couple of things left to do in New bark and I can finally move on to the next cities. I would like to insert Lyra's theme using GSC intruments into the game, but it seems hard and I will have to learn at least the basics about music to do so, so I guess I'll leave it in "stand by" for now.

Last edited by Riverside (2011-02-09 05:45:35)

Offline

#92 2011-02-09 07:29:38

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

Re: Noob trying to hack Crystal (Help)

Riverside wrote:

how could I add something without repointing?

You would have to repoint the script but not necessarily have to add a pointer, if you can incorporate the original script into yours.

Riverside wrote:

I got one questions... when I was scripting, everything was fine until I tried to add text. Once I added text the script won't read any other code. For example, if I used 52 [3byte pointer to text] (crystal) and then I added 69 06 [2byte pointer to moving data) the trigger event won't read the code 69. It would stop at 52. If I remove the code 52 then it would go back to normal and read everything fine. Any idea on why?

It's because it's one of the script codes that end a script. It's made for conservation of space, so every regular event can get this text script and only use 3 bytes instead of the [47][4C][XXXX][53][49][90] combo that would take up a lot more space.

I'm glad you got it working ;)

cYa,

Tauwasser

Offline

#93 2011-02-10 00:11:59

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

Re: Noob trying to hack Crystal (Help)

Funny that they wanted to save space when there's a lot of free space in the end >_>

Anyways, I got a little problem with my script. I want to make it so it works only once.

I tried the code 14 (activate-de activate trigger events) but I dont know how to make it work. Currently New bark has 3 trigger events (1st and 2nd one are the chick that makes sure you dont leave until you get a pokemon, 3rd one is mine)

Anyways, as I said I tried to make it so it works only once, but I dont know how to use the code 14 properly. When I use 14 00 no trigger event is disabled (so the chick always stops you from leaving until you get a Pokemon, which it's good, but my event also works evertime, which it's bad) and when I try 14 XX (any value. I tried 01, 02, 03 and even FF just to see what happens) my event only works once (which it's good) but the event from the chick that stops you dont work :S not even once.

I dont understand why using that code in my script (just one of the three) disables all of them :S

EDIT: Oh, I always forget this question.

What is RAM? :S

Last edited by Riverside (2011-02-10 00:23:18)

Offline

#94 2011-02-10 16:08:24

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

Re: Noob trying to hack Crystal (Help)

EDIT: Ok I got this. I made it so the trigger event it's loaded only once, although it was hard to figure it out, at least for me but oh well, I learned a couple of this about the Trigger Events' structure and how the code 14 works. God bless Code 09: RAM Check, BitTable check 1 and Return Code2.

I still don't know what is a flag

Also, in Ram check (code 09) it says "09: When [RAM]<>0"... what does this means? I know what RAM is now, but I still don't get it at all. I dont get what's the difference between that code and the other similar ones (05, 07, etc. Although I didnt tested them)

All I did was use the code as it was used in another person's script (first code 31 then code 09)

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

Cloud96 wrote:

The trigger is affected by a flags. And about RAM, try to search for a thread IImarckus made somewhere here. miksy has asked about RAM in that thread. RAM works just like Gameshark but more useful and i think you can control everythings in the game.

Flags? what are those? :S

Thanks for the explanation about RAM.

Anyways, I still don't understand what should I do with the script header and why :S

{[02 0D 40 00 00 0E 40 00 00] [01 05 0F 40]}

What's between {} is the whole script header. the first part between [] is the first part of the header, the second part between [] is the second part.

I have to take all of this, place it somewhere else. then change the 02 (the first byte) to 03 and add a pointer to my script after 0E 40 00 00 and then change the 2byte pointer to script header in the secondary map header? and what's the point of that if my script is working already?

another thing I dont understand it's that after the script header, this is what's next:

91 91 36 41 00 32 76 00 90

0E 40 points to the first 91 (return code 2 in crystal) and 0E 40 it's pointing to the second 91. Bassicaly, they are not pointing to a script, but just to a code that ends a script. They're pointing to nothing :S I thought it was going to point to the trigger event 1 and 2 from newbark :S (the girl that dont let you leave until you get a pokemon)

Then the pointer in the 2nd part of the script header points to 36 41 00 32 76 00 90 which reads to BitTable2 set,  BitTable1 reset and Return code1. I've used Bittable set (dont remember if 1 or 2) before so I know how it works, but sadly the bit numbers those 2 are using aren't on the list the compendium gives so I dont know what is the 2nd part of the script header doing in this case.

Anyways, I'll keep looking for ways to disable my trigger event without disabling the other ones.

Last edited by Riverside (2011-02-11 02:45:20)

Offline

#95 2011-02-10 16:41:52

Torchickens
Member
Registered: 2011-01-02
Post 4/46

Re: Noob trying to hack Crystal (Help)

Cloud96 wrote:

The trigger is affected by a flags. And about RAM, try to search for a thread IImarckus made somewhere here. miksy has asked about RAM in that thread. RAM works just like Gameshark but more useful and i think you can control everythings in the game.

Not strictly everything. All the 'typical' Gameshark code does is constantly write a given value to an 8-bit RAM address (though the Gameshark code presents the RAM address in little endian format).

E.G the Gameshark code 010144D0 writes 0x01 to RAM address 0xD044. The different controlling variables can range from 00 to FF, be simple ON/OFF switches (00,01+), can be binary switches (2^1 [02], 2^2 [04], 2^3 [08]...), etc. depending on what the address is actually controlling.

IIMarckus wrote:

The Game Boy has 64 KiB of RAM, which you can view in VBA under Tools → Memory Map. It's split up into several sections: one that has the first bank of ROM (at RAM locations 0–0x3FFF), one that can contain any bank of ROM (stored at RAM locations 0x4000–0x7FFF—this is why pointers are always between 0x4000 and 0x7FFF), graphics, save RAM, and "work RAM"—just scratch paper for the game to write to when it needs it. This list of addresses consists of just WRAM, which is from 0xC000–0xDFFF.

Try it—look at 0xD5B7+ in the memory viewer, and compare it to your actual bag. They match, and changing the bytes in memory will change what's in your bag. Having a reference for RAM addresses is useful for easily testing things. (How do I test my new effect for Thunderbolt? Replace my Cyndaquil's Smokescreen with it and go into a battle. How do I make sure my new event works in Olivine City? Use the map warp Gameshark code. And so on.)

It also makes things easier when ASM hacking, because all ASM really does is write to different parts of memory. If you know what the addresses represent, you know what the ASM routine does.

Offline

#96 2011-02-11 17:40:36

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

Re: Noob trying to hack Crystal (Help)

Riverside wrote:

Funny that they wanted to save space when there's a lot of free space in the end >_>

Most of the old games, at least the ones I've tried to hack, use ways for saving space (for example in G/S/C:
scripting, 2-byte pointers). The idea for doing so is just the fact, the game makers don't know at first, how much data they have to write in the rom ? When they were done with the game, they noticed that they didn't need all banks to make the game and that's why you can find blank space in there.

Riverside wrote:

What is RAM? :S

I made this thread in pokecommunity (yes, I'm still hanging around in there).
http://www.pokecommunity.com/showthread.php?t=241961

That should help a little bit.
After reading it, you should be able to learn the rest yourself :D


P.S
I've seen that you can make a lot of interesting scripts with the RAM codes.
For example, you can make it so you can modify the palette of the hiro (just like KBM did in prism) and "reborn" your pokemon (I'm going to use this one with DF) ;)

Last edited by Miksy91 (2011-02-11 17:53:43)

Offline

#97 2011-02-12 15:15:52

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

Re: Noob trying to hack Crystal (Help)

Well, RAM as I used it in the compendium is just another register name. You could pretty much think of it as a variable name, if you like. The others described what RAM as in physical RAM is. If you want to know more about that, you'll have to read Wikipedia to get a starting point.

The issue with your triggers is the following: The trigger events themselves are set to be active only on event 0x00 ("time" in the compendium). Since ids in RAM are reset at the start of the game, all maps that have such ids defined are starting with 0x00, which therefore means "entering the map for the first time". Even if you don't want to execute a script right after stepping onto the map (such as New Bark Town), you will still have to point to a script via the script header, or the game crashes. Since the trigger events are not permanent events, meaning they can be disabled, there will have to be another one of those entries for when the id is set to another entry in the script header list (or another "time" as in the compendium), therefore disabling 0x00. Therefore triggers and map entering scripts are mutually exclusive.

You will have to add another entry to the list. Therefore you would have valid ids 0x00 thru 0x02. I call them valid simply because they don't crash the game. Id 0x00 would be for you to insert your script. At the end of the script, activate id 0x01 (so the player cannot repeat the scene by reentering the map!). Set the trigger events to activate on 0x01 instead of 0x00. Change the trigger script to activate id 0x02 instead of 0x01. Put a simple 0x90 script for both 0x01 and 0x02 in the script header.

cYa,

Tauwasser

Offline

#98 2011-02-12 15:43:37

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

Re: Noob trying to hack Crystal (Help)

So, trigger events have nothing to do with flags? Then I had to delete my post because it will mislead others. Thanks to Tauwasser.

Last edited by Cloud (2011-02-12 15:59:06)

Offline

#99 2011-02-23 17:43:27

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

Re: Noob trying to hack Crystal (Help)

Well, thanks for the help. I solved the trigger events problem and I figured out what Tauwasser posted by myself due to trial and error.

Anyways, now I want to create a trainer, but I dont know how...

I tried looking the script of a common trainer (a bugcatcher that just looks at you, battles you and then nothing else) I found this as his script

GOLD:
38 05 24 01 5E 57 89 57 00 00 73 65 47 4C A2 57 53 49 90

CRYSTAL:
38 05 24 01 D8 59 03 5A 00 00 CA 66 47 4C 1C 5A 54 49 91

Being honest: I don't know what's going on here. I don't know how to group those bytes. I mean, I know 38 means "start battle code" or something like that, and it's form it's [38] and that's it. But other than that, I don't know how to read the other codes :S

What I want to do it's to make it so this trainer talks to you normally at first, when you get your Pokemon he talks to you and ask you to battle (you choose yes or no) and once the battle finish he gives you an item and dont battle him never again.

What I've done until now it's to make it so he talks to you normally until you get your first Pokemon. Now I need to make the script to make him battle you

Offline

#100 2011-02-23 20:07:02

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

Re: Noob trying to hack Crystal (Help)

You're probably looking at a Trainer Event. Trainer Event Script Pointers point to a pre-defined structure instead of an actual script. See the compendium's info on events.

cYa,

Tauwasser

Offline

Board footer

Powered by FluxBB