Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2012-02-18 00:20:34

ElectrikeInc
Member
Registered: 2012-02-14
Post 19/120

Mystery Gift

This is based on Mystery Gift from later games. Can someone please post a script or hex code to make a deliveryman give an Egg with a specific hatchling? Is it possible to make an egg hatch with specific IVs, moves and a level higher than 5? Also, I need it to end with a flag to prevent the same gift from being recieved multiple times, even at different Pokemart? Finally, I need a list of flags so you can get different events but not a bunch of the same one?


I haven't been on this site for a very long time. Sorry about that! >.<
I am probably not going to get very far in the ROM projects that I've started, at least until I get more experience hacking, so I apologize.

Offline

#2 2012-02-18 03:01:39

437/701

Re: Mystery Gift

ElectrikeInc wrote:

This is based on Mystery Gift from later games. Can someone please post a script or hex code to make a deliveryman give an Egg with a specific hatchling?

Where in the game is there a script like this? (Answer: when Elm’s aide gives you Togepi in Violet Pokémon Center.) Look at that script and see how it works.

ElectrikeInc wrote:

Is it possible to make an egg hatch with specific IVs, moves

Something similar is done in Crystal when the Old Man gives out the egg containing a random baby Pokémon, highly likely to be shiny, and knowing Dizzy Punch. Looking at how that’s implemented will be instructive.

ElectrikeInc wrote:

Also, I need it to end with a flag to prevent the same gift from being recieved multiple times, even at different Pokemart?

Correct.

#3 2012-02-18 03:11:59

ElectrikeInc
Member
Registered: 2012-02-14
Post 20/120

Re: Mystery Gift

Thank you. Do you know where in the hex code (what offset) Professor Elm's aide is? I am only beginning to learn about hex. Also, can I make the Egg guarenteed to hatch shiny instead of just giving special IVs? Next, will the hex code for Crystal still work in Gold, even though they are different games? Finally, where in Pokemon Crystal is the offset for the Odd Egg, so I can examine it?


I haven't been on this site for a very long time. Sorry about that! >.<
I am probably not going to get very far in the ROM projects that I've started, at least until I get more experience hacking, so I apologize.

Offline

#4 2012-02-18 05:10:42

439/701

Re: Mystery Gift

ElectrikeInc wrote:

Thank you. Do you know where in the hex code (what offset) Professor Elm's aide is?

I don’t, but it is trivial to find. Find the secondary map header for the Violet Pokémon Center, and it will contain a pointer to the scripts on that map. Here is the process:

  1. In an emulator, go to the map in question (Violet City), and look at memory locations $D044–D045 in BGB’s debugger or VBA’s memory viewer. These values are the map bank (I’ll call it ‘m’) and map ID (I’ll call it ‘n’).

  2. Find the mth two‐byte pointer from 0x940ED and follow it. This takes you to the first map header in the map bank.

  3. Add (n−1)×9 to your current offset. This takes you to the nth map header in the map bank.

  4. Tauwasser made a post in this thread that describes the format of the map header. Use that to find the scripts on the map.

ElectrikeInc wrote:

Also, can I make the Egg guarenteed to hatch shiny instead of just giving special IVs?

The only difference between a shiny Pokémon and a normal Pokémon (aside from how it looks in battle) is the IVs. So if you can control the IVs, you can control the shininess of the egg.

ElectrikeInc wrote:

Next, will the hex code for Crystal still work in Gold, even though they are different games?

Sometimes, but not always. Data formats are almost always identical, but sometimes the values themselves, or their offsets, differ.

ElectrikeInc wrote:

Finally, where in Pokemon Crystal is the offset for the Odd Egg, so I can examine it?

You would find it the same way as finding any script. See the answer to the first question.

Board footer

Powered by FluxBB