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

Reply
 
Thread Tools
  #51    
Old December 20th, 2014 (8:05 PM).
Exelis'20 Exelis'20 is offline
Cancer
     
    Join Date: Dec 2014
    Location: Paris, France
    Gender: Male
    Nature: Jolly
    Posts: 22

    Dude Thanks very much! I've inserted already 6 of the battle backgrounds in PLatinum to my ROM. Thanks very much! :D

    __________________

    "For everything we do, all that really matters are results."

    Current Hack:
    Pokemon Exelis Version

    Pokemon Exelis Version Facebook Page:
    Pokemon Exelis Facebook Page

    Reply With Quote

    Relevant Advertising!

      #52    
    Old December 22nd, 2014 (6:50 PM).
    You Watanabe's Avatar
    You Watanabe You Watanabe is offline
    Now Leaving...
       
      Join Date: Feb 2014
      Location: Shiganshina District, Wall Maria
      Gender: Female
      Nature: Adamant
      Posts: 430

      Quote:
      Originally Posted by Lance32497 View Post
      ahhm ok, but may I leave these blank? because I Changed the palettes of the battle bg

      If you are going to make them blank, well, you just need a new blank image (all transparent) and a tileset of the blank image. And, kinda less fancy. If you are changing the background image palettes, it doesn't change the entry image palettes (if you are staying with the same offset of the original palette). Don't worry about it, entry image palette are handled separately from it. :3

      I'll make a post of explanation of palettes later once I have figured out things.

      __________________


      Userpage

      Pokémon Dark Jade Version (Coming Soon!)

      The Omsoc Empire (Coming Soon!)

      Reply With Quote
        #53    
      Old December 23rd, 2014 (12:19 PM).
      wally-217's Avatar
      wally-217 wally-217 is offline
         
        Join Date: Nov 2012
        Location: Yorkshire, UK
        Gender: Male
        Posts: 95

        OK, I tried inserting a new battle background on Emerald using the information
        Raileys posted and I end up with something looking like this:

        Spoiler:

        If it helps, I completely ignore the original tutorial and just imported it straight into UnLZ. The background seems to be fine, it's just the platform thing.

        __________________

        Reply With Quote
          #54    
        Old January 7th, 2015 (6:57 AM). Edited January 7th, 2015 by HerobrineHunter.
        HerobrineHunter's Avatar
        HerobrineHunter HerobrineHunter is offline
           
          Join Date: Dec 2014
          Location: IN THE WORLD OF POKEMON
          Gender: Male
          Posts: 10

          Can you insert that Battle BG in my rom . Haha Dont mind helping me ?

          Plss!

          Reply With Quote
            #55    
          Old January 23rd, 2015 (10:47 PM).
          LeiAlcantara025's Avatar
          LeiAlcantara025 LeiAlcantara025 is offline
          Hack Expert Most IN Mapping
             
            Join Date: Jun 2014
            Gender: Male
            Posts: 67

            Ca Someone Taught Me How To insert like this Battle Back grounds? In Fire Red? No worry I have my own Battle BG Since Kyledove Forbid anyone to UseThis

            __________________

            Pokemon Freezing Dawn

            Im A Mapper Expert Invite me In a Good Projects If I Have Time
            Pokemon Hacking Is So Complicated,If You Understand It Correctly You'll Become An Expert

            Reply With Quote
              #56    
            Old February 3rd, 2015 (2:32 AM). Edited February 22nd, 2016 by You Watanabe.
            You Watanabe's Avatar
            You Watanabe You Watanabe is offline
            Now Leaving...
               
              Join Date: Feb 2014
              Location: Shiganshina District, Wall Maria
              Gender: Female
              Nature: Adamant
              Posts: 430

              Manipulating Battle Background Palette


              Have anyone wondered why the palettes of different battle backgrounds having twelve, thirteen, or sixteen (the transparent color counts) colors. Sometimes you want sixteen colors for the background and you want to maintain the original offset (only replacing values from it), but the original palette has only fifteen available colors. Solution to it? I have already found it out! I have amassed data to examine different palettes from different background. Then, finally, I have found one that can be universal to the maximum of sixteen colors (however, it is not only just the colors of the background… you will find out). Here’s the data as promised:

              Code:
              10 60 00 00 00
              00 00 DC 73 1B 4B 7E 57 00 7C 5F 3C 4F 9A 67 5D 53 00 7E 57 3D 53 5C 53 A8 4E 00 0C 5B 51 6B 94 6F B8 73
              80 10
              1F B9 42 5D 53 7D 5F DA 00 46 9D 6F 1B 4B 3C 4F FB 40 4A
              B0 1F
              5F 23 DF 63 5F 2B 02 9F 3B DF 43 00 00
              F0 01 00 00

              Let me explain. The data is a set of compressed palette. Each palette data contains three parts: the First Base, the Second Base, and the Entry Image Palette.

              • The red-bolded values are the First Base which is controlled in the 0x2 palette control in the tilemap. Literally, this is the basic and the main layer for the colors of the background. Noted that there are 2 bytes each color. After four colors, there is a stray byte which is 00 and is not always 00. The First Base contains sixteen colors (subtract one for the transparent color which is at the start of the palette).
              • The orange-bolded values are the Second Base which is controlled in the 0x3 palette control in the tilemap. This is the second layer of palettes for the background. It contains eight colors. In the fourth color, there is an insertion of the stray byte “00” between the two values. Then in the eight color, there is also an insertion of the stray byte “40” between the two values.
              • The green-bolded values are the Entry Image Palette which is used for the palette for the image-that-animates-to-the-left-then-disappears as you can see in the flow in the intro of a battle. It contains six colors and the stray bytes “02” appears after the third one. They can only be five colors but the highest possible is six colors (the rock entry image in the cave background having six). So, the sixth slot at 00 00 before the F0 01 is safe to use.
              I still don’t know how compressed palettes works but I have explained everything as far as I know. You may use this as the palettes for all available backgrounds. This palette data is ripped off from Elite Four Sidney's palette but if you use this data to other backgrounds, it will still work just focus on byte ordering and changing. You have a new grass background with this format is okay. If you want to maintain the entry image palette, just copy the palette used for the entry image just by looking at VBA's palette and image viewer.

              __________________


              Userpage

              Pokémon Dark Jade Version (Coming Soon!)

              The Omsoc Empire (Coming Soon!)

              Reply With Quote
                #57    
              Old February 27th, 2015 (2:50 PM).
              AceRoku's Avatar
              AceRoku AceRoku is offline
              Dev of Pokemon Flare
                 
                Join Date: Feb 2015
                Gender: Male
                Posts: 28

                Great ! This tutorial is very user-friendly. I'd recommend reading this.

                __________________

                Pokémon Flare - Coming SOON

                Looking for scripters,mappers and tile inserters (all sort of persons who can help me) on Pokémon Flare.
                If you're interested, feel free to leave me a VM/PM

                Reply With Quote
                  #58    
                Old October 15th, 2015 (10:44 AM).
                Cruztown's Avatar
                Cruztown Cruztown is offline
                Squirtle Squirt.
                   
                  Join Date: Jul 2012
                  Gender: Male
                  Nature: Rash
                  Posts: 44

                  Out of curiosity, what ties the battle backgrounds to Nature Power? How does it handle adding more backgrounds? Does it just default to Swift, or is there a separate table somewhere in the rom?

                  Reply With Quote
                    #59    
                  Old October 15th, 2015 (10:53 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,202

                  Quote:
                  Originally Posted by Cruztown View Post
                  Out of curiosity, what ties the battle backgrounds to Nature Power? How does it handle adding more backgrounds? Does it just default to Swift, or is there a separate table somewhere in the rom?

                  Doesn't Nature Power just go off of the map itself (the Inside, Route, Underground etc. settings in A-Map) and behaviour bytes?

                  __________________


                  A Pokemon that is discriminated!
                  Support squirtle and make it everyone's favourite.

                  Reply With Quote
                    #60    
                  Old October 15th, 2015 (4:25 PM).
                  Cruztown's Avatar
                  Cruztown Cruztown is offline
                  Squirtle Squirt.
                     
                    Join Date: Jul 2012
                    Gender: Male
                    Nature: Rash
                    Posts: 44

                    Quote:
                    Originally Posted by Spherical Ice View Post
                    Doesn't Nature Power just go off of the map itself (the Inside, Route, Underground etc. settings in A-Map) and behaviour bytes?

                    That might explain it. Looking at Hoenn (Emerald, BPEE), the desert on Route 111 is still marked as a plain "Route" with regular weather, yet has Earthquake as the called move, so behavior bytes would be the only thing I could immediately think to check.

                    Reply With Quote
                      #61    
                    Old October 15th, 2015 (8:28 PM).
                    Lance32497's Avatar
                    Lance32497 Lance32497 is offline
                    LanceKoijer of Pokemon_Addicts
                       
                      Join Date: Aug 2014
                      Location: Criscanto town-Ginoa Region xD
                      Gender: Male
                      Nature: Adamant
                      Posts: 793

                      Too bad, karatekid552's BattleBG Hack's link is broken

                      __________________

                      This signature has been disabled.
                      Scrollbar appears
                      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
                        #62    
                      Old October 20th, 2015 (10:41 PM).
                      Lance32497's Avatar
                      Lance32497 Lance32497 is offline
                      LanceKoijer of Pokemon_Addicts
                         
                        Join Date: Aug 2014
                        Location: Criscanto town-Ginoa Region xD
                        Gender: Male
                        Nature: Adamant
                        Posts: 793

                        Quote:
                        Originally Posted by karatekid552 View Post
                        The Data Behind Battle Backgrounds

                        Now that DrFuji has taught you how to edit Battle Backgrounds, I am going to take you into the data aspect. For right now, this lesson will just be for FireRed. If you do want it for another game and you are actually going to use it, I will attempt to do my best to help you.

                        To start off with, apply the patch at the bottom of this post to your rom. What it does is move the battle BG table to 0xF10000 where we can work with and expand it, and it also hacks the BG loading routine with branches placed 0xF00000 (I will completely explain this later).

                        The Table

                        To be honest, the table is quite simple. To start off, it has 20 backgrounds already in it designated by Game Freak. They are as follows:

                        1. Grass
                        2. Grass2
                        3. Sand
                        4. Field
                        5. Pond Sea
                        6. Sea Pond
                        7. Craggy
                        8. Cave
                        9. Multi/Indoor- White & Grey & some Yellow in the Palette (Normal Trainer Battle)
                        10. Multi/Indoor- Green & a little Yellow (Rival Trainer Battle)
                        11. Multi/Indoor- White & Grey ()
                        12. Multi/Indoor- White & Grey & some Tan in the Palette ("Gym" Trainer Battles (that option in A-Map))
                        13. Multi/Indoor- White & Grey & some Tan in the Palette (2) ("Gym" Gym Leader battle (yes the Leaders have different BG))
                        14. Multi2/Indoor2- White & Grey
                        15. Multi2/Indoor2- White & Grey & some Purple in the Palette
                        16. Multi2/Indoor2- Blue & some Tan in the Palette
                        17. Multi2/Indoor2- Yellow & Tan
                        18. Multi2/Indoor2- Purple & some Tan in the Palette
                        19. Multi2/Indoor2- Turquoise & some Tan in the Palette
                        20. Multi2/Indoor2- White & Grey & some Purple in the Palette

                        For each background, there are 5 pointers in order with this format:

                        Code:
                        VV VV VV 08 WW WW WW 08 XX XX XX 08 YY YY YY 08 ZZ ZZ ZZ 08

                        VV = Image Offset WW = TileMap Offset XX = Entry Image (Ex. The Grass that moves in front of the screen at the beginning of a grass battle.) YY = Entry Image Tilemap ZZ = Palette

                        Here is the documentation of each background and their pointers in the original table:

                        Spoiler:
                        Grass Background

                        VV = 24844C
                        WW = 2489A8
                        XX = 248C68
                        YY = 248F58
                        ZZ = 248400

                        Second Grass Background (There are two Grass Images in FR, I don't know the reason.)

                        VV = 2490C4
                        WW = 249620
                        XX = 2498DC
                        YY = 249E10
                        ZZ = 249074

                        Sand Background

                        VV = 249FE4
                        WW = 24A37C
                        XX = 24A618
                        YY = 24A844
                        ZZ = 249F98

                        Field Background

                        VV = 24A990
                        WW = 24ACD0
                        XX = 24AF70
                        YY = 24B0DC
                        ZZ = 24A940

                        Pond Sea Background

                        VV = 24B1EC
                        WW = 24B608
                        XX = 24B8A8
                        YY = 24BBE0
                        ZZ = 24B19C

                        Sea Pond Background

                        VV = 24BD38
                        WW = 24C07C
                        XX = 24C314
                        YY = 24C520
                        ZZ = 24BCE0

                        Craggy Background (Don't know what this is supposed to be called)

                        VV = 24C624
                        WW = 24C9B8
                        XX = 24CBF8
                        YY = 24CEC8
                        ZZ = 24C5D8

                        Cave Background

                        VV = 24CFEC
                        WW = 24D418
                        XX = 24D6B8
                        YY = 24DC98
                        ZZ = 24CF98

                        Multi-type Backgrounds/Indoor Backgrounds (Usually appears in Trainer Battles)

                        -There are 5 different ones in a row. They use the same setup, but different palettes.
                        VV = 24DE34
                        WW = 24E16C
                        XX = 24E410
                        YY = 24E490
                        ZZ =
                        1. 24DDF0
                        2. 24E81C
                        3. 24E528
                        4. 24E56C
                        5. 24E5B8

                        Another set of Multi-type backgrounds/Indoor Backgrounds. This set has 7.

                        VV = 24E858
                        WW = 24EB90
                        XX = 24E410
                        YY = 24E490
                        ZZ =
                        1. 24E604
                        2. 24E650
                        3. 24E6A4
                        4. 24E6F0
                        5. 24E740
                        6. 24E78C
                        7. 24E7DC

                        So, expanding this is really quite simple. Just follow the setup of the table and add on to the end. Don't delete any of them if you are not going to replace them. This may sound obvious, but you never know what people will do:p.

                        So, I expanded it... Now what?

                        This is probably what you are thinking after completing the above. This is where the hack of the loading routine that comes in. What it does is allows you to very easily change the battle background to whatever you wish.

                        If you remember, all of the backgrounds are in order. If the first grass is 0, then numbering from there will give you the number of background, which means that background slots from 0 to 19 are already filled. So, let's say we add 4 more backgrounds to the end of the table: Fire, Snow, Storm, and Metal, respectively.

                        The games coding does not directly allow access to these backgrounds, which is what the hacked routine does. Basically, it branches to a section of ASM that checks var 0x40F7. If this var is set to 0, it will automatically return to the regular routine and continue as normal. However, if it is set to any other number, the routine will operate from there and load the battle background of that number instead.

                        So, if you set var 0x40F7 to 20, then the Fire background will be loaded. If you set it to 22, then the Storm bg will be loaded, and so on. This will stay until you change it to something else. In order to return to the normal background for that map, then you simply set the var to 0.

                        Please note that this routine overrides every type of battle. This means you can change trainer battles, sea battles, grass battles, cave battles, etc, all by setting that one var. Also, the routine loads a half-word, not a byte, which means that you can have up to 0xFFFF backgrounds in the table, which is a little over 65,000. Granted, there isn't enough space in the rom to have unique backgrounds in each slot, but don't worry about over expanding the table. You won't have a problem there.

                        Well, that about wraps this up. Originally I had planned to give you the ASM routines and explain how to use them, but that got overly complicated with the branches, so I made it really simple with the patch.

                        Also, I did my best to make this compatible with both JPAN's engine and Jambo51's 649 patch. I haven't tested it on either, but I asked Jambo if there would be any complications or things I should avoid and the only thing he gave me was which var to use since he had used a few. For JPAN's, I avoided using any RAM that he used (which didn't matter in the end because Jambo had me switch to a var) and I don't think he had any routines and such that would affect this.

                        In order to make this even better for people, on case you have already used the free space at 0xF00000, I have included the source code here:

                        You can do as you wish with this code.

                        If there are complications, please let me know!

                        ~Credits!

                        Driver - Driver was an old-time German hacker whom originally accomplished this for his own hack. Instead of using a var, he freed up some RAM and used that. About two months ago, I received a rom and some notes of his from Narutoactor via Tajaros. It took me a while to make heads or tails of them, but once I did, I set out to port it over to English FireRed and this was the result! So, most of the credit goes to him!

                        Jambo51 - A HUGE help in making this. He taught me how to access vars and answered a lot of questions. I know he hates people bugging him with questions, so I really appreciate him not ignoring me!

                        Darthatron - For being a really good friend and giving me a lot of help. When I was stuck and didn't have access to the var_access routine due to being on the go, but I still wanted to write up the ASM for it, he Pastied it me and I got a lot done. As usual, he also answered a lot of questions and was really helpful.

                        Mat - While I didn't end up using it because I switched to a var, Mat spent over an hour helping me try to find some free save-able RAM for this project. I really appreciated the time he gave me as we explored the save blocks and got almost nowhere, but he stuck with me until he had to go, so I have to give him a huge thanks!

                        Tajaros (Not Shadowraze, this was before the switch:p) - For starting this whole project by sending me all of Drivers stuff and asking for my help in deciphering it. He also decoded a lot of the table and documented the first 9 backgrounds before I even started working, which was a huge help.

                        Narutoactor - For sharing all of Driver's research, and attempting to help me contact Driver which, unfortunately, never happened.

                        Lastly, Drfuji - For digging into the archives and redoing his old private bg editing tutorial and completely rewriting it to go along with this research to make this ultimate guide to hacking battle backgrounds.

                        Well, that is all for now! On to the next project.... !

                        ~karatekid552

                        Does anyone have the file of bg hack uploaded by karatekid552 or just the source code of it?

                        __________________

                        This signature has been disabled.
                        Scrollbar appears
                        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
                          #63    
                        Old October 21st, 2015 (12:01 AM).
                        BlackWhiteRobin's Avatar
                        BlackWhiteRobin BlackWhiteRobin is offline
                           
                          Join Date: Sep 2012
                          Age: 19
                          Gender: Male
                          Nature: Quirky
                          Posts: 537

                          Quote:
                          Originally Posted by Lance32497 View Post
                          Does anyone have the file of bg hack uploaded by karatekid552 or just the source code of it?

                          OH! Lucky you! I was just scrolling through my old files and saw this. Hope it helps! Happy hacking!

                          Battle BG Hack BPRE.ips

                          __________________


                          Reply With Quote
                            #64    
                          Old October 21st, 2015 (12:21 AM). Edited October 21st, 2015 by Spherical Ice.
                          Lance32497's Avatar
                          Lance32497 Lance32497 is offline
                          LanceKoijer of Pokemon_Addicts
                             
                            Join Date: Aug 2014
                            Location: Criscanto town-Ginoa Region xD
                            Gender: Male
                            Nature: Adamant
                            Posts: 793

                            Quote:
                            Originally Posted by BlackWhiteRobin View Post
                            OH! Lucky you! I was just scrolling through my old files and saw this. Hope it helps! Happy hacking! ^_^

                            Attachment 76880

                            Thank you! You made my day! Thanks!

                            __________________

                            This signature has been disabled.
                            Scrollbar appears
                            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
                              #65    
                            Old February 23rd, 2016 (5:11 PM).
                            chekoikan's Avatar
                            chekoikan chekoikan is offline
                               
                              Join Date: Jul 2015
                              Gender: Male
                              Nature: Relaxed
                              Posts: 4

                              Hi everyone! I need help with something about battle backgrounds.

                              I'm editing Pokemon Ruby for the first time and I want to change the battle backgrounds in some places. I don't want to insert custom backgrounds but to switch the background is shown for another background from Gamefreak. For example, I want the Battle Tower to have this background from the Elite Four ( vizzed.com/vizzedboard/retro/user_screenshots/saves7/74397/GBA--Pokemon%20Ruby%20Destiny%20Reign%20of%20Legends_Jul11%2012_08_04.png ) instead the simple original one ( i.ytimg.com/vi/n7idSlLPxMA/hqdefault.jpg ).

                              I've been weeks looking for a way to do this and I always come to this post. After reading all the three pages over and over and trying to familiarize myself with HEX editors I'm still confused and I don't know what to do. I don't usually look for help in forums but I'm desperate.

                              In addition, Is there any tool like "Battle Frontier Editor" for the Pokemon Ruby Battle Tower? The background and the pokemon are the only things I have left.

                              Thanks

                              Reply With Quote
                                #66    
                              Old November 12th, 2016 (6:41 AM).
                              xpokform16x's Avatar
                              xpokform16x xpokform16x is offline
                                 
                                Join Date: Jun 2013
                                Gender: Male
                                Posts: 2

                                Good day Sir...
                                can someonehelp me because im trying to insert indoor battle BG on fire red then... when im in the process of editing the pallets on HXD i encounter this

                                Fire red.png
                                (On the left side is actual game on the right side is mock up one and also the result i want)

                                Its look like the the pallets are collaborating or combining...
                                i double check the image and the pallets...I also opened it on NTME to see if i get the same result but it showed me the right battle bg with right pallets i also tried to edit the field battle BG pallet and i successfully edited it just the indoor pallets...I think there is a pallet limiter or something that so can someone help me ? and point out the problem(s)?

                                haha sorry for my bad english...
                                Credit to skyHigh for his Dark Crystal indoor battle BG that i used...

                                __________________

                                ...

                                Reply With Quote
                                  #67    
                                Old November 20th, 2016 (1:02 AM).
                                Compumax's Avatar
                                Compumax Compumax is offline
                                   
                                  Join Date: Oct 2014
                                  Gender: Male
                                  Posts: 16

                                  Quote:
                                  Originally Posted by karatekid552 View Post
                                  The Data Behind Battle Backgrounds

                                  Now that DrFuji has taught you how to edit Battle Backgrounds, I am going to take you into the data aspect. For right now, this lesson will just be for FireRed. If you do want it for another game and you are actually going to use it, I will attempt to do my best to help you. ...

                                  Please! You can reupload the Battle Background Hack.ips and theBattle BG Hack Source Code

                                  Thanks

                                  Reply With Quote
                                    #68    
                                  Old November 21st, 2016 (2:13 PM). Edited December 15th, 2016 by BluRose.
                                  BluRose BluRose is offline
                                  blu rass
                                     
                                    Join Date: Apr 2014
                                    Location: hyakkoku city
                                    Age: 16
                                    Gender: Male
                                    Nature: Timid
                                    Posts: 665

                                    Quote:
                                    Originally Posted by Compumax View Post
                                    Please! You can reupload the Battle Background Hack.ips and theBattle BG Hack Source Code

                                    Thanks

                                    i know that you ended up finding it on WaH but for future reference anyways/those that desire to get this in the future
                                    http://wahackforo.com/361466-post11.html
                                    Spoiler:
                                    Code:
                                    .align 2
                                    .thumb 

                                    /*Well, this is the source code for the battle bg hack. Pretty simple stuff. When the battle bg is loaded, the game stores the background number to be loaded in r0. This hack branches the routine right after that to check the var and if there is something in it, load that as the new background.

                                    The branches to this routine (BPRE only) need to be done as follows:

                                    0x0800F26C= change "ldr r5, #0x0824EE34" to "ldr r5, #0x08F00001" (or the location you choose to put this routine at.) 0x0800F26E= change "lsl r4,r0,#0x2" to "bx r5" 0x0800F270= change "add r4,r4,r0" to "pop {r5}"

                                    0x0800F2B8= change "ldr r5, #0x0824EE34" to "ldr r5, 0x08F00041" (The location Main2 begins at, +1. It was 0x08F00031 in the patch) 0x0800F2BA= change "lsl r4,r0,#0x2" to "bx r5" 0x0800F2BC= change "add r4,r4,r0" to "pop {r5}"

                                    Now, at 0x0800F320, 0x0800FD5C, and 0x0800FD88 change the pointer (which points to the original bg table [0x0824EE34]) to the new BG table location which is 0x08F10000 in here and the patch.

                                    This source is based off what is in the patch. It is ment to modified so that hackers who have already used 0xF00000+ in their hacks can have flexibility in the location of the routine.

                                    I haven't tested this routine as it is, but it should work... "Should" being the key word... The reason being, I was given the routine without the var_loader already in a German Rom and I branched it later to include the var_loader, so this source code is the all in one.*/

                                    .org 0xF00000 Main: ldr r5, new_bg_table push {r5} push {r1} bl varloader

                                    post_var_loader: cmp r1,#0x0 beq return mov r0,r1

                                    return: pop {r1} ldr r5, return_offset lsl r4,r0,#0x2 add r4,r4,r0 bx r5

                                    varloader: push {r0, r2} ldr r0, var_id bl call_decrypt ldrh r0, [r0] mov r1, r0 pop {r0,r2} bl post_var_loader

                                    call_decrypt: ldr r2, vardecrypt bx r2

                                    .align 2

                                    var_id: .word 0x000040F7 vardecrypt: .word 0x0806E455 new_bg_table: .word 0x08F10000 return_offset: .word 0x0800F271

                                    .align 2

                                    Main2: ldr r5, new_bg_table2 push {r5} push {r1} bl varloader2

                                    post_var_loader2: cmp r1,#0x0 beq return2 mov r0,r1

                                    return2: pop {r1} ldr r5, return_offset2 lsl r4,r0,#0x2 add r4,r4,r0 bx r5

                                    varloader2: push {r0, r2} ldr r0, var_id2 bl call_decrypt2 ldrh r0, [r0] mov r1, r0 pop {r0,r2} bl post_var_loader2

                                    call_decrypt2: ldr r2, vardecrypt2 bx r2

                                    .align 2

                                    var_id2: .word 0x000040F7 vardecrypt2: .word 0x0806E455 new_bg_table2: .word 0x08F10000 return_offset2: .word 0x0800F2BC

                                    EDIT: oh and hey look at that the patch as well <3

                                    __________________

                                    s u m m e r

                                    Reply With Quote
                                      #69    
                                    Old January 4th, 2017 (3:15 PM).
                                    Trev's Avatar
                                    Trev Trev is offline
                                    starting my comeback tour
                                       
                                      Join Date: May 2012
                                      Location: anywhere as long as I have dogs
                                      Age: 20
                                      Gender: Male
                                      Nature: Sassy
                                      Posts: 1,234

                                      Hi all! This thread is a little old, but as I've been working with battle backgrounds for the past day and half, I figured I should add this stuff to the thread.

                                      Quote:
                                      Originally Posted by DrFuji View Post
                                      • The Gym battle background is linked to the field and three other backgrounds. Their palettes are incredibly garbled and you would be lucky to get more than 7-8 colours out of them.

                                      I want to point out that this is total bullmuk and that you can absolutely use more than 7 - 8 colors on a "Gym" background. First off, the field background is not connected to the "gym" background at all. The field background is actually never loaded. Look at this part of karatekid552's post.

                                      Quote:
                                      Originally Posted by karatekid552 View Post
                                      9. Multi/Indoor- White & Grey & some Yellow in the Palette (Normal Trainer Battle)
                                      10. Multi/Indoor- Green & a little Yellow (Rival Trainer Battle)
                                      11. Multi/Indoor- White & Grey ()
                                      12. Multi/Indoor- White & Grey & some Tan in the Palette ("Gym" Trainer Battles (that option in A-Map))
                                      13. Multi/Indoor- White & Grey & some Tan in the Palette

                                      This gets some things right but not all of them. The bolded part is the part that's wrong. For some weird, unexplained reason, GameFreak did a GameFreak and used the indoor tileset and tilemap for non-grass outdoor areas and simply slapped on a different palette for it. I have absolutely no idea whatsoever why they did this instead of, you know, using the background dedicated specifically for fields, which would encompass 90% of the routes, but that's irrelevant. What is relevant is that the field palette is something completely different from the "Gym palette."

                                      The second part is the garbled palette and how we can/can't use it. DrFuji and karatekid mistakenly said that the palette was most unusable because it was "linked" to the field palette. This is pretty untrue. The palettes are compressed differently than the previous 8 backgrounds. While they are hard to edit directly in the hex editor, there is absolutely a way to change them and to use more than 7 - 8 colors. If you insert a palette into free space by using GBA Graphics Editor, and then use a hex editor to copy/paste-write all that palette data overtop the old palettes, you can have more than 7 - 8 colors and you won't have to go through the headache of trying to decode the palettes yourself in a hex editor. I've managed to use max 11 colors, but you might be able to use more. I'm pretty sure the compression omits some colors in the hex but loads them... separately somehow? I'm not entirely sure on the mechanics of the compression but I know for a fact that you aren't limited to 7 - 8.

                                      Also, something interesting to note. If you look at entries 9-13 in the table, you'll notice that they all use the same pointers for everything but the palettes. You can repoint these individually to different images. For example, if you want to have a field background that doesn't depend on the indoor tileset/tilemap, you can insert the tileset and tilemap you want to use into free space and then change the tileset/tilemap pointers in entry 10 to those pointers. That way, you can have indoor backgrounds while also having a custom outdoor non-grass background that isn't just a palette-swapped indoor version (you can do the same for the entry images as well). Note, though, that unless you use the battle background hack, you can't load specific backgrounds and the backgrounds will load based on the pointers in the entry, as they did before. They'll just load different data if you change the pointers.

                                      __________________

                                      Projects

                                      Reply With Quote
                                        #70    
                                      Old February 24th, 2017 (11:39 AM).
                                      ghoulslash's Avatar
                                      ghoulslash ghoulslash is offline
                                         
                                        Join Date: Mar 2016
                                        Gender: Male
                                        Posts: 51

                                        This may be a silly question, but when using the Pallette viewer to replace the colors with the appropriate hex values in your new pallette, how does one know which colors to replace? Here's an image of what I get when I import the tileset and tilemap to slots 3 and 4 in unLZ:

                                        Spoiler:

                                        The magenta color obviously needs to be changed, but all the different shades of green have me a tad confused.

                                        Thanks in advance for your help

                                        Reply With Quote
                                          #71    
                                        Old May 20th, 2017 (12:27 AM).
                                        AtecainCorp.'s Avatar
                                        AtecainCorp. AtecainCorp. is offline
                                        Rejishan awake...
                                           
                                          Join Date: Jun 2008
                                          Location: Takoabe Town (Region Thonsu)
                                          Age: 24
                                          Gender: Male
                                          Nature: Hardy
                                          Posts: 1,247

                                          One speed question. That is avaible to add extra battle backgrounds? For example put in 21 index DISTORTION WORLD and on 22 Snow?

                                          __________________

                                          - My new Project comming Soon

                                          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 8:39 PM.