PDA

View Full Version : [Tutorial] How to create predefined pokemon...


Mastermind_X
October 4th, 2007, 05:51 AM
Hi @ all. I was asked how it could be possible to create pokemon with predefined obedient-bit, ID, secret-id and so on.

Therefore, I wrote a little script + commented it out. Hope, it helps. (originally for FR US v1.0)

greetz
MX

Okay. Your ASM script is this one:

00B00000h: 00 B5 04 48 00 68 04 49 09 18 04 48 28 22 0B DF ; .µ.H.h.I...H(".ß
00B00010h: 01 BC 00 47 10 50 00 03 E4 79 00 00 00 20 B0 08 ; .¼.G.P..äy....°.

The bytes do have some meanings. I'll explain them one by one. (The important ones)

[00 B5 04 48 00 68 04 49 09 18 04 48]
remains still the same... they calculate destination. (DON'T CHANGE IT!!)

[28]
Is the length of the data to be copied in 16bits. e.g. we want to copy 80 bytes, so it's 80 / 2 = 40 halfwords. #40 = 0x28
(changable, but since pokemondata always has a length of 80 bytes, it doesn't make sense to enter an other value...)

[22 0B DF 01 BC 00 47]
remains always the same. copies the data itself and returns. (don't change them!!)

[10 50 00 03]
reverse it => 0x03005010 its the location for the dma adresses. (DON'T CHANGE IT!!)

[E4 79 00 00]
defines the slot in which the pokemon will be deposited. It's 0x4 + (80 bytes * pokecount).
So for example Box 14 Slot 1:
1 Box contains 30 pokemon
30 * 13 = 390

1 pokemon equals 80 bytes, so it's
390 * 80 = 31200

31200 + 4 = 31204 = 0x79E4

That's the value.

[00 20 B0 08]
reverse it => 0x08B02000

That declares the source of the 80 pokebytes. So you would have to enter the 80 bytes @ 0xB020000 - 0xB020050

Okay. Let's say, your ASM script is located @ 0x00B00000 like mine. Then you would have to call it in a pokescript like this:

23 01 00 B0 08

23 = callasm
01 00 B0 08 = reversed location of the ASM script. IMPORTANT: since i wrote a thumb routine, the location has to end with an odd number. For me it's 01, for you just (location+1).

BlackRainbow*
October 4th, 2007, 06:13 AM
Really Cool. But i'll be more happy if you'll post Day/Night script

HackMew
October 4th, 2007, 06:15 AM
Hey, really nice one Mastermind_X! ;)
It could be useful my hack (not really soon, though).

Oh, and ~Shirin, Mastermind_X have already planned a Night/Day tut. Be patient! :P

OMNIPOTENT
October 4th, 2007, 09:39 AM
*cough* what is this for *cough* ^^" was this for the shiny thing?

Mastermind_X
October 4th, 2007, 10:40 AM
*cough* what is this for *cough* ^^" was this for the shiny thing?

*lol* *is really pleased about hearing people associating "Mastermind_X" with "shiny hack"*

No, consider the routine above as an extended "givepokemon" command.

@all: day-night-hack... well, let's see ;-)

OMNIPOTENT
October 4th, 2007, 12:05 PM
lol don't worry, i read (read, not understood eh XD) some of your tutorials and i know you're not only a "shiny-hack-hacker" :D

u said it's for FR, for ruby are there differences?

HackMew
October 4th, 2007, 12:26 PM
u said it's for FR, for ruby are there differences?

There are some differences, obviously.

cooley
October 4th, 2007, 02:20 PM
Nice tutorial, where'd you learn that from? This stuff seems hard, good luck
can't wait for that day and night tutorial. Oh yeah, what Game is it for?(Ruby, FireRed,etc.)
~cooley~

Mastermind_X
October 5th, 2007, 12:07 PM
Like all my tutorials, the day-night-tutorial will be using a certain version as example but with many explanations how I calculate offsets, or other things, so that the whole thing easily can be ported to another version.

spenceroone3
October 5th, 2007, 01:34 PM
ER... I'm just going to stick to my givepokemon command in scripts... Hey mastermind X are you a %100 ASM hacker? I can't wait until your Day/Night system get shown...

zel 2.0
October 5th, 2007, 06:17 PM
Interesting Mastermind_X, this takes care of the problems of those Poke who won't obey you, right? (guess it's gonna be a while till I need this info, but I'm thanking you anyway)

Yep, but about the n/d hack, if the example is for using the Emerald's time system, I guess in FR we are a bit in troubles (yes, I still remember we could do it in a different way, but I was mainly pointing that it's not everything that "easily ported", as some stuff changes :P)

Ooka
October 5th, 2007, 06:30 PM
Well, this is a nice tutorial, so this could be used as a substitute for the "shiny Hack"? It looks like it because you did state that you could change secret id NO.s did you not?

Knox
October 7th, 2007, 12:36 PM
That is pretty neat.

I hope at least someone posts a day/night tutorial because that would make a lot of hacks look better.

liuyanghejerry
August 12th, 2008, 02:36 AM
Hi~
I just read your tut, and I got a little question.

In the tut,[00 20 B0 08] points to a offset which is 80 bytes for your pokemon.I don't understand what is the 80 bytes, do you have a example with a little explaination?

Anyway ,thanks.

thethethethe
August 12th, 2008, 03:59 AM
Hi~
I just read your tut, and I got a little question.

In the tut,[00 20 B0 08] points to a offset which is 80 bytes for your pokemon.I don't understand what is the 80 bytes, do you have a example with a little explaination?

Anyway ,thanks.
I know someone going to close this and I shouldn't post, but I thought I had to post this as this answer might help others who look at this thread.

Using this is actually a bit more difficult than implied in the tutorial.
The 80 Byte Structure is set out like this.
Personality - 4 Bytes
Trainer ID - 2 Bytes
Secret ID - 2 Bytes
Nickname - 10 bytes
Font - 1 Byte
Obedience byte? - 1 byte
OT name - 7 bytes
Mark - 1 byte
Checksum - 2 Bytes
???? - 2 Bytes
Data Field - 48 bytes
Bit long there, but it's still probably not too much information on actually recreating them.
This might help out a bit more.
http://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_data_structure_in_the_GBA
If you read through all of that it might help writing up your own bytes.

Blazichu
August 12th, 2008, 04:00 AM
liuyanghejerry, please do not revive year old threads.

*Locks*