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!

Reply
 
Thread Tools
  #26    
Old May 31st, 2011 (2:07 PM).
Jambo51's Avatar
Jambo51 Jambo51 is offline
Glory To Arstotzka
     
    Join Date: Jun 2009
    Gender: Male
    Nature: Quiet
    Posts: 732
    Quote:
    Originally Posted by sonic1 View Post

    That is correct.
    Jambo, mind telling us how you loaded the pokemon in the 2nd slot?
    I mean, you surelly know that the first slot is in 202402c and the second in 202402c + 0x64.
    The way i load into there is manually, using data from another pokemon of another battle, saving his data into a file and then loading it to the offset when battle is about to start.

    Did you used a routine or manually loaded the data?

    ~Sonic1
    I made the routine repeat the generation if the battle type was wild double. It currently generates a wild Pikachu (always) because of how I had to design it for now. But it shouldn't be outwith reach to have the game generate 2 random wild Pokémon.
    __________________
    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

    Relevant Advertising!

      #27    
    Old May 31st, 2011 (2:19 PM).
    sonic1's Avatar
    sonic1 sonic1 is offline
    ASM is my life now...
       
      Join Date: May 2008
      Location: Portugal
      Age: 22
      Gender: Male
      Nature: Timid
      Posts: 79
      About the 2 random generated pokemon, according to what JPAN told me, it isn't hard to make the mod in the game in order to get it.

      The routine that does the wildbattles is in 0x08082AEC, but only creates 1 pokemon. To change that, we must do a copy of the routine at 0x080829FC, which is the one who creates the pokemon at enemy slot 1. If we could create a hack that asked the game to create a pokemon in the next slot, we could even have 6 wild pokemons at once. I think it would'n be hard to do it.

      ~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
        #28    
      Old May 31st, 2011 (2:48 PM).
      Jambo51's Avatar
      Jambo51 Jambo51 is offline
      Glory To Arstotzka
         
        Join Date: Jun 2009
        Gender: Male
        Nature: Quiet
        Posts: 732
        Quote:
        Originally Posted by sonic1 View Post
        About the 2 random generated pokemon, according to what JPAN told me, it isn't hard to make the mod in the game in order to get it.

        The routine that does the wildbattles is in 0x08082AEC, but only creates 1 pokemon. To change that, we must do a copy of the routine at 0x080829FC, which is the one who creates the pokemon at enemy slot 1. If we could create a hack that asked the game to create a pokemon in the next slot, we could even have 6 wild pokemons at once. I think it would'n be hard to do it.

        ~Sonic1
        I already did that. I got the game to generate 2 wild pokémon, and yes, it could easily generate 6. The game would hang badly though, and there is no code in the game for triple battles, never mind sextuple battles.

        The bigger issues are the music playing the "you won" music at the wrong point, and the ability/lack of ability to catch the Pokémon on screen.

        Once we deal with these issues, and deal with the lack of ability to run from the battle. We'll be in a good position to start implementing this hack into actual hacks.
        __________________
        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
          #29    
        Old June 1st, 2011 (8:01 AM).
        slawter666 slawter666 is offline
           
          Join Date: Sep 2008
          Posts: 67
          As we're on the topic of battles. How difficult would it be to implement more advanced battlegrounds? i.e. 256 colour backgrounds, animated backgrounds, a different background depending on the time of day (and maybe seasons too), one for specific areas (such as one for each elite four + the champion) etcetera.
          __________________
          Reply With Quote
            #30    
          Old June 1st, 2011 (1:35 PM).
          TheDarkShark TheDarkShark is offline
          Metal Headed Hacker
             
            Join Date: May 2010
            Location: Germany
            Gender: Male
            Nature: Calm
            Posts: 56
            @slawter666: driver implemented a battle BG hack in BPRD (Firered German) which loads different bgs depending on a variable. Shouldn't be hard to port, but I'm not sure if he actually released the info. I'm not an ASM expert, but an animated background could go with the extended BG-loading routine easily, I guess. Same goes for different BGs for daytimes/seasons. A 256 bg should be possible somehow, but it is possible, that there are some background colors used in the standard battle screen. If this is true, it would be very hard to make 256 colors load properly (actually impossible without loading the other bg-palletes into the OBJ-palette...).
            __________________
            There are two things every Rom-Hacker should learn:
            1. Don't give away everything you know!

            Reply With Quote
              #31    
            Old June 2nd, 2011 (2:51 PM).
            slawter666 slawter666 is offline
               
              Join Date: Sep 2008
              Posts: 67
              Quote:
              Originally Posted by TheDarkShark View Post
              @slawter666: driver implemented a battle BG hack in BPRD (Firered German) which loads different bgs depending on a variable. Shouldn't be hard to port, but I'm not sure if he actually released the info. I'm not an ASM expert, but an animated background could go with the extended BG-loading routine easily, I guess. Same goes for different BGs for daytimes/seasons. A 256 bg should be possible somehow, but it is possible, that there are some background colors used in the standard battle screen. If this is true, it would be very hard to make 256 colors load properly (actually impossible without loading the other bg-palletes into the OBJ-palette...).
              Thanks for the reply.

              Could a (roughly) 256 colour background could be done using a similar method to Black Charizard's 256/240 colour Titlescreen? However he removed how he did it (although it might still be in some quotes, I haven't checked).
              __________________
              Reply With Quote
                #32    
              Old June 2nd, 2011 (11:20 PM).
              Meta Paradox Meta Paradox is offline
              Researching FireRed...
                 
                Join Date: Apr 2011
                Gender: Male
                Nature: Serious
                Posts: 56
                Okay, if the double wild battle needs changing every so often EXTERNALLY with a hex editor, wouldn't writebytetooffset work? At least for wildbattle scripts?
                __________________
                Meta Paradox On The Web:
                http://metaparadox.webs.com/
                Reply With Quote
                  #33    
                Old June 3rd, 2011 (3:39 AM).
                Jambo51's Avatar
                Jambo51 Jambo51 is offline
                Glory To Arstotzka
                   
                  Join Date: Jun 2009
                  Gender: Male
                  Nature: Quiet
                  Posts: 732
                  Quote:
                  Originally Posted by Meta Paradox View Post
                  Okay, if the double wild battle needs changing every so often EXTERNALLY with a hex editor, wouldn't writebytetooffset work? At least for wildbattle scripts?
                  No. The byte in question is always written with the standard routine. And it's always written as 0x0. This needs some investigation. It is possible for me to make a routine which reads from lastresult for ghe wildbattle type, though.

                  I've got the game generating 2 random wild pokemon from the map's pokemon. Although i'm struggling to find where the buggy things are, atm.
                  __________________
                  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
                    #34    
                  Old June 3rd, 2011 (5:22 AM).
                  POKEMONMASTER260 POKEMONMASTER260 is offline
                     
                    Join Date: Jun 2009
                    Posts: 139
                    Is it possible to implement this in a Ruby ROM hack, instead of just a memory hack?
                    Reply With Quote
                      #35    
                    Old June 3rd, 2011 (9:16 AM).
                    miksy91's Avatar
                    miksy91 miksy91 is offline
                    Dark Energy is back in action! ;)
                       
                      Join Date: Oct 2008
                      Location: A small country in the North
                      Gender: Male
                      Nature: Relaxed
                      Posts: 1,435
                      This is pretty much impossible if you ask me.

                      Reason:
                      It would be a difficult thing to make it so that 2 pokemon could appear at the same time but the real problem would be the coding for the battle not to end if you caught one pokemon (of course if the hacker wanted it to be so that the battle would end leaving the other pokemon uncatchable it would be possible, maybe).
                      __________________
                      My Rom Hack



                      Fixing bugs in a ROM hack
                      CP of encountered pokemon in GO

                      Learn how to hack GB/C games:

                      Check my GameBoy/Color hacking videos in Youtube
                      -The video set uses Pokemon Silver (U) rom for demonstrations
                      Reply With Quote
                        #36    
                      Old June 3rd, 2011 (2:36 PM). Edited May 1st, 2012 by sonic1.
                      sonic1's Avatar
                      sonic1 sonic1 is offline
                      ASM is my life now...
                         
                        Join Date: May 2008
                        Location: Portugal
                        Age: 22
                        Gender: Male
                        Nature: Timid
                        Posts: 79
                        At 01065c put a branch to this routine:~
                        Code:
                        .thumb
                        .align 2
                        
                        main:
                        LDR     R5, =0x20370CA  ' var 8009 adress. Chose this one because its not used often
                        LDRB    R5, [R5]
                        CMP     R5, #0xF 'If var 8009 is 0xF then go to new code. Else continue original code.
                        BEQ     new_code
                        STR     R1, [R2]
                        LDR     R1, =0x2023E82
                        MOV     R0, #0xF
                        STRB    R0, [R1]
                        LDR     R4, =0x8010665
                        BX      R4
                        
                        new_code:        'What this code does is basically setting the double battle bit.
                        PUSH   {R7}
                        MOV     R7, #1  ' see the line up
                        ORR     R1, R7
                        POP    {R7}
                        STR     R1, [R2]'----------Rest of the routine
                        LDR     R1, =0x2023E82
                        MOV     R0, #0xF
                        STRB    R0, [R1]
                        LDR     R4, =0x8010665
                        BX      R4
                        Presto! With var 8009 with value 0xF set, you can now have double battles. Any double battles: Wild, trainer, wireless, safari, blah blah blah.

                        ~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
                          #37    
                        Old June 3rd, 2011 (2:42 PM). Edited June 4th, 2011 by Incineroar.
                        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,394
                        Quote:
                        Originally Posted by sonic1 View Post
                        At 01065c put a branch to this routine:~
                        Code:
                        .thumb
                        .align 2
                        
                        main:
                        LDR     R5, =0x20370CA  ' var 8009 adress. Chose this one because its not used often
                        LDRB    R5, [R5]
                        CMP     R5, #0xF 'If var 8009 is 0xF then go to new code. Else continue original code.
                        BEQ     new_code
                        STR     R1, [R2]
                        LDR     R1, =0x2023E82
                        MOV    R0, #0xF
                        STRB    R0, [R1]
                        LDR     R4, =0x8010665
                        BX      R4
                        
                        new_code:        'What this code does is basically add 1 to the current value in r1, setting the double battle bit
                        ADD    R1, #1  ' see the line up
                        STR     R1, [R2]'----------Rest of the routine
                        LDR     R1, =0x2023E82
                        MOV    R0, #0xF
                        STRB    R0, [R1]
                        LDR     R4, =0x8010665
                        BX      R4
                        Presto! With var 8009 with value 0xF set, you can now have double battles. Any double battles: Wild, trainer, wireless, safari, blah blah blah.

                        ~Sonic1
                        Ooh goody. Now, all that needs to be done is to write a routine that allows a wireless double battle to work!

                        Especially if each trainer tries to catch the same Pokemon.


                        Edit: Someone made a really good point on that video. I'll have to see to it. It is using surf to kill both opposing Pokemon. But, I don't think anything special will happen.
                        __________________
                        Reply With Quote
                          #38    
                        Old July 10th, 2011 (6:23 PM).
                        Jambo51's Avatar
                        Jambo51 Jambo51 is offline
                        Glory To Arstotzka
                           
                          Join Date: Jun 2009
                          Gender: Male
                          Nature: Quiet
                          Posts: 732
                          Quote:
                          Originally Posted by Team Fail View Post

                          Ooh goody. Now, all that needs to be done is to write a routine that allows a wireless double battle to work!

                          Especially if each trainer tries to catch the same Pokemon.

                          Edit: Someone made a really good point on that video. I'll have to see to it. It is using surf to kill both opposing Pokemon. But, I don't think anything special will happen.
                          As you may have realised by now, it makes absolutely no difference if you KO them both at the same time as the game runs the checks properly.

                          I've managed to iron out most of the bugs with my routines now. The only problem now is that I can't find what tile the player is standing on, and as such, can't work out probabilities for how often they should occur.

                          I was trying to cook up a way for normal grass tiles to have a 1 in 20 chance or something, with "special" grass tiles having a much higher chance. If anyone could point me in the right direction for where to get a tile ID in the RAM/ROM, I will finish this hack off, and get it posted on here for all and sundry to use.

                          Also, 100th post! :D
                          __________________
                          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
                            #39    
                          Old July 11th, 2011 (12:08 AM).
                          Darthatron's Avatar
                          Darthatron Darthatron is offline
                          巨大なトロール。
                          • Silver Tier
                           
                          Join Date: Jan 2006
                          Location: Melbourne, Australia
                          Age: 25
                          Gender: Male
                          Nature: Modest
                          Posts: 1,152
                          Quote:
                          Originally Posted by Jambo51 View Post
                          As you may have realised by now, it makes absolutely no difference if you KO them both at the same time as the game runs the checks properly.

                          I've managed to iron out most of the bugs with my routines now. The only problem now is that I can't find what tile the player is standing on, and as such, can't work out probabilities for how often they should occur.

                          I was trying to cook up a way for normal grass tiles to have a 1 in 20 chance or something, with "special" grass tiles having a much higher chance. If anyone could point me in the right direction for where to get a tile ID in the RAM/ROM, I will finish this hack off, and get it posted on here for all and sundry to use.

                          Also, 100th post! :D
                          I believe you have to read the X/Y position of the player from the RAM, then manually load the tile ID from the ROM based on that.
                          __________________
                          あなた は しきしゃ です
                          わたし は ばか です
                          Reply With Quote
                            #40    
                          Old July 13th, 2011 (9:32 AM). Edited April 26th, 2012 by Jambo51.
                          Jambo51's Avatar
                          Jambo51 Jambo51 is offline
                          Glory To Arstotzka
                             
                            Join Date: Jun 2009
                            Gender: Male
                            Nature: Quiet
                            Posts: 732
                            Here we have a newer update of the routines:

                            http://www.youtube.com/watch?v=pPUWIWztYrA

                            It's not perfect. You can't run from the battle, and you can only catch one of the Pokémon, but the music plays on winning the battle correctly now.
                            __________________
                            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
                              #41    
                            Old July 13th, 2011 (11:29 AM).
                            Pingouin_7 Pingouin_7 is offline
                            This account is now inactive
                               
                              Join Date: Oct 2008
                              Age: 23
                              Posts: 244
                              Weird.
                              I got my hands on a FireRed rom and when I checked 02022B4C it was already set to 03 for some reason.
                              Then when I edited it to 01, it started some kind of double battle with only one Pokémon on the right.

                              When I sent two Pokémon, one of them acted normal, but the second Pokéball flew all the way up to the wild Pokémon and some kind of glitchy line of mess appeared near my Pokémon's HP bar.
                              The game froze after the battle.
                              Reply With Quote
                                #42    
                              Old July 22nd, 2011 (4:59 AM). Edited July 22nd, 2011 by Liquid Twilight.
                              Liquid Twilight's Avatar
                              Liquid Twilight Liquid Twilight is offline
                              Super Geek
                                 
                                Join Date: Apr 2011
                                Location: New Bark Town
                                Age: 25
                                Gender: Male
                                Nature: Timid
                                Posts: 50
                                Wow. I glanced at this thread a day or two ago and I thought it would take you all a lot longer to get a almost fully functioning wild double battle going.

                                Now, I have no knowledge about anything you guys have done and I wouldn't know where to start implementing but in regards to running could you not run a check at the beginning of the escape routine to check if it is a double battle and if it is use a modified version of the runaway script.

                                E.g.

                                The formula for the normal Run routine is ((Speed of your pokemon) x 32 / (speed opponent) divided by 4, mod 256) plus 30 times (amount of escape attempts).

                                Edit: I forgot to add this would require the run command to be executed before any attacks happen and would require the battle to finish if successful ... but I imagine you all knew that already.

                                Also ...

                                In regards to a capture could you not force the routine to treat the captured pokemon as knocked out and then proceed with the battle as normal. Would this not enable the other pokemon to be captured? or does the game only allow for 1 capture per battle.

                                As I said, I have no knowledge of this sort of thing so please don't kill me, I'm just trying to help.

                                However for a wild double battle could it not be ((Speed of both player pokemon divide by 2) x32 / (speed of opponents) divide by 8, mod 256) plus 30 times (amount of escape attempts)

                                Thus effectively averaging out the wild pokemon to trainers pokemon ratio. If you need me to clarify the formula, just ask.
                                Reply With Quote
                                  #43    
                                Old August 19th, 2011 (11:53 PM).
                                jabberjabber8's Avatar
                                jabberjabber8 jabberjabber8 is offline
                                ../\..
                                   
                                  Join Date: Mar 2011
                                  Location: England
                                  Gender: Male
                                  Nature: Rash
                                  Posts: 213
                                  Send a message via Windows Live Messenger to jabberjabber8
                                  I have been away for some time (just over 2 months) when I left we were painfully close to managing this but by the looks of it there has not been a post in this thread for months...

                                  Does that mean wild double battles have been perfected or does it just mean we have given up?
                                  __________________


                                  Rumble rock is back, expect a BETA soon.
                                  Reply With Quote
                                    #44    
                                  Old April 26th, 2012 (7:11 PM). Edited May 12th, 2012 by Jambo51.
                                  Jambo51's Avatar
                                  Jambo51 Jambo51 is offline
                                  Glory To Arstotzka
                                     
                                    Join Date: Jun 2009
                                    Gender: Male
                                    Nature: Quiet
                                    Posts: 732
                                    EDIT: Interesting. the video decided to stop working. Look down a couple of posts. Spherical Ice reposted it for me.

                                    This is the latest on Double Wild Battles! Looking pretty good IMO, :D.
                                    __________________
                                    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
                                      #45    
                                    Old May 11th, 2012 (10:31 PM).
                                    ~Anbuja's Avatar
                                    ~Anbuja ~Anbuja is offline
                                    Let's Keep It Simple
                                       
                                      Join Date: Oct 2010
                                      Location: In Snorlax Stomach
                                      Gender: Male
                                      Nature: Lonely
                                      Posts: 321
                                      Quote:
                                      Originally Posted by Jambo51 View Post


                                      This is the latest on Double Wild Battles! Looking pretty good IMO, :D.
                                      I don't know if this is just me or not, but i can't watch the videos ;s

                                      It says theyre removed.
                                      __________________
                                      Reply With Quote
                                        #46    
                                      Old May 12th, 2012 (1:03 AM).
                                      Spherical Ice's Avatar
                                      Spherical Ice Spherical Ice is offline
                                      • Moderator
                                      • Silver Tier
                                       
                                      Join Date: Nov 2007
                                      Location: Bristol, UK
                                      Age: 19
                                      Posts: 5,152


                                      I believe this is what Jambo meant to post, haha.
                                      __________________

                                      A Pokemon that is discriminated!
                                      Support squirtle and make it everyone's favourite.
                                      Reply With Quote
                                        #47    
                                      Old August 19th, 2012 (6:40 PM).
                                      ShinyDragonHunter ShinyDragonHunter is offline
                                         
                                        Join Date: Nov 2010
                                        Gender: Male
                                        Nature: Calm
                                        Posts: 29
                                        Would it be possible to generate a double wild battle with another trainer?
                                        Like in DPPt, you can team up with Riley and fight two wild Pokémon with Riley on your side.
                                        Reply With Quote
                                          #48    
                                        Old October 18th, 2012 (11:00 AM).
                                        Herpahermaderp's Avatar
                                        Herpahermaderp Herpahermaderp is offline
                                        I liek Mudkipz
                                           
                                          Join Date: Jul 2012
                                          Location: USA
                                          Age: 19
                                          Gender: Male
                                          Nature: Relaxed
                                          Posts: 66
                                          So, Jambo, are you going to share your double battle ASM? lol
                                          Reply With Quote
                                          Reply
                                          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 6:40 PM.