Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2011-08-29 02:00:48

zhengwei
Member
Registered: 2011-08-18
Post 24/140

how to check captured pokemon

In the pokemon gold version,how to check the pokemon whether or not is captrued(means that the pokemon is marked in pokedex)?
For example, there is a people event,hiro talks with him, if all the pokemon except No.151 MEW and No.251 celeibi(or except No.251 celeibi) is captured ,something will be happened

Last edited by zhengwei (2011-08-29 02:04:52)

Offline

#2 2011-08-29 06:12:42

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

Re: how to check captured pokemon

RAM check:
DC16 - Own Pokedex 145-152
DC23 - Own Pokedex 249-256

Offline

#3 2011-08-29 08:04:26

zhengwei
Member
Registered: 2011-08-18
Post 25/140

Re: how to check captured pokemon

Miksy91 wrote:

RAM check:
DC16 - Own Pokedex 145-152
DC23 - Own Pokedex 249-256


Could you explain it more detail?

Offline

#4 2011-08-29 08:27:44

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

Re: how to check captured pokemon

It's kinda difficult to be done if you're not familiar with RAM memory, how 8 bits form one single byte and scripting in overall...
I could tell you step-by-step what to do but that wouldn't teach you anything.

Do you actually happen to know some of that stuff already?
That would help a lot.

Offline

#5 2011-08-29 08:47:19

zhengwei
Member
Registered: 2011-08-18
Post 26/140

Re: how to check captured pokemon

Miksy91 wrote:

It's kinda difficult to be done if you're not familiar with RAM memory, how 8 bits form one single byte and scripting in overall...
I could tell you step-by-step what to do but that wouldn't teach you anything.

Do you actually happen to know some of that stuff already?
That would help a lot.


I read the GameBoy Dev ASM lesson, and read the Scripting Compendium. I knows the memory,but I still doesn't know the location of memory about my question.You write the location of memory,what's number after it?

Last edited by zhengwei (2011-08-29 11:05:40)

Offline

#6 2011-08-29 11:36:04

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

Re: how to check captured pokemon

Byte at DC16 in ram defines whether you own pokemon of numbers #145 to #152 in pokedex.
A byte consists of eight bits.
For example 0xFF is 11111111 in binary.
When pokemon number #145 is owned, the first and "smallest" of those eight bits is set.
If no other bit is set, then the number is 1 in binary and so 0x1 in hexadecimal.
If pokemon number #145 and #147 are owned, the first and third bit are set and the number is 101 in binary and so 0x5 in hexadecimal.

*That should answer your question, how to make the game check if pokemon #145 to #150 and #152 are obtained altough #151 is not.
The script has to be more tricky one though as it has to check that other pokemon have to be obtained as well.

Last edited by Miksy91 (2011-08-29 11:39:26)

Offline

#7 2011-08-29 12:47:06

275/701

Re: how to check captured pokemon

Miksy91 wrote:

*That should answer your question, how to make the game check if pokemon #145 to #150 and #152 are obtained altough #151 is not.
The script has to be more tricky one though as it has to check that other pokemon have to be obtained as well.

There are script commands to check how many Pokémon are in the Pokédex, too. So just check if there are 249 in the Pokédex, then check if Mew and Celebi are missing.

#8 2011-08-29 13:42:16

zhengwei
Member
Registered: 2011-08-18
Post 27/140

Re: how to check captured pokemon

Miksy91 wrote:

Byte at DC16 in ram defines whether you own pokemon of numbers #145 to #152 in pokedex.
A byte consists of eight bits.
For example 0xFF is 11111111 in binary.
When pokemon number #145 is owned, the first and "smallest" of those eight bits is set.
If no other bit is set, then the number is 1 in binary and so 0x1 in hexadecimal.
If pokemon number #145 and #147 are owned, the first and third bit are set and the number is 101 in binary and so 0x5 in hexadecimal.

*That should answer your question, how to make the game check if pokemon #145 to #150 and #152 are obtained altough #151 is not.
The script has to be more tricky one though as it has to check that other pokemon have to be obtained as well.

Thanks a lot,I will test it...

Offline

#9 2011-08-29 13:44:45

zhengwei
Member
Registered: 2011-08-18
Post 28/140

Re: how to check captured pokemon

IIMarckus wrote:
Miksy91 wrote:

*That should answer your question, how to make the game check if pokemon #145 to #150 and #152 are obtained altough #151 is not.
The script has to be more tricky one though as it has to check that other pokemon have to be obtained as well.

There are script commands to check how many Pokémon are in the Pokédex, too. So just check if there are 249 in the Pokédex, then check if Mew and Celebi are missing.


I can't find that script command,could you tell me?

Offline

#10 2011-08-29 14:47:01

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

Re: how to check captured pokemon

Happens to be 1C 05.

Offline

#11 2011-08-29 16:56:32

zhengwei
Member
Registered: 2011-08-18
Post 29/140

Re: how to check captured pokemon

Miksy91 wrote:

Happens to be 1C 05.

I tested your RAM address,it can't work.It sounds like work when pokemon is seen,not be captured.
Your RAM address may be wrong

Last edited by zhengwei (2011-08-29 16:57:40)

Offline

#12 2011-08-30 00:08:41

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

Re: how to check captured pokemon

The table at DBE4 is for captured Pokémon, table at DC04 is for seen Pokémon. You can get your desired offset by adding (PKMN№) / 8 bytes to the start of the table and checking bit (PKMN№) % 8. (one-based bit count)

cYa,

Tauwasser

Offline

#13 2011-08-30 03:13:40

zhengwei
Member
Registered: 2011-08-18
Post 30/140

Re: how to check captured pokemon

Tauwasser wrote:

The table at DBE4 is for captured Pokémon, table at DC04 is for seen Pokémon. You can get your desired offset by adding (PKMN№) / 8 bytes to the start of the table and checking bit (PKMN№) % 8. (one-based bit count)

cYa,

Tauwasser

I tested it,it worked....Thanks a lot..
Do your know how to check whether or not all types of No.201 Unown is captured?

Last edited by zhengwei (2011-08-30 03:19:35)

Offline

#14 2011-08-30 03:58:18

zhengwei
Member
Registered: 2011-08-18
Post 31/140

Re: how to check captured pokemon

Tauwasser wrote:

The table at DBE4 is for captured Pokémon, table at DC04 is for seen Pokémon. You can get your desired offset by adding (PKMN№) / 8 bytes to the start of the table and checking bit (PKMN№) % 8. (one-based bit count)

cYa,

Tauwasser

Sorry...I has solved the Unown problem with the script code....
But why I used the cheats code 01??EDD0(catch any pokemon in wild),
I insteads the ?? with c9(No. 201),but that crashes in battle of wild?

Offline

#15 2011-08-30 19:54:35

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

Re: how to check captured pokemon

It crashes because you have to set the appropriate Unown id, too, prior to battle.
Check the Pokédex for the byte that holds the unowns.

cYa,

Tauwasser

Offline

Board footer

Powered by FluxBB