Research & Development Got a well-founded knack with ROM hacking? Love reverse-engineering the Pokémon games? Or perhaps you love your assembly language. This is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!

TrollandToad.com
Reply
 
Thread Tools
  #201    
Old January 23rd, 2012 (8:46 AM).
sonic1's Avatar
sonic1 sonic1 is offline
ASM is my life now...
     
    Join Date: May 2008
    Location: Portugal
    Age: 23
    Gender: Male
    Nature: Timid
    Posts: 79
    In emerald, at the offset 0x611C9A, there's a table with 10 entries of 2 bytes (shorts), followed by an FFFF at the end of the table, which marks the pokemon restricted for entry in Battle Tower. To add or remove entries, add the pokemon number reversed in hex, and end the table with FFFF. If you want to remove all the limitations, just write FFFF to the beginning of the table (offset 611C9A).

    ~Sonic1
    __________________
    This signature has been disabled.
    over 350px high
    Please review and fix the issues by reading the signature rules.

    You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

    Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
    Reply With Quote

    Relevant Advertising!

      #202    
    Old January 23rd, 2012 (12:15 PM).
    Jambo51's Avatar
    Jambo51 Jambo51 is offline
    Glory To Arstotzka
       
      Join Date: Jun 2009
      Gender: Male
      Nature: Quiet
      Posts: 732
      I have found the transform animation in FireRed. It's located at 0xDF9BC.
      It gets called multiple times, once a frame I believe, during the transformation. Everything is in here, including the pallet loading part which gets the "whited out" pallet, and the part which gets the actual sprite.

      Using this routine, we could theoretically create custom transformations, such as Burmy changing into a different forme, or perhaps even in battle evolution.
      __________________
      Hey guys, please check out my recreations of the gen 1 and 2 music on my custom engine at my SoundCloud! - Here!
      Reply With Quote
        #203    
      Old January 26th, 2012 (3:43 PM).
      Darkdata's Avatar
      Darkdata Darkdata is offline
      15 year old me was an idiot.
         
        Join Date: Aug 2005
        Nature: Calm
        Posts: 137
        I have a spreadsheet file that contains a bunch of useful information for those who like to keep organized when scripting. With it, you can quickly reference and grab information in a easy to read format.

        Credits for the information are on the last sheet.



        Click picture to download
        __________________
        Jul | Homepage
        Reply With Quote
          #204    
        Old January 29th, 2012 (4:43 PM). Edited January 29th, 2012 by droomph.
        droomph's Avatar
        droomph droomph is offline
        weeb
        • Crystal Tier
         
        Join Date: Sep 2011
        Location: nowhere spectacular
        Age: 20
        Gender: Male
        Nature: Impish
        Posts: 4,291
        I got bored, so I made this. I'll probably add to it as I find out more about NSBMD. Hm, maybe not.
        Spoiler:
        List of Material IDs:
        Code:
        Twinleaf Town:
        	0x0 - Bottom part of leaves. Maybe stumps too? (ID: conttree_b_lm52)
        	0x1 - Top of the trees (ID: conttree_t_lm52)
        	0x2 - Doorstop (ID: hage_lm27) Oh you, Game Freak…^^
        	0x3 - Fence (ID: imped_lm51)
        	0x4 - Water - PURE water ^^ (ID: lake_lm34)
        	0x5 - Water approaching shore. (ID: lakep_lm3)
        	0x6 - Your average, everyday neatly mowed grass. (ID: ngrass_lm42)
        	0x7 - Flowers. (ID: nhana_lm59)
        	0x8 - Main dirt…or "sand". (ID: nsand_lm52)
        	0x9 - Dirt fringes - or "curb". (ID: nsandp_lm70)
        	0xA - Puddle apparently… (ID: puddle_b_lm8)
        	0xB - Jump-into-sea ledge, e.g. where you select SURF. (ID: seaside3_lm55)
        	0xC - A NORMAL freaking tree… (ID: tree01_lm48)
        	0xD - Forest Floor. I don't even care. (ID: tshadow_lm13)
        List of Polygon IDs:
        Code:
        Twinleaf Town:
        	0x0 - *Almost* every tree in town.
        	0x1 - Flowers.
        	0x2 - Fence surrounding flowers.
        	0x3 - Dirt fringes.
        	0x4 - Main dirt path.
        	0x5 - Door-mat tile.
        	0x6 - Select SURF here. Water's edge. I dunno how to explain clearer.
        	0x7 - The bottom of the trees, and the stumps? (southeastern corner)
        	0x8 - The tops of the trees of 0x7. WTH
        	0x9 - All the grass in this little town.
        	0xA - Forest Floor.
        	0xB - Edge of Pond.
        	0xC - Inside of Pond.
        	0xD - Essence of Pond? I don't know.
        __________________
        did u no there r 21 letters in the alphabet
        o i forgot 5
        uraqt


        Reply With Quote
          #205    
        Old March 15th, 2012 (12:25 PM).
        redriders180's Avatar
        redriders180 redriders180 is offline
        Mastermind of Pokemon Glazed
           
          Join Date: Jun 2010
          Location: Path of Victory, Tunod
          Gender: Male
          Nature: Quirky
          Posts: 540
          Complete Edit: I decided to delete my previous post, and ask something else instead
          Oh wow, you guys are quite a few calibers above me...I feel sort of insignificant, but I guess I'll post my ideas.

          Anyway, I'd like to implement a very dynamic script in my game...Basically, I wanted to allow myself to release events for my game. But instead of being limited to whatever I choose at the time, and avoiding releasing a new patch every time I wanted to do an event, I decided to make a spot in my game with a person that asks for a series of codes. These codes would be released by me, and the script would take the codes hex values, arrange them as necessary, do some checks to make sure the player isn't just mashing buttons, and "build" a completely custom Pokemon. This would allow me to easily decide an event, calculate the code, and release it in a post.

          But my problem is that I need a keyboard to pop up, in order to enter the code. I've decided on two approaches:

          The easy way would be to edit the mail input to take easy chat words and convert them into code. This would be good, since there are so many words, and I assume each is a byte value. But it's somewhat unprofessional.

          The hard way would be to recreate the "nickname" keyboard. I wouldn't know whats involved, but I know emerald has one for Walda...could we port it over.

          Aw man, I made my post immensely long for no reason again ._. Sorry, and thanks for the help!
          __________________


          I think I'm done with ROM hacking. I'll still pop in and visit, though.


          Reply With Quote
            #206    
          Old March 15th, 2012 (1:02 PM).
          sonic1's Avatar
          sonic1 sonic1 is offline
          ASM is my life now...
             
            Join Date: May 2008
            Location: Portugal
            Age: 23
            Gender: Male
            Nature: Timid
            Posts: 79
            Quote:
            Originally Posted by redriders180 View Post
            Complete Edit: I decided to delete my previous post, and ask something else instead
            Oh wow, you guys are quite a few calibers above me...I feel sort of insignificant, but I guess I'll post my ideas.

            Anyway, I'd like to implement a very dynamic script in my game...Basically, I wanted to allow myself to release events for my game. But instead of being limited to whatever I choose at the time, and avoiding releasing a new patch every time I wanted to do an event, I decided to make a spot in my game with a person that asks for a series of codes. These codes would be released by me, and the script would take the codes hex values, arrange them as necessary, do some checks to make sure the player isn't just mashing buttons, and "build" a completely custom Pokemon. This would allow me to easily decide an event, calculate the code, and release it in a post.

            But my problem is that I need a keyboard to pop up, in order to enter the code. I've decided on two approaches:

            The easy way would be to edit the mail input to take easy chat words and convert them into code. This would be good, since there are so many words, and I assume each is a byte value. But it's somewhat unprofessional.

            The hard way would be to recreate the "nickname" keyboard. I wouldn't know whats involved, but I know emerald has one for Walda...could we port it over.

            Aw man, I made my post immensely long for no reason again ._. Sorry, and thanks for the help!
            Well, either way of doing things, if you want to create a completely "custom" pokemon, you're gonna need ASM.
            My approach is: why don't you build a system that, when inputting some values in the ram, reads them and does things based on them?
            Did you know that VBA's Memory Viewer has the ability of loading hex data into ram offsets? You could create your .raw/.bin files and ask the player to load them manually with vba.

            But yeah, thats only an idea i have.

            ~Sonic1
            __________________
            This signature has been disabled.
            over 350px high
            Please review and fix the issues by reading the signature rules.

            You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

            Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
            Reply With Quote
              #207    
            Old March 15th, 2012 (1:32 PM).
            redriders180's Avatar
            redriders180 redriders180 is offline
            Mastermind of Pokemon Glazed
               
              Join Date: Jun 2010
              Location: Path of Victory, Tunod
              Gender: Male
              Nature: Quirky
              Posts: 540
              Quote:
              Originally Posted by sonic1 View Post


              Well, either way of doing things, if you want to create a completely "custom" pokemon, you're gonna need ASM.
              My approach is: why don't you build a system that, when inputting some values in the ram, reads them and does things based on them?
              Did you know that VBA's Memory Viewer has the ability of loading hex data into ram offsets? You could create your .raw/.bin files and ask the player to load them manually with vba.

              But yeah, thats only an idea i have.

              ~Sonic1
              I already knew that I'd need ASM, and I do have a plan on making this work...Each letter has a byte value, and I want to make the keyboard thing store a byte value to certain variables (0x8000 to 0x8009 come to mind). The all you need to do is create a certain code, e.g the first two bytes determine pokemon species, etc. etc, put in some checks, and then voila, the Pokemon is created. I've already studied extensively on pokemon data structures, and JPANs hack engine makes it easier...simply give a "base pokemon" (aka Bulbasaur), use the special that "unlocks" the pokemon, and "push" the values from the variables to the corresponding bytes. All I need to make is the keyboard store each letters byte value into a variable.

              I realise that simply giving a .raw file would be simple, but I dunno, I kinda want it to look nice, keep it interesting, and make it so even the noobiest of rom hack players could obtain my events, and I'm sure almost everyone can input some codes.
              __________________


              I think I'm done with ROM hacking. I'll still pop in and visit, though.


              Reply With Quote
                #208    
              Old March 15th, 2012 (2:19 PM). Edited March 15th, 2012 by droomph.
              droomph's Avatar
              droomph droomph is offline
              weeb
              • Crystal Tier
               
              Join Date: Sep 2011
              Location: nowhere spectacular
              Age: 20
              Gender: Male
              Nature: Impish
              Posts: 4,291
              Quote:
              Originally Posted by redriders180 View Post
              I already knew that I'd need ASM, and I do have a plan on making this work...Each letter has a byte value, and I want to make the keyboard thing store a byte value to certain variables (0x8000 to 0x8009 come to mind). The all you need to do is create a certain code, e.g the first two bytes determine pokemon species, etc. etc, put in some checks, and then voila, the Pokemon is created. I've already studied extensively on pokemon data structures, and JPANs hack engine makes it easier...simply give a "base pokemon" (aka Bulbasaur), use the special that "unlocks" the pokemon, and "push" the values from the variables to the corresponding bytes. All I need to make is the keyboard store each letters byte value into a variable.

              I realise that simply giving a .raw file would be simple, but I dunno, I kinda want it to look nice, keep it interesting, and make it so even the noobiest of rom hack players could obtain my events, and I'm sure almost everyone can input some codes.
              well, 0x815F9B4+(0x79x4) in FireRed is the pointer to the ASM routine for givepokemon...maybe you could try a little call-with-parameters to that or whatnot?

              Also, if you wanna do that keyboard thing, DavidJCobb has a keyboard (of sorts) for variable reading, although it's kinda cumbersome. I think he has a link in his sig or something...

              If you know some programming you could set up a small applet online which automatically patches your save file, like a real Event.
              __________________
              did u no there r 21 letters in the alphabet
              o i forgot 5
              uraqt


              Reply With Quote
                #209    
              Old March 15th, 2012 (2:24 PM).
              Incineroar's Avatar
              Incineroar Incineroar is offline
              the spirit of the fighter
              • Moderator
              • Platinum Tier
              • Developer
               
              Join Date: May 2009
              Location: Iki Town
              Age: 22
              Gender: Male
              Nature: Brave
              Posts: 13,569
              Quote:
              Originally Posted by sonic1 View Post
              You could create your .raw/.bin files and ask the player to load them manually with vba.
              There's just one problem with that. What about people that use hardware (ie. A Flashcard) and not VBA?
              __________________
              Reply With Quote
                #210    
              Old March 15th, 2012 (3:45 PM).
              sonic1's Avatar
              sonic1 sonic1 is offline
              ASM is my life now...
                 
                Join Date: May 2008
                Location: Portugal
                Age: 23
                Gender: Male
                Nature: Timid
                Posts: 79
                Quote:
                There's just one problem with that. What about people that use hardware (ie. A Flashcard) and not VBA?
                Well... Yeah, i admit, it isn't good for those, but you can just do an action replay that overwrites the values in RAM.


                Quote:
                I already knew that I'd need ASM, and I do have a plan on making this work...Each letter has a byte value, and I want to make the keyboard thing store a byte value to certain variables (0x8000 to 0x8009 come to mind). The all you need to do is create a certain code, e.g the first two bytes determine pokemon species, etc. etc, put in some checks, and then voila, the Pokemon is created. I've already studied extensively on pokemon data structures, and JPANs hack engine makes it easier...simply give a "base pokemon" (aka Bulbasaur), use the special that "unlocks" the pokemon, and "push" the values from the variables to the corresponding bytes. All I need to make is the keyboard store each letters byte value into a variable.
                Well, you know, its fairly easy to use the naming routine (the keyboard thing). Its just calling the routine with 2 parameters plus 2 optional (optinal depending on the type of usage = player, pokemon, box, mail). R0 is type of naming/usage, and R1 is the adress in RAM where the input is gonna be stored! This is a valuable info for you. You can store the adress of the var 8000 there and it will store 10 bytes (max letters) from the initial address onward (thus ending in var 8005, if i'm correct).

                But hey, don't try to put everything in just 1 input. Make 3-4 inputs depending on your needs. I doubt 2 bytes are enough to store a pokemon species using the keyboard, because the keyboard doesn't have access to 255 different symbols (ok, what i'm tryin' to explain is a bit hard, and i don't know how to explain it well).

                ~Sonic1
                __________________
                This signature has been disabled.
                over 350px high
                Please review and fix the issues by reading the signature rules.

                You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

                Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
                Reply With Quote
                  #211    
                Old March 15th, 2012 (4:18 PM).
                Mana's Avatar
                Mana Mana is offline
                • Platinum Tier
                 
                Join Date: Jan 2009
                Location: UK
                Gender: Female
                Posts: 10,026
                I've been fiddling around with special 0xC2 which apparently hatches eggs, to try and create a 'force hatching' scenario.

                The special alone (in a script) seems to only work if 'egg' is the only thing in your party. Having 2 eggs in your party - only the first one will hatch. Having any pokemon in your party and a " - hatched from the Egg" message will occur, giving you the option to nickname 'egg' but having no effect.

                The normal egg hatching script:

                Quote:
                #org 0x1BF546
                lockall
                msgbox 0x81BFB5A MSG_KEEPOPEN '"Huh?"
                special 0xC2
                waitstate
                releaseall
                end
                I tried using Special2 and set the store variable to 0x2 to see if it could 'select' the correct position for the egg, if it was 2/3rd in the party. However the only change this made was the egg then hatched to ??????, which then got nicknamed, but the eggs stayed in the party still.

                So is it possible to use the special / special2, in co-ordination with writing a byte or calling forth a variable to then either pick what the egg hatches into, or what egg hatches.
                Reply With Quote
                  #212    
                Old March 15th, 2012 (4:33 PM).
                droomph's Avatar
                droomph droomph is offline
                weeb
                • Crystal Tier
                 
                Join Date: Sep 2011
                Location: nowhere spectacular
                Age: 20
                Gender: Male
                Nature: Impish
                Posts: 4,291
                Quote:
                Originally Posted by SwiftSign View Post
                I've been fiddling around with special 0xC2 which apparently hatches eggs, to try and create a 'force hatching' scenario.

                The special alone (in a script) seems to only work if 'egg' is the only thing in your party. Having 2 eggs in your party - only the first one will hatch. Having any pokemon in your party and a " - hatched from the Egg" message will occur, giving you the option to nickname 'egg' but having no effect.

                The normal egg hatching script:



                I tried using Special2 and set the store variable to 0x2 to see if it could 'select' the correct position for the egg, if it was 2/3rd in the party. However the only change this made was the egg then hatched to ??????, which then got nicknamed, but the eggs stayed in the party still.

                So is it possible to use the special / special2, in co-ordination with writing a byte or calling forth a variable to then either pick what the egg hatches into, or what egg hatches.
                Try decompiling the pointers to that script/the few bytes around the script and see what you find, maybe those pass the parameters to the variables...
                __________________
                did u no there r 21 letters in the alphabet
                o i forgot 5
                uraqt


                Reply With Quote
                  #213    
                Old March 15th, 2012 (5:01 PM).
                redriders180's Avatar
                redriders180 redriders180 is offline
                Mastermind of Pokemon Glazed
                   
                  Join Date: Jun 2010
                  Location: Path of Victory, Tunod
                  Gender: Male
                  Nature: Quirky
                  Posts: 540
                  Quote:
                  Originally Posted by sonic1 View Post

                  Well... Yeah, i admit, it isn't good for those, but you can just do an action replay that overwrites the values in RAM.




                  Well, you know, its fairly easy to use the naming routine (the keyboard thing). Its just calling the routine with 2 parameters plus 2 optional (optinal depending on the type of usage = player, pokemon, box, mail). R0 is type of naming/usage, and R1 is the adress in RAM where the input is gonna be stored! This is a valuable info for you. You can store the adress of the var 8000 there and it will store 10 bytes (max letters) from the initial address onward (thus ending in var 8005, if i'm correct).

                  But hey, don't try to put everything in just 1 input. Make 3-4 inputs depending on your needs. I doubt 2 bytes are enough to store a pokemon species using the keyboard, because the keyboard doesn't have access to 255 different symbols (ok, what i'm tryin' to explain is a bit hard, and i don't know how to explain it well).

                  ~Sonic1
                  I understand completely what you mean I had planned to make the script something with a maybe 4 or 5 inputs...I wanted complete control over species, IVs, moves, item held, and possibly nickname. How do you recommend I make this work, however? Would I have to make an ASM that just puts the ram offset into R1, then call the normal nicknaming special?

                  This brings up something else...If I just use the nickname keyboard, the text says "[pokemon's] Nickname?". If it's not hard, I'd like to make it say something else on it, otherwise I'm sure I could live with it.
                  __________________


                  I think I'm done with ROM hacking. I'll still pop in and visit, though.


                  Reply With Quote
                    #214    
                  Old March 15th, 2012 (5:13 PM).
                  Mana's Avatar
                  Mana Mana is offline
                  • Platinum Tier
                   
                  Join Date: Jan 2009
                  Location: UK
                  Gender: Female
                  Posts: 10,026
                  Quote:
                  Originally Posted by droomph View Post
                  Try decompiling the pointers to that script/the few bytes around the script and see what you find, maybe those pass the parameters to the variables...
                  Hmm the pointer to the egg script lies at 0x6d71c, the only data string that is just before that pointed to a script with the line 'fadesong 0x9AOD' which as far as I know doesn't exist - so looks like egg hatching is controlled by ASM.

                  Does anyone know where Egg-Step information is stored?

                  //

                  Been looking for possibly Egg-Step info, can't seem to find it anywhere o_o nobody lists it with species/etc. data, and I have looked around the areas with it to no avail (For example, I'm assuming Pikachu will have a value of '15' somewhere in it's data to signify 21 cycles for hatching. If that value was momentarily set to 0, I wonder if the egg would insta-hatch.
                  Reply With Quote
                    #215    
                  Old March 15th, 2012 (5:51 PM).
                  redriders180's Avatar
                  redriders180 redriders180 is offline
                  Mastermind of Pokemon Glazed
                     
                    Join Date: Jun 2010
                    Location: Path of Victory, Tunod
                    Gender: Male
                    Nature: Quirky
                    Posts: 540
                    Quote:
                    Originally Posted by SwiftSign View Post
                    Hmm the pointer to the egg script lies at 0x6d71c, the only data string that is just before that pointed to a script with the line 'fadesong 0x9AOD' which as far as I know doesn't exist - so looks like egg hatching is controlled by ASM.

                    Does anyone know where Egg-Step information is stored?

                    //

                    Been looking for possibly Egg-Step info, can't seem to find it anywhere o_o nobody lists it with species/etc. data, and I have looked around the areas with it to no avail (For example, I'm assuming Pikachu will have a value of '15' somewhere in it's data to signify 21 cycles for hatching. If that value was momentarily set to 0, I wonder if the egg would insta-hatch.
                    I think the egg to hatch is stored in a variable...I think it's 0x8004, but I don't know for sure. You wouldn't use special2, because that just specifies where the output goes, not what the input is. I believe the slot number of the egg is stored to 0x8004, and the egg hatch special is called.
                    __________________


                    I think I'm done with ROM hacking. I'll still pop in and visit, though.


                    Reply With Quote
                      #216    
                    Old March 15th, 2012 (6:27 PM).
                    sonic1's Avatar
                    sonic1 sonic1 is offline
                    ASM is my life now...
                       
                      Join Date: May 2008
                      Location: Portugal
                      Age: 23
                      Gender: Male
                      Nature: Timid
                      Posts: 79
                      Quote:
                      Originally Posted by redriders180 View Post
                      I understand completely what you mean I had planned to make the script something with a maybe 4 or 5 inputs...I wanted complete control over species, IVs, moves, item held, and possibly nickname. How do you recommend I make this work, however? Would I have to make an ASM that just puts the ram offset into R1, then call the normal nicknaming special?
                      As for this, now i'm outta time, but i'll try to do something to you. Thing is, there's a routine in the rom, a powerful one, that has ENTIRE access to a pokemon's data, and can change anything about it!
                      List of things discovered that the routine can change (don't mind the hex numbers):
                      Spoiler:

                      0x00 - Pokémon ID
                      0x01 - Trainer IDs
                      0x02 - Nickname Max Length 1 (r6 should be the nickname's address)
                      0x03 - Font / Language
                      0x04 - Sanity
                      0x05 - Sanity
                      0x06 - Sanity
                      0x07 - OT Name Max Length
                      0x08 - Marks
                      0x09 - Checksum
                      0x0A - Filler
                      0x0B - Species
                      0x0C - Held Item
                      0x0D - Attack 1
                      0x0E - Attack 2
                      0x0F - Attack 3
                      0x10 - Attack 4
                      0x11 - PP 1
                      0x12 - PP 2
                      0x13 - PP 3
                      0x14 - PP 4
                      0x15 - PP Bonuses
                      0x16 - Coolness
                      0x17 - Beauty
                      0x18 - Cuteness
                      0x19 - Exp. Points
                      0x1A - HP EV
                      0x1B - Attack EV
                      0x1C - Defense EV
                      0x1D - Speed EV
                      0x1E - Sp. Attack EV
                      0x1F - Sp. Defense EV
                      0x20 - Happiness
                      0x21 - Smartness
                      0x22 - Pokérus Status
                      0x23 - Catch Location
                      0x24 - Catch Level
                      0x25 -
                      0x26 - Hometown / Poké Ball / Trainer Gender
                      0x27 - HP IV
                      0x28 - Attack IV
                      0x29 - Defense IV
                      0x2A - Speed IV
                      0x2B - Sp. Attack IV
                      0x2C - Sp. Defense IV
                      0x2D - IsEgg
                      0x2E - Ability Bit
                      0x2F - Toughness
                      0x30 - Sheen
                      0x31 - OT Gender
                      0x32 -
                      0x33 -
                      0x34 -
                      0x35 -
                      0x36 -
                      0x37 - Status Ailment
                      0x38 - Level
                      0x39 - Current HP
                      0x3A - Total HP
                      0x3B - Attack
                      0x3C - Defense
                      0x3D - Speed
                      0x3E - Sp. Attack
                      0x3F - Sp. Defense
                      0x43 - Hall Of Fame ribbon
                      0x50 - Obedience


                      Quote:
                      Originally Posted by redriders180 View Post
                      This brings up something else...If I just use the nickname keyboard, the text says "[pokemon's] Nickname?". If it's not hard, I'd like to make it say something else on it, otherwise I'm sure I could live with it.
                      Well, i explained this in the last post. Its the naming type, which is gonna through r0. But that can be easily changed, i think, so this is the least of our worries.

                      My main worry is how you're gonna convert the letters bytes into usable codes.
                      __________________
                      This signature has been disabled.
                      over 350px high
                      Please review and fix the issues by reading the signature rules.

                      You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

                      Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
                      Reply With Quote
                        #217    
                      Old March 15th, 2012 (6:54 PM).
                      Mana's Avatar
                      Mana Mana is offline
                      • Platinum Tier
                       
                      Join Date: Jan 2009
                      Location: UK
                      Gender: Female
                      Posts: 10,026
                      Quote:
                      Originally Posted by redriders180 View Post
                      I understand completely what you mean I had planned to make the script something with a maybe 4 or 5 inputs...I wanted complete control over species, IVs, moves, item held, and possibly nickname. How do you recommend I make this work, however? Would I have to make an ASM that just puts the ram offset into R1, then call the normal nicknaming special?

                      This brings up something else...If I just use the nickname keyboard, the text says "[pokemon's] Nickname?". If it's not hard, I'd like to make it say something else on it, otherwise I'm sure I could live with it.
                      Quote:
                      Originally Posted by redriders180 View Post
                      I think the egg to hatch is stored in a variable...I think it's 0x8004, but I don't know for sure. You wouldn't use special2, because that just specifies where the output goes, not what the input is. I believe the slot number of the egg is stored to 0x8004, and the egg hatch special is called.
                      You are right, 0x8004 0x1 hatches an egg that is 2nd in the party, etc.

                      The only trouble now is identifying where the egg is. I've had a look at JPAN's Pokemon data decryption thread from years ago, in which he has a routine that can return a species, even in egg form - but that can't give a permission.

                      Ideally something like

                      Check (egg) species -> Locate species -> setvar 0x8004 to position

                      Especially if it's a one of pokemon, so there can't be more than one, so there is no trouble in accidentally hatching a normal pokemon instead. Anything to identify where the egg is would be a great start ><.
                      Reply With Quote
                        #218    
                      Old March 15th, 2012 (7:09 PM). Edited March 15th, 2012 by droomph.
                      droomph's Avatar
                      droomph droomph is offline
                      weeb
                      • Crystal Tier
                       
                      Join Date: Sep 2011
                      Location: nowhere spectacular
                      Age: 20
                      Gender: Male
                      Nature: Impish
                      Posts: 4,291
                      Quote:
                      Originally Posted by SwiftSign View Post
                      Especially if it's a one of pokemon, so there can't be more than one, so there is no trouble in accidentally hatching a normal pokemon instead. Anything to identify where the egg is would be a great start ><.
                      I don't know what you mean by "identify where the egg is", but every Party Pokémon is 100 bytes long, meaning you just take variable 0x8004 into a register and
                      Code:
                      ldr rd, #0x02024284
                      mul rm, #0x64
                      add rm, #0x20
                      add rd, rm
                      it, and so on.

                      Or maybe something like this, but with str instead of ldr: (it's far from finished)
                      Spoiler:
                      Code:
                      species
                      ;select Pokemon slot (r0); zero-indexed
                      ;return Species (r0); ROM number
                      	push {lr}
                      	bl pval
                      	mov r1, 0x18
                      	mov r2, r0
                      	bl mod
                      	mov r1, 0x5
                      	cmp r0, r1
                      	bls first
                      	mov r1, 0x7
                      	cmp r0, r1
                      	bls second
                      	mov r1, 0x8
                      	cmp r0, r1
                      	bls third
                      	mov r1, 0xA
                      	cmp r0, r1
                      	beq third
                      	mov r1, 0xB
                      	cmp r0, r1
                      	bls fourth
                      	mov r1, 0xD
                      	cmp r0, r1
                      	bls second
                      	mov r1, 0xE
                      	cmp r0, r1
                      	beq third
                      	mov r1, 0x10
                      	cmp r0, r1
                      	beq third
                      	mov r1, 0x11
                      	cmp r0, r1
                      	bls fourth
                      	mov r1, 0x13
                      	cmp r0, r1
                      	bls second
                      	mov r1, 0x14
                      	cmp r0, r1
                      	beq third
                      	mov r1, 0x16
                      	cmp r0, r1
                      	beq third
                      	mov r1, 0x17
                      	bls fourth	
                      first
                      	ldr r2, .PARTY
                      	mov r1, 0x64
                      	mul r0, r1
                      	add r2, r0
                      	ldr r0, [r2, 0x20]
                      	pop {pc}
                      second
                      	ldr r2, .PARTY
                      	mov r1, 0x64
                      	mul r0, r1
                      	add r2, r0
                      	ldr r0, [r2, 0x2C]
                      	pop {pc}
                      third
                      	ldr r2, .PARTY
                      	mov r1, 0x64
                      	mul r0, r1
                      	add r2, r0
                      	ldr r0, [r2, 0x38]
                      	pop {pc}
                      fourth
                      	ldr r2, .PARTY
                      	mov r1, 0x64
                      	mul r0, r1
                      	add r2, r0
                      	ldr r0, [r2, 0x44]
                      	pop {pc}
                      .PARTY
                      	= 0x20244EC
                      __________________
                      did u no there r 21 letters in the alphabet
                      o i forgot 5
                      uraqt


                      Reply With Quote
                        #219    
                      Old March 15th, 2012 (8:18 PM). Edited March 16th, 2012 by redriders180.
                      redriders180's Avatar
                      redriders180 redriders180 is offline
                      Mastermind of Pokemon Glazed
                         
                        Join Date: Jun 2010
                        Location: Path of Victory, Tunod
                        Gender: Male
                        Nature: Quirky
                        Posts: 540
                        Quote:
                        Originally Posted by SwiftSign View Post
                        You are right, 0x8004 0x1 hatches an egg that is 2nd in the party, etc.

                        The only trouble now is identifying where the egg is. I've had a look at JPAN's Pokemon data decryption thread from years ago, in which he has a routine that can return a species, even in egg form - but that can't give a permission.

                        Ideally something like

                        Check (egg) species -> Locate species -> setvar 0x8004 to position

                        Especially if it's a one of pokemon, so there can't be more than one, so there is no trouble in accidentally hatching a normal pokemon instead. Anything to identify where the egg is would be a great start ><.
                        You actually don't need ASM for this one. I quote from the list of specials, courtesy of JPAN:
                        Quote:
                        Originally Posted by JPAN
                        [Special 0x]147 checks your pokemon in position referenced by 0x8004 and returns to the given variable its pokemon number. returns 0x19c if an egg.
                        So all you need to do is use set the variable 0x8004 to 0x0, special2 LASTRESULT 0x147, compare LASTRESULT 0x19C, if 0x1 goto @hatch, if 0x0, add 0x1 to 0x8004, and repeat. You also need to build in a failsafe for if they don't have an egg, so the script won't loop you forever.

                        Quote:
                        Originally Posted by sonic1 View Post

                        As for this, now i'm outta time, but i'll try to do something to you. Thing is, there's a routine in the rom, a powerful one, that has ENTIRE access to a pokemon's data, and can change anything about it!
                        List of things discovered that the routine can change (don't mind the hex numbers):
                        Spoiler:

                        0x00 - Pokémon ID
                        0x01 - Trainer IDs
                        0x02 - Nickname Max Length 1 (r6 should be the nickname's address)
                        0x03 - Font / Language
                        0x04 - Sanity
                        0x05 - Sanity
                        0x06 - Sanity
                        0x07 - OT Name Max Length
                        0x08 - Marks
                        0x09 - Checksum
                        0x0A - Filler
                        0x0B - Species
                        0x0C - Held Item
                        0x0D - Attack 1
                        0x0E - Attack 2
                        0x0F - Attack 3
                        0x10 - Attack 4
                        0x11 - PP 1
                        0x12 - PP 2
                        0x13 - PP 3
                        0x14 - PP 4
                        0x15 - PP Bonuses
                        0x16 - Coolness
                        0x17 - Beauty
                        0x18 - Cuteness
                        0x19 - Exp. Points
                        0x1A - HP EV
                        0x1B - Attack EV
                        0x1C - Defense EV
                        0x1D - Speed EV
                        0x1E - Sp. Attack EV
                        0x1F - Sp. Defense EV
                        0x20 - Happiness
                        0x21 - Smartness
                        0x22 - Pokérus Status
                        0x23 - Catch Location
                        0x24 - Catch Level
                        0x25 -
                        0x26 - Hometown / Poké Ball / Trainer Gender
                        0x27 - HP IV
                        0x28 - Attack IV
                        0x29 - Defense IV
                        0x2A - Speed IV
                        0x2B - Sp. Attack IV
                        0x2C - Sp. Defense IV
                        0x2D - IsEgg
                        0x2E - Ability Bit
                        0x2F - Toughness
                        0x30 - Sheen
                        0x31 - OT Gender
                        0x32 -
                        0x33 -
                        0x34 -
                        0x35 -
                        0x36 -
                        0x37 - Status Ailment
                        0x38 - Level
                        0x39 - Current HP
                        0x3A - Total HP
                        0x3B - Attack
                        0x3C - Defense
                        0x3D - Speed
                        0x3E - Sp. Attack
                        0x3F - Sp. Defense
                        0x43 - Hall Of Fame ribbon
                        0x50 - Obedience




                        Well, i explained this in the last post. Its the naming type, which is gonna through r0. But that can be easily changed, i think, so this is the least of our worries.

                        My main worry is how you're gonna convert the letters bytes into usable codes.
                        My first problem is that the method you posted earlier is that it stores the value in only five variables, which basically means two letter per variable, and this is NOT what I want...I want one letter per variable. I'm sure I could whip up a seperation script, though. After doing this, the game applies a cipher, and applies my method of conversion, which I won't reveal right here, so I don't have someone who's playing my rom hack in the future stumble upon it, and suddenly find him or herself able to create a team of six level 100 Arceus. If you really want/need to know, feel free to PM me. And thanks for your help!

                        Oh yea...thanks for that routine...but after a quick glance, it seems to all be stuff I can already access.
                        __________________


                        I think I'm done with ROM hacking. I'll still pop in and visit, though.


                        Reply With Quote
                          #220    
                        Old March 16th, 2012 (7:14 AM).
                        sonic1's Avatar
                        sonic1 sonic1 is offline
                        ASM is my life now...
                           
                          Join Date: May 2008
                          Location: Portugal
                          Age: 23
                          Gender: Male
                          Nature: Timid
                          Posts: 79
                          Quote:
                          Originally Posted by redriders180 View Post
                          My first problem is that the method you posted earlier is that it stores the value in only five variables, which basically means two letter per variable, and this is NOT what I want...I want one letter per variable. I'm sure I could whip up a seperation script, though. After doing this, the game applies a cipher, and applies my method of conversion, which I won't reveal right here, so I don't have someone who's playing my rom hack in the future stumble upon it, and suddenly find him or herself able to create a team of six level 100 Arceus. If you really want/need to know, feel free to PM me. And thanks for your help!

                          Well about the method, it isn't my fault, it's how the keyboard works, and i can't do anything about it without breaking compatibility to all other things that use it (at least me, i'm sure that there are many people out there who know a lot more ASM than me).

                          But yeah, a separation script is totally possible, just use copybyte to copy a byte to other variable while using writebytetooffset to clear the other 8bits (1-byte) of the variable.

                          The cipher... Well, i'm a student of asm for about 2 years from now, and i'm willing to try to learn everything about it. I'm not asking to see your cipher specifically, but an example of one would be nice for me to learn how to deal with those things.

                          Quote:
                          Originally Posted by redriders180 View Post
                          Oh yea...thanks for that routine...but after a quick glance, it seems to all be stuff I can already access.
                          Well, if you say so... But yeah, the things i posted are the only ones that i know what it does, that routine is actually able to change everything, but i don't know what to pass as arguments to actually change everything, just those.
                          __________________
                          This signature has been disabled.
                          over 350px high
                          Please review and fix the issues by reading the signature rules.

                          You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

                          Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
                          Reply With Quote
                            #221    
                          Old March 17th, 2012 (1:36 PM).
                          sonic1's Avatar
                          sonic1 sonic1 is offline
                          ASM is my life now...
                             
                            Join Date: May 2008
                            Location: Portugal
                            Age: 23
                            Gender: Male
                            Nature: Timid
                            Posts: 79
                            To anyone who is interested, callasm 0x09FC91 to name yourself in overworld.
                            FireRed Only.

                            ~Sonic1
                            __________________
                            This signature has been disabled.
                            over 350px high
                            Please review and fix the issues by reading the signature rules.

                            You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

                            Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
                            Reply With Quote
                              #222    
                            Old March 17th, 2012 (7:53 PM).
                            NarutoActor's Avatar
                            NarutoActor NarutoActor is offline
                            The rocks cry out to me
                            • Silver Tier
                             
                            Join Date: Jan 2009
                            Location: Brooklyn/Marlboro
                            Age: 24
                            Gender: Female
                            Nature: Bashful
                            Posts: 1,979
                            Quote:
                            Originally Posted by SwiftSign View Post
                            You are right, 0x8004 0x1 hatches an egg that is 2nd in the party, etc.

                            The only trouble now is identifying where the egg is. I've had a look at JPAN's Pokemon data decryption thread from years ago, in which he has a routine that can return a species, even in egg form - but that can't give a permission.

                            Ideally something like

                            Check (egg) species -> Locate species -> setvar 0x8004 to position

                            Especially if it's a one of pokemon, so there can't be more than one, so there is no trouble in accidentally hatching a normal pokemon instead. Anything to identify where the egg is would be a great start ><.
                            Well what you can do is have a series of checks that check each pokemon in the party's catch level (Which would be zero since it didn't hatch yet)that way you can tell where the egg is in the party, and if there is even one in said party.


                            Also isn't egg hacking based on the amount of steps the player takes. You can just add a certain amount of steps to the area where the amount of steps are stored, then start the routine for the egg check. Just my brain storming, I didn't actually try it myself, so tell me how it goes.
                            __________________
                            ~There are those people who understand hex, F the rest
                            Reply With Quote
                              #223    
                            Old March 18th, 2012 (6:57 AM).
                            sonic1's Avatar
                            sonic1 sonic1 is offline
                            ASM is my life now...
                               
                              Join Date: May 2008
                              Location: Portugal
                              Age: 23
                              Gender: Male
                              Nature: Timid
                              Posts: 79
                              After a quick research, i discovered that in R/S/E, the scripting command 0x2E, Resetvars, doesn't reset vars.
                              In Firered does, but in those versions it sets 8000 to the current clock hours, 8001 to minutes and 8002 to seconds. The reason FIRERED resets those vars is because it doesn't have Real Time Clock.
                              __________________
                              This signature has been disabled.
                              over 350px high
                              Please review and fix the issues by reading the signature rules.

                              You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

                              Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
                              Reply With Quote
                                #224    
                              Old March 20th, 2012 (9:58 PM). Edited March 20th, 2012 by Agastya.
                              Agastya's Avatar
                              Agastya Agastya is offline
                              Grinding failed. Item Grind level dropped by 3.
                                 
                                Join Date: Feb 2010
                                Nature: Quiet
                                Posts: 72
                                As I've been doing a Fakemon hack in Emerald, the Frontier was obviously a mess. Things weren't very well documented outside of the normal structures for the Tents and regular Pokemon (which is very well documented on Bulbapedia - for brevity they will not be discussed here, go to bulbapedia.bulbagarden.net/wiki/Battle_Frontier_data_structures_in_Generation_III if interested), but this still left things like the Brains and wild spawns in the Pyramid/Pike up in the air. After a bit of snooping around, I've found some stuff. I really doubt this warrants its own thread, so I'll put it here.

                                Frontier Brain info:
                                Spoiler:
                                The Frontier Brain teams are stored in a 20 Byte data structure, as shown:
                                41 00 | B3 00 | 18 | 0F | 6A/00/98/98/64/00 | 09 00/07 00/08 00/32 00

                                1) Species
                                2) Item (Normal indexing instead of Frontier indexing)
                                3) IVs (Apply to all stats)
                                4) Nature
                                5) EVs, in the order of HP/ATK/DEF/SPEED/SATK/SDEF
                                6) Movepool

                                Shown was Salon Maiden Anabel's Alakazam. It has a Modest nature, IVs of 24, an EV investment of 106 HP/152 DEF/152 SPD/100 SATK, and a movepool of Thunderpunch, Fire Punch, Ice Punch, and Disable. Its hold item is a Brightpowder.
                                Two things interesting to note is that Frontier Brains use normal item indexing instead of the Frontier's custom indexing, so they can hold whatever is wished for them to hold. Also, similarly to Steven's team in the Space Center event, they can have up to 255 EVs in each stat, and all EVs will be accounted for.

                                The teams themselves are located at the following offsets:
                                0x61156C, Salon Maiden Anabel
                                0x6115E4, Dome Ace Tucker
                                0x61165C, Palace Maven Spenser
                                0x6116D4, Arena Tycoon Greta
                                0x61174C, Metang, Skarmory, Aggron, Metang, Skarmory, Aggron*
                                0x6117C4, Pike Queen Lucy
                                0x61183C, Pyramid King Brandon

                                At each offset is six Pokemon. The first three Pokemon are used in the Silver symbol battle, and the next three Pokemon are used in the Gold symbol battle.
                                *This is two copies of Steven's team in the Space Center event - as Factory Head Noland uses random Pokemon from the Factory listing, he doesn't get a special team to use.


                                Battle Pyramid wild spawns:
                                Spoiler:
                                The format for the wild spawns is 12 bytes long:
                                61 01 | 23 | 02 | 56 00/D1 00/E3 00/00 00

                                1) Species
                                2) EVs, dictated by the normal Frontier EVing setup
                                3) ???
                                4) Movepool

                                I'm not quite sure what the ?? is, but it's 02 in every wild spawn entry.
                                Showcased here is a Pluslie with EV investment of HP/ATK/SDEF, and a movepool of Thunder Wave, Spark, and Encore.

                                As strange as it is to EV in Attack, it was most likely done to keep it from being too "bulky" as EVs in regular Frontier Pokemon are evenly distributed among each stat (in which case this is 170 in each stat, compared to 255 in both HP and SDEF)


                                The wild spawns themselves are located at 0x6126B0 for Level 50 and 0x612E80 for Open Level. At each offset is a master list of 160 Pokemon broken up into groups of eight, and then twenty pointers respective to which round it is pointing to. The list is virtually identical for Level 50 and Open Level, but the EVs are different in Open Level. A listing of the Pokemon in the Pyramid itself can be found at Bulbapedia, and it generally follows the order that the Pokemon are listed.


                                I haven't looked at the wild spawns in the Pike yet, but they probably share a similar format to the wilds in the Pyramid. Hopefully this can help out with Frontier hacking.
                                Reply With Quote
                                  #225    
                                Old March 24th, 2012 (2:45 AM). Edited March 24th, 2012 by knizz.
                                knizz's Avatar
                                knizz knizz is offline
                                   
                                  Join Date: Aug 2007
                                  Posts: 192
                                  Quote:
                                  Originally Posted by sonic1 View Post

                                  As for this, now i'm outta time, but i'll try to do something to you. Thing is, there's a routine in the rom, a powerful one, that has ENTIRE access to a pokemon's data, and can change anything about it!
                                  List of things discovered that the routine can change (don't mind the hex numbers):
                                  Spoiler:

                                  0x00 - Pokémon ID
                                  0x01 - Trainer IDs
                                  0x02 - Nickname Max Length 1 (r6 should be the nickname's address)
                                  0x03 - Font / Language
                                  0x04 - Sanity
                                  0x05 - Sanity
                                  0x06 - Sanity
                                  0x07 - OT Name Max Length
                                  0x08 - Marks
                                  0x09 - Checksum
                                  0x0A - Filler
                                  0x0B - Species
                                  0x0C - Held Item
                                  0x0D - Attack 1
                                  0x0E - Attack 2
                                  0x0F - Attack 3
                                  0x10 - Attack 4
                                  0x11 - PP 1
                                  0x12 - PP 2
                                  0x13 - PP 3
                                  0x14 - PP 4
                                  0x15 - PP Bonuses
                                  0x16 - Coolness
                                  0x17 - Beauty
                                  0x18 - Cuteness
                                  0x19 - Exp. Points
                                  0x1A - HP EV
                                  0x1B - Attack EV
                                  0x1C - Defense EV
                                  0x1D - Speed EV
                                  0x1E - Sp. Attack EV
                                  0x1F - Sp. Defense EV
                                  0x20 - Happiness
                                  0x21 - Smartness
                                  0x22 - Pokérus Status
                                  0x23 - Catch Location
                                  0x24 - Catch Level
                                  0x25 -
                                  0x26 - Hometown / Poké Ball / Trainer Gender
                                  0x27 - HP IV
                                  0x28 - Attack IV
                                  0x29 - Defense IV
                                  0x2A - Speed IV
                                  0x2B - Sp. Attack IV
                                  0x2C - Sp. Defense IV
                                  0x2D - IsEgg
                                  0x2E - Ability Bit
                                  0x2F - Toughness
                                  0x30 - Sheen
                                  0x31 - OT Gender
                                  0x32 -
                                  0x33 -
                                  0x34 -
                                  0x35 -
                                  0x36 -
                                  0x37 - Status Ailment
                                  0x38 - Level
                                  0x39 - Current HP
                                  0x3A - Total HP
                                  0x3B - Attack
                                  0x3C - Defense
                                  0x3D - Speed
                                  0x3E - Sp. Attack
                                  0x3F - Sp. Defense
                                  0x43 - Hall Of Fame ribbon
                                  0x50 - Obedience




                                  Well, i explained this in the last post. Its the naming type, which is gonna through r0. But that can be easily changed, i think, so this is the least of our worries.

                                  My main worry is how you're gonna convert the letters bytes into usable codes.
                                  :O
                                  Is this 0803FBE8?
                                  Thanks!
                                  __________________
                                  Firered IDA 6.6 DB: https://www.dropbox.com/s/d856o3pyndyr5sr/firered.idb
                                  VBA-M with lua scripting support
                                  Reply With Quote
                                  Reply

                                  Quick Reply

                                  Join the conversation!

                                  Create an account to post a reply in this thread, participate in other discussions, and more!

                                  Create a PokéCommunity Account

                                  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 12:28 PM.