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
  #1    
Old October 13th, 2012 (5:37 AM). Edited April 6th, 2015 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
    I've previously posted things involving Em's Frontier in the Quick Research thread, but it's been ages ago and they're buried under a bunch of posts. For quick reference the posts are here:

    http://pokecommunity.com/showpost.php?p=7092796&postcount=224
    http://pokecommunity.com/showpost.php?p=7115858&postcount=232
    http://bulbapedia.bulbagarden.net/wiki/Battle_Frontier_data_structures_in_Generation_III (Not my work, but a great reference)
    http://upokecenter.dreamhosters.com/games/emerald/guides/ (another great reference)


    Anyway, since I've made these posts, I've cleaned up my notes into a simpler format. Since most everything related to the Pokemon it uses is known now, I figured it'd be best to get all of my notes in one publicly viewable place that actually has traffic in the hopes somebody else will be able to make use of them.

    Battle Frontier, Slateport, Verdanturf, Fallarbor modules
    Spoiler:
    Offsets:
    Battle Frontier: 0x5D97BC
    Verdanturf Tent: 0x5DEC28
    Slateport Tent: 0x5DE02C
    Fallarbor Tent: 0x5DF69C

    These follow a twelve byte data structure.

    Species: 2 bytes
    Movepool: 8 bytes (two per move)
    Hold item: 1 byte (Determined by a master list located at 0x05CECB0)
    EV spread: 1 byte
    Nature: 1 byte
    Padding/alignment: 1 byte

    EV spreads are assigned by a bitfield to save space. Each stat with
    EVs assigned to it will have the 510 EVs divided evenly among them.

    HP: 0x1
    ATK: 0x2
    DEF: 0x4
    SPD: 0x8
    SATK: 0x10
    SDEF: 0x20


    Battle Pyramid wilds
    Spoiler:
    Offsets:
    Lv. 50: 0x6126B0
    Open Level: 0x612E80

    The Battle Pyramid wilds follow a 12 byte data structure.

    Species: 2 bytes
    Levels: 1 byte
    Unknown: 1 byte
    Movepool: 8 bytes

    In Level 50, the level byte is the Pokemon's base level when spawning.
    In Open Level, the level byte appears to be how many levels below the
    player they spawn at base. In both cases, the wilds have a few levels
    in variance.


    Frontier Brains
    Spoiler:
    Offset: 0x61156C

    Frontier Brain Pokemon are stored in a 20 byte data structure.

    Species: 2 bytes
    Item: 2 bytes
    IVs: 1 byte
    Nature: 1 byte
    HP EVs: 1 byte
    Atk EVs: 1 byte
    Def EVs: 1 byte
    Spd EVs: 1 byte
    Sp.Atk EVs: 1 byte
    Sp.Def EVs: 1 byte
    Moveset: 8 bytes

    The item can be anything the hacker desires, following normal item
    indexing instead of Frontier indexing.

    All IVs are set to whatever the IV value is. Stick with a max of 31, I
    haven't personally tried going higher.

    EVs can go above 510 total. You can give something 255 EVs in every
    stat and they all will be applied, but the game will lag a little bit
    calculating the stats.

    Each Brain's team is 120 bytes long. The first three entries are used
    in their Silver symbol challenge, and the second three are for Gold.
    Factory Head Noland's team data is two copis of Steven's team data at
    the Mossdeep event since his team is randomly generated from the
    master list as rental Pokemon.


    Battle Pike wilds
    Spoiler:
    Offsets:
    Spawn Table: 0x553934
    Lv50 wild movesets: 0x6121D4
    Open Level wild movesets: 0x612274

    The Battle Pike wilds follow a 12 byte data structure.

    Species: 2 bytes
    "Level variance": 1 byte
    Unknown (Padding?): 1 byte
    Movepool: 8 bytes

    The species byte itself does nothing but help categorize. Wilds have
    to be edited in the wild encounter table itself. Each slot in the
    moveset data is set to read a certain moveset, and the spawns are
    shared between Level 50 and Open Level challenges.

    The "level variance" field appears to be how many levels they spawn
    below the player at base.


    Lastly, here's sonic1's post on how to edit the Frontier's ban list, in case you wish to allow your players to rampage with Rayquaza or something.
    Quote:
    Originally Posted by sonic1 View Post
    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 is the main meat of the Frontier, anyway. There are other things that are worth looking into if you're planning on hacking the Frontier, and for the most part they're already indexed on the Bulbapedia page for Frontier structures.

    After a while though, I got sick of doing everything in a hex editor. I came across the Nightmare Table Editor and realized that since Frontier stuff is all in tables, it could be used to make this easier so I made a few Nightmare modules to assist in doing so.

    Nightmare is located here: http://datacrystal.romhacking.net/wiki/Nightmare_Table_Editor (apparently dead)
    Nightmare 2 is located here: http://www.romhacking.net/utilities/610/ (no idea how well this will work)
    And the modules are here: http://mediafire.com/?fb1hnme4hg7pc7e

    Hopefully, somebody with better knowledge will be able to use these to make an actual proper tool for Frontier editing. I think it was planned to be a part of PGE, but for now it's not implemented so these have to do for the time being.
    __________________
    Reply With Quote

    Relevant Advertising!

      #2    
    Old October 20th, 2012 (10:22 AM).
    Gamer2020's Avatar
    Gamer2020 Gamer2020 is offline
    Accept no Imitations!
       
      Join Date: Jun 2008
      Location: Distant Land
      Gender: Male
      Nature: Bold
      Posts: 910
      Yes this will be part of PGE I've just been very busy. This research will certainly help when I get around to working on it. Good job.
      __________________

      Reply With Quote
        #3    
      Old July 2nd, 2013 (5:53 PM).
      chaosakita chaosakita is offline
         
        Join Date: Apr 2013
        Gender: Female
        Posts: 15
        Is there any way to change the banned pokemon in the battle frontier?
        Reply With Quote
          #4    
        Old July 7th, 2013 (3:58 PM).
        Agastya's Avatar
        Agastya Agastya is offline
        Grinding failed. Item Grind level dropped by 3.
           
          Join Date: Feb 2010
          Nature: Quiet
          Posts: 72
          yes but i unfortunately forgot where the offsets are

          somebody else posted about them in the quick research thread, it'll be buried in there pagewise somewhere around where my first frontier post was
          __________________
          Reply With Quote
            #5    
          Old July 31st, 2013 (7:52 PM).
          DarkWolf13's Avatar
          DarkWolf13 DarkWolf13 is offline
          Battle Subway Editor
             
            Join Date: Dec 2011
            Location: RF HQ
            Gender: Male
            Nature: Careful
            Posts: 250
            The Nightmare Table link is dead
            __________________
            All forum members BEWARE OF THE DARK WOLF..!
            Reply With Quote
              #6    
            Old August 4th, 2013 (8:59 AM).
            Agastya's Avatar
            Agastya Agastya is offline
            Grinding failed. Item Grind level dropped by 3.
               
              Join Date: Feb 2010
              Nature: Quiet
              Posts: 72
              hm

              well, there's nightmare 2 on romhacking.net but i have no experience with it

              it also may not work happily since it's raw java

              i'd rehost nightmare 1 but i'm not sure if i have clearance to do so
              __________________
              Reply With Quote
                #7    
              Old June 15th, 2014 (5:48 AM).
              Tigerfang98's Avatar
              Tigerfang98 Tigerfang98 is offline
              Elite 4
                 
                Join Date: May 2013
                Posts: 45
                So how do you edit the frontier brain data? I don't understand. Could you post a tutorial or something?
                Reply With Quote
                  #8    
                Old June 16th, 2014 (6:57 AM). Edited June 16th, 2014 by HoneClaw.
                HoneClaw's Avatar
                HoneClaw HoneClaw is offline
                   
                  Join Date: Mar 2011
                  Gender: Female
                  Nature: Serious
                  Posts: 18
                  Quote:
                  Originally Posted by Tigerfang98 View Post
                  So how do you edit the frontier brain data? I don't understand. Could you post a tutorial or something?
                  It's not too hard. Just open up a hex editor, go the offset: 61156C. And then you should get the data for their teams. You can reference Bulbapedia for the 3rd Gen index numbers of Pokemon and compare them to the brain's team to figure out who they are.

                  For example, the first result you should see is 41 00 B3 00 18 0F 6A 00 98 98 64 00 09 00 07 00 08 00 32 00. This is Anabelle's Alakazam. After that you'll see her Entei (starts at F4) and then her Snorlax (starts at 8F). Agastya's list contains all you really need (although I am puzzled by that EV spread on Alakazam).

                  As long as you know the index numbers and such, it should be a piece of cake. Otherwise, there are probably good tutorials on here about hex editing, since I don't know of any editors for the Battle Frontier.


                  I guess the only thing I'm curious about is how it handles increasing the difficulty? There's always been accusations that the frontier "analyzes" your team, but it seems that it's solely based on win streak.

                  And for the Battle Arena, does adding extra moves break it? Since each move has a "mind" rating, how does it handle moves that are outside of the base 355?

                  EDIT: In the Battle Arena, moves past the regular index are treated normally, i.e. as 0 and nothing adverse happens to the game. Not that anyone will ever need to know this.
                  Reply With Quote
                    #9    
                  Old June 16th, 2014 (7:29 AM).
                  Danny0317's Avatar
                  Danny0317 Danny0317 is offline
                  Fluorite's back, brah
                  • Gold Tier
                   
                  Join Date: Jun 2013
                  Location: Miami, FL
                  Age: 17
                  Gender: Male
                  Nature: Hasty
                  Posts: 1,075
                  Quote:
                  Originally Posted by chaosakita View Post
                  Is there any way to change the banned pokemon in the battle frontier?
                  http://www.pokecommunity.com/showpost.php?p=7020447&postcount=201 yeah that's the post.

                  Might wanna add that to the first post

                  Also, thanks a lot for this Agastya, this will surely be helpful :D
                  __________________
                  Reply With Quote
                    #10    
                  Old June 17th, 2014 (6:01 PM). Edited June 17th, 2014 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
                    replying in the quote because i'm too lazy to format - my replies will be in bold

                    Quote:
                    Originally Posted by HoneClaw View Post
                    I guess the only thing I'm curious about is how it handles increasing the difficulty? There's always been accusations that the frontier "analyzes" your team, but it seems that it's solely based on win streak.

                    enemy ivs increase with your winning streak, and pulls trainers that use 'more powerful' pokemon the longer the streak has been going on as well. each trainer has a list of pokemon it can use so they're mostly themed, and it makes sure to avoid breaking species clause. the frontier doesn't analyze your team outside of in the battle dome, where it runs a preset routine to decide what to use.

                    And for the Battle Arena, does adding extra moves break it? Since each move has a "mind" rating, how does it handle moves that are outside of the base 355?

                    EDIT: In the Battle Arena, moves past the regular index are treated normally, i.e. as 0 and nothing adverse happens to the game. Not that anyone will ever need to know this.

                    i believe you can just repoint the mind ratings list to go to a new location. but don't quote me on that, since i have no interest in expanding my own move table.
                    __________________
                    Reply With Quote
                      #11    
                    Old February 20th, 2015 (9:27 PM).
                    apelhitam apelhitam is offline
                       
                      Join Date: Feb 2015
                      Posts: 1
                      Hi Community members,

                      I'm new to the site and I was wondering if there is a way to edit the BF win streak record?
                      Reply With Quote
                        #12    
                      Old April 5th, 2015 (3:00 PM).
                      Mister Coffee's Avatar
                      Mister Coffee Mister Coffee is offline
                      Blathering Fool
                         
                        Join Date: Sep 2011
                        Gender: Male
                        Nature: Lax
                        Posts: 879
                        I'm still learning a lot of the basics of ROM Hacking, and I had a question related to this topic but not directly correlated with what you guys are conversing about in this thread.

                        I'm doing a project on a hack that uses Fire Red as it's host ROM, I wanted to eventually design a battle frontier within my hack that is more or less an exact copy of Emerald's Battle Frontier, I'm going to be changing a bunch of other stuff in the frontier so it will not be an exact copy, but I'm not concerned about that at the moment, what I'm worried about is will I have to completely build a new battle frontier from scratch in the Fire Red hosted ROM Hack, or could I somehow copy and paste all of the pre-built battle frontier information from the Emerald ROM into my Fire Red ROM?

                        Sorry if this question is a derailment. Thanks ahead of time.
                        __________________
                        Masters of Hoenn


                        "Somewhere off in a distant world, an island exists, where the ocean only meets the sand, where the weather is always warm. An adventure begins, traveling from the vast lands into the deep seas, chasing into the heart of the tropics, where the plants are vibrant and the beasts are fantastic. We will find each other there, chasing the fleeting dreams of a land full of beauty and potential."
                        Reply With Quote
                          #13    
                        Old April 6th, 2015 (3:38 AM).
                        Agastya's Avatar
                        Agastya Agastya is offline
                        Grinding failed. Item Grind level dropped by 3.
                           
                          Join Date: Feb 2010
                          Nature: Quiet
                          Posts: 72
                          If you don't need to use FR as your base, then I would highly suggest switching to Emerald for your base or just living without a battle facility.

                          I don't doubt that you could port the Frontier to FR, but it seems like it would be more trouble than it's worth when you could simply just move on to an Emerald base and get all of Emerald's extra features as well.. but they probably pale in comparison to the freedom offered by the hacked engine, so I guess it's a moot point.
                          __________________
                          Reply With Quote
                            #14    
                          Old April 6th, 2015 (11:50 AM).
                          Mister Coffee's Avatar
                          Mister Coffee Mister Coffee is offline
                          Blathering Fool
                             
                            Join Date: Sep 2011
                            Gender: Male
                            Nature: Lax
                            Posts: 879
                            Quote:
                            Originally Posted by Agastya View Post
                            If you don't need to use FR as your base, then I would highly suggest switching to Emerald for your base or just living without a battle facility.

                            I don't doubt that you could port the Frontier to FR, but it seems like it would be more trouble than it's worth when you could simply just move on to an Emerald base and get all of Emerald's extra features as well.. but they probably pale in comparison to the freedom offered by the hacked engine, so I guess it's a moot point.
                            How complicated is it to write and edit the events and scripts that would produce a battle facility that is comparable to the battle facility within Emerald?
                            Not looking for any exact numbers, but a general idea would be helpful. Is it possible for me to just look at the scripted data within an Emerald ROM and just use the tools provided within the Fire Red ROM to recreate the battle facility? Is the amount of event and script information so large that it would take an incredible amount of time and care to replicate? Is there something about using the Fire Red ROM that would greatly hinder the progress of this kind of project, or is it simply that it is just an incredibly tedious task?
                            Thanks for the reply by the way and any future replies towards my questions.
                            __________________
                            Masters of Hoenn


                            "Somewhere off in a distant world, an island exists, where the ocean only meets the sand, where the weather is always warm. An adventure begins, traveling from the vast lands into the deep seas, chasing into the heart of the tropics, where the plants are vibrant and the beasts are fantastic. We will find each other there, chasing the fleeting dreams of a land full of beauty and potential."
                            Reply With Quote
                              #15    
                            Old April 6th, 2015 (12:40 PM).
                            jToTheAvacola jToTheAvacola is offline
                            Banned
                               
                              Join Date: Mar 2015
                              Gender: Male
                              Posts: 18
                              Quote:
                              Originally Posted by Snaggle P. View Post
                              How complicated is it to write and edit the events and scripts that would produce a battle facility that is comparable to the battle facility within Emerald?
                              Not looking for any exact numbers, but a general idea would be helpful. Is it possible for me to just look at the scripted data within an Emerald ROM and just use the tools provided within the Fire Red ROM to recreate the battle facility? Is the amount of event and script information so large that it would take an incredible amount of time and care to replicate? Is there something about using the Fire Red ROM that would greatly hinder the progress of this kind of project, or is it simply that it is just an incredibly tedious task?
                              Thanks for the reply by the way and any future replies towards my questions.
                              I've been planning on porting the Frontier to FR for some time.

                              You can't simply copy and paste things from Emerald to FR. There's a lot of differences in commands and certain special commands that only exist in Emerald.

                              You'll have to learn how to insert ASM routines into your ROM if you haven't already. The Battle Pyramid and Battle Tower are pretty easy with the available resources.

                              The Factory and Arena would be really hard and I'd have no clue how to do them without FBI coming up with custom ASM for them.

                              The Pike can definitely be done with a lot of scripting. The Palace would be easier to recreate by changing the rules slightly and making it that pokemon just use random moves.

                              So yeah, I'd say the main problems are the Factory and Arena. I also had no idea how to recreate the tournament format of the Dome but I haven't looked at it super in-depth yet.
                              Reply With Quote
                                #16    
                              Old April 6th, 2015 (1:10 PM).
                              Mister Coffee's Avatar
                              Mister Coffee Mister Coffee is offline
                              Blathering Fool
                                 
                                Join Date: Sep 2011
                                Gender: Male
                                Nature: Lax
                                Posts: 879
                                Quote:
                                Originally Posted by jToTheAvacola View Post
                                I've been planning on porting the Frontier to FR for some time.

                                You can't simply copy and paste things from Emerald to FR. There's a lot of differences in commands and certain special commands that only exist in Emerald.

                                You'll have to learn how to insert ASM routines into your ROM if you haven't already. The Battle Pyramid and Battle Tower are pretty easy with the available resources.

                                The Factory and Arena would be really hard and I'd have no clue how to do them without FBI coming up with custom ASM for them.

                                The Pike can definitely be done with a lot of scripting. The Palace would be easier to recreate by changing the rules slightly and making it that pokemon just use random moves.

                                So yeah, I'd say the main problems are the Factory and Arena. I also had no idea how to recreate the tournament format of the Dome but I haven't looked at it super in-depth yet.
                                Sounds Interesting. Seriously, I'm very interested.
                                I'm relatively new to ROM Hacking, I'm seriously just learning everything new and have been following a tutorial. However, I am doing a lot of experimenting with lots of different things and trying to learn more of the complicated features of making a ROM hack with large amounts of end game content, one of which was intended to be a battle frontier. However I had defaulted into messing around mostly with a Fire Red ROM. I will admit what I've done so far, it's not a ton of progress, so if I have to I'll just switch over to an Emerald ROM if that's really the only way.
                                However, although I'm fairly novice in all of this experience, I would still love to help you research the Battle Frontier in order to attempt recreating it within the Fire Red ROM, even if I don't use it for what I'm trying to build right now. If you point me in the right direction and don't mind a few noob questions here and there, I'm willing to help try to make sense of it.
                                __________________
                                Masters of Hoenn


                                "Somewhere off in a distant world, an island exists, where the ocean only meets the sand, where the weather is always warm. An adventure begins, traveling from the vast lands into the deep seas, chasing into the heart of the tropics, where the plants are vibrant and the beasts are fantastic. We will find each other there, chasing the fleeting dreams of a land full of beauty and potential."
                                Reply With Quote
                                  #17    
                                Old April 6th, 2015 (1:51 PM).
                                Agastya's Avatar
                                Agastya Agastya is offline
                                Grinding failed. Item Grind level dropped by 3.
                                   
                                  Join Date: Feb 2010
                                  Nature: Quiet
                                  Posts: 72
                                  Quote:
                                  Originally Posted by jToTheAvacola View Post
                                  The Palace would be easier to recreate by changing the rules slightly and making it that pokemon just use random moves.
                                  Then you're not in the Battle Palace, you're in the Battle Roulette.

                                  Porting over the Frontier to FR isn't something that you can just do with the "good enough" mentality that seems to still persist here at times, it's either all or nothing in accuracy. I'm unsure as of why people are still adamantly against using Emerald for bases instead of Fire Red considering that we know how to do a lot more stuff in it and we know that the game isn't "unstable" but it really does need to come up in consideration more often.
                                  __________________
                                  Reply With Quote
                                    #18    
                                  Old April 6th, 2015 (3:05 PM).
                                  jToTheAvacola jToTheAvacola is offline
                                  Banned
                                     
                                    Join Date: Mar 2015
                                    Gender: Male
                                    Posts: 18
                                    Quote:
                                    Originally Posted by Snaggle P. View Post
                                    Sounds Interesting. Seriously, I'm very interested.
                                    I'm relatively new to ROM Hacking, I'm seriously just learning everything new and have been following a tutorial. However, I am doing a lot of experimenting with lots of different things and trying to learn more of the complicated features of making a ROM hack with large amounts of end game content, one of which was intended to be a battle frontier. However I had defaulted into messing around mostly with a Fire Red ROM. I will admit what I've done so far, it's not a ton of progress, so if I have to I'll just switch over to an Emerald ROM if that's really the only way.
                                    However, although I'm fairly novice in all of this experience, I would still love to help you research the Battle Frontier in order to attempt recreating it within the Fire Red ROM, even if I don't use it for what I'm trying to build right now. If you point me in the right direction and don't mind a few noob questions here and there, I'm willing to help try to make sense of it.
                                    I'll answer any questions for you I can. I'm not a master hacker either but it will be very possible to port the entire Frontier if we really put forth the effort.

                                    Quote:
                                    Originally Posted by Agastya View Post
                                    Then you're not in the Battle Palace, you're in the Battle Roulette.

                                    Porting over the Frontier to FR isn't something that you can just do with the "good enough" mentality that seems to still persist here at times, it's either all or nothing in accuracy. I'm unsure as of why people are still adamantly against using Emerald for bases instead of Fire Red considering that we know how to do a lot more stuff in it and we know that the game isn't "unstable" but it really does need to come up in consideration more often.
                                    Fair enough, but I don't think there would be much of a difference in gameplay experience. They might as well be using random moves. Regardless, even the real Palace is feasible, it would just be very annoying having to account for each individual move. Still it wouldn't be the one I'd be worried about.
                                    Reply With Quote
                                      #19    
                                    Old April 6th, 2015 (7:46 PM).
                                    Agastya's Avatar
                                    Agastya Agastya is offline
                                    Grinding failed. Item Grind level dropped by 3.
                                       
                                      Join Date: Feb 2010
                                      Nature: Quiet
                                      Posts: 72
                                      Pokemon do not use entirely random moves in the Battle Palace, and it is completely possible to build a strategy around it. For example, the Gentle nature has an 18% chance to attack, 70% chance to set up, and a 12% chance to use a status move when above 50% HP. When their HP drops, they will shoot up to a 90% chance to use an attacking move. You can raise a somewhat bulky Pokemon with a Gentle nature and give it a moveset that includes Swords Dance and a priority move and it will more often than not perform in a consistent manner (set up, then attack).

                                      Another important factor is that the AI will not attack at all if they try to use a type of move that they don't have. In the situation you described, choosing random moves, the player can just put one or two powerful attacking moves on their Pokemon and call it a day with no punishment at all.

                                      There is a difference in the gameplay experience, but only to users who would care enough to go for a win streak there. If you don't fully care about something, then you shouldn't implement it and disappoint the people that do care.
                                      __________________
                                      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 4:28 PM.