The PokéCommunity Forums Fan Games ROM Hacking Tools, Tutorials & Resources
Tutorial How to create predefined pokemon...

Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.

Closed Thread
 
Thread Tools
  #1    
Old October 4th, 2007 (5:51 AM). Edited October 4th, 2007 by Mastermind_X.
Mastermind_X's Avatar
Mastermind_X Mastermind_X is offline
ASM-Hacker
     
    Join Date: Feb 2007
    Location: Germany
    Gender:
    Nature: Adamant
    Posts: 92
    Send a message via ICQ to Mastermind_X
    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

    Quote:
    Originally Posted by Mastermind_X
    Okay. Your ASM script is this one:

    Code:
    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).

    Relevant Advertising!

      #2    
    Old October 4th, 2007 (6:13 AM).
    BlackRainbow*'s Avatar
    BlackRainbow* BlackRainbow* is offline
    Pokemon Coralo Version ?
       
      Join Date: Oct 2006
      Location: Yiushu
      Gender:
      Nature: Bold
      Posts: 513
      Really Cool. But i'll be more happy if you'll post Day/Night script
      __________________
      Pokemon Coralo Version...New Pokemon Petal.
      Shyrika Region
        #3    
      Old October 4th, 2007 (6:15 AM).
      HackMew's Avatar
      HackMew HackMew is offline
      Mewtwo Strikes Back
      • Crystal Tier
       
      Join Date: Jun 2006
      Posts: 1,314
      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
      __________________
        #4    
      Old October 4th, 2007 (9:39 AM).
      OMNIPOTENT OMNIPOTENT is offline
         
        Join Date: Jul 2007
        Gender:
        Nature: Adamant
        Posts: 55
        *cough* what is this for *cough* " was this for the shiny thing?
          #5    
        Old October 4th, 2007 (10:40 AM).
        Mastermind_X's Avatar
        Mastermind_X Mastermind_X is offline
        ASM-Hacker
           
          Join Date: Feb 2007
          Location: Germany
          Gender:
          Nature: Adamant
          Posts: 92
          Send a message via ICQ to Mastermind_X
          Quote:
          Originally Posted by OMNIPOTENT View Post
          *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 ;-)
            #6    
          Old October 4th, 2007 (12:05 PM).
          OMNIPOTENT OMNIPOTENT is offline
             
            Join Date: Jul 2007
            Gender:
            Nature: Adamant
            Posts: 55
            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?
              #7    
            Old October 4th, 2007 (12:26 PM).
            HackMew's Avatar
            HackMew HackMew is offline
            Mewtwo Strikes Back
            • Crystal Tier
             
            Join Date: Jun 2006
            Posts: 1,314
            Quote:
            Originally Posted by OMNIPOTENT View Post
            u said it's for FR, for ruby are there differences?
            There are some differences, obviously.
            __________________
              #8    
            Old October 4th, 2007 (2:20 PM).
            cooley's Avatar
            cooley cooley is offline
            ///Keepin' it simple
            • Silver Tier
             
            Join Date: Feb 2007
            Location: United States
            Age: 22
            Gender: Male
            Nature: Impish
            Posts: 1,147
            Send a message via Windows Live Messenger to cooley
            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~
            __________________

              #9    
            Old October 5th, 2007 (12:07 PM).
            Mastermind_X's Avatar
            Mastermind_X Mastermind_X is offline
            ASM-Hacker
               
              Join Date: Feb 2007
              Location: Germany
              Gender:
              Nature: Adamant
              Posts: 92
              Send a message via ICQ to Mastermind_X
              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.
                #10    
              Old October 5th, 2007 (1:34 PM).
              spenceroone3's Avatar
              spenceroone3 spenceroone3 is offline
              <he eats lots of burgers.
                 
                Join Date: Aug 2007
                Location: In your closet
                Gender:
                Nature: Hasty
                Posts: 215
                Send a message via Windows Live Messenger to spenceroone3
                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...
                __________________
                <wtf? A lugi-oh?
                <What the hell did you do to my Arceus?
                  #11    
                Old October 5th, 2007 (6:17 PM).
                zel 2.0's Avatar
                zel 2.0 zel 2.0 is offline
                Gold Remaker
                   
                  Join Date: Jun 2006
                  Location: Argentina
                  Age: 30
                  Gender: Male
                  Nature: Quiet
                  Posts: 1,958
                  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 )
                  __________________


                    #12    
                  Old October 5th, 2007 (6:30 PM).
                  Ooka's Avatar
                  Ooka Ooka is offline
                  <3
                  • Crystal Tier
                   
                  Join Date: Aug 2007
                  Location: Challenging The E4
                  Age: 24
                  Gender: Male
                  Nature: Relaxed
                  Posts: 2,612
                  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?
                  __________________
                  Hi
                    #13    
                  Old October 7th, 2007 (12:36 PM).
                  Knox's Avatar
                  Knox Knox is offline
                  I dont know what to say
                     
                    Join Date: Sep 2007
                    Location: In a pillow case
                    Nature: Quirky
                    Posts: 29
                    That is pretty neat.

                    I hope at least someone posts a day/night tutorial because that would make a lot of hacks look better.
                      #14    
                    Old August 12th, 2008 (2:36 AM).
                    liuyanghejerry's Avatar
                    liuyanghejerry liuyanghejerry is offline
                       
                      Join Date: Jan 2008
                      Location: China,Xi'an
                      Nature: Calm
                      Posts: 219
                      Send a message via ICQ to liuyanghejerry Send a message via Windows Live Messenger to liuyanghejerry Send a message via Yahoo to liuyanghejerry
                      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.
                      __________________
                      Zel,thethethethe,LU-HO,Darthatron,HackMew,ZodiacDaGreat,Juan,score_under,JPAN,Tamah-chan,I really appreciate your kindness and your help!:D
                        #15    
                      Old August 12th, 2008 (3:59 AM).
                      thethethethe thethethethe is offline
                         
                        Join Date: Jun 2007
                        Location: Melbourne, Australia
                        Gender: Male
                        Posts: 1,104
                        Quote:
                        Originally Posted by liuyanghejerry View Post
                        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.
                        Code:
                        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.
                        __________________
                        Gone.
                          #16    
                        Old August 12th, 2008 (4:00 AM).
                        Blazichu's Avatar
                        Blazichu Blazichu is offline
                        Bahhhh?
                           
                          Join Date: Mar 2006
                          Location: The ground?
                          Age: 26
                          Gender: Male
                          Posts: 1,388
                          Send a message via Windows Live Messenger to Blazichu
                          liuyanghejerry, please do not revive year old threads.

                          *Locks*
                          __________________

                          ←(left) the online world for life(MSN, PC etc.)~
                          Closed Thread
                          Quick Reply

                          Sponsored Links
                          Thread Tools

                          Posting Rules
                          You may not post new threads
                          You may not post replies
                          You may not post attachments
                          You may not edit your posts

                          BB code is On
                          Smilies are On
                          [IMG] code is On
                          HTML code is Off

                          Forum Jump


                          All times are GMT -8. The time now is 7:19 AM.