ROM Hacking Need a helping hand? You can get help on any ROM Hacking-related problems or questions you have here.

TrollandToad.com
Closed Thread
 
Thread Tools
  #26076    
Old August 6th, 2013 (10:48 AM). Edited August 6th, 2013 by Deokishisu.
Deokishisu's Avatar
Deokishisu Deokishisu is offline
Mr. Magius
     
    Join Date: Feb 2006
    Location: If I'm online, it's a safe bet I'm at a computer.
    Gender: Male
    Nature: Relaxed
    Posts: 883
    Quote:
    Originally Posted by karatekid552 View Post
    This has been answered many times. First, make sure they do no have the "Look Down" movement type in A-Map. Then, take the sprite you switch too and change it's person ID to 828. This will hide the sprite permanently. Now move it somewhere else on the map. Next, create a new sprite exactly alike to the old one, just with a different event number. DO NOT remove the old sprite. Then the issue will just shift to a new sprite.
    I was under the impression that the problem was the Look Down movement type itself. If you change all your Look Downs to No Movements, you'll not have to go through the process of hiding the offending person event and creating a new one. As an added bonus, No Movement and Look Down are visually identical, so your players won't know the difference.

    While hacking, make a conscious effort to never use Look Down and use No Movement instead, and you'll never run into the problem of assuming control of another sprite after a screen refresh and getting stuck.

    EDIT: I'm just gonna list some likely search terms in this post so that people can hopefully come across it in their searches.

    control sprite switch battle move movement camera stuck help trapped trap controlling switched switching sprite's sprites battles moving

    Relevant Advertising!

      #26077    
    Old August 6th, 2013 (11:17 AM). Edited August 6th, 2013 by karatekid552.
    karatekid552's Avatar
    karatekid552 karatekid552 is offline
    What happens if I push it?....
       
      Join Date: Nov 2012
      Location: Do you really want to know? Really?
      Gender: Male
      Nature: Bold
      Posts: 1,766
      Quote:
      Originally Posted by Deokishisu View Post
      I was under the impression that the problem was the Look Down movement type itself. If you change all your Look Downs to No Movements, you'll not have to go through the process of hiding the offending person event and creating a new one. As an added bonus, No Movement and Look Down are visually identical, so your players won't know the difference.

      While hacking, make a conscious effort to never use Look Down and use No Movement instead, and you'll never run into the problem of assuming control of another sprite after a screen refresh and getting stuck.

      EDIT: I'm just gonna list some likely search terms in this post so that people can hopefully come across it in their searches.

      control sprite switch battle move movement camera stuck help trapped trap controlling switched switching sprite's sprites battles moving
      On RSE, this doesn't solve the problem. My solution is 100% guaranteed to work, and only takes about 30 seconds if you know what you are doing. I encountered this problem my self when I was hacking Ruby when I first started and I changed everything, and spent hours trying to fix it. In fact, the issue occurred with a sprite using the "Look Up" movement. Which is why, if you look in my response, I included both.

      Quote:
      Originally Posted by karatekid552
      First, make sure they do no have the "Look Down" movement type in A-Map.
      Quote:
      Originally Posted by egdailyfan View Post
      Great, thanks!

      I didn't know the technical term for the glitch, so I have had immense trouble finding it by searching anywhere.

      -Eg
      There is no technical term. Everyone describes it exactly as you did.
      __________________

      Paired with Simba
        #26078    
      Old August 6th, 2013 (11:33 AM).
      uliekztrollface?'s Avatar
      uliekztrollface? uliekztrollface? is offline
      U MAD BRO?
         
        Join Date: Jul 2013
        Gender: Male
        Posts: 17
        Sorry to be off-topic but yeah guys lol sorry I have Advance-Map 1.82 (groan) idk where to get 1.92.
        Sorry 4 any inconvenience.
        Any alternative ways to edit dialogue on PKSV? I have tried copy/pasting script offsets into PKSV
        and decompiling on PKSV but it's a bunch of gibberish to me and I checked the whole thing and found no dialogue.
        :/
          #26079    
        Old August 6th, 2013 (12:58 PM). Edited August 6th, 2013 by Xcisor.
        Xcisor's Avatar
        Xcisor Xcisor is offline
           
          Join Date: Jun 2006
          Gender:
          Nature: Adamant
          Posts: 29
          Quick 2:

          #1 - How can I change the In-Game Trades? - http://mail.pokecommunity.com/showthread.php?p=3468561

          #2 - How can I change which version of your Rival you battle after the E4? (Fire starter, Grass Starter, Water Starter ect)
          __________________
          Pokémon Yellow Advanced Version Team:
            #26080    
          Old August 6th, 2013 (1:48 PM). Edited August 6th, 2013 by karatekid552.
          karatekid552's Avatar
          karatekid552 karatekid552 is offline
          What happens if I push it?....
             
            Join Date: Nov 2012
            Location: Do you really want to know? Really?
            Gender: Male
            Nature: Bold
            Posts: 1,766
            Quote:
            Originally Posted by Xcisor View Post
            Quick 2:

            #1 - How can I change the In-Game Trades? - http://mail.pokecommunity.com/showthread.php?p=3468561

            #2 - How can I change which version of your Rival you battle after the E4? (Fire starter, Grass Starter, Water Starter ect)
            Refer to JPAN's Study on the Special and Special2 Commands. In it, there is a special that will get the starter pokemon you picked and place it on a var. Then, you can compare this var and branch to three different battles depending upon your starter.

            Quote:
            Originally Posted by uliekztrollface? View Post
            Sorry to be off-topic but yeah guys lol sorry I have Advance-Map 1.82 (groan) idk where to get 1.92.
            Sorry 4 any inconvenience.
            Any alternative ways to edit dialogue on PKSV? I have tried copy/pasting script offsets into PKSV
            and decompiling on PKSV but it's a bunch of gibberish to me and I checked the whole thing and found no dialogue.
            :/
            http://filetrip.net/gba-downloads/tools-utilities/download-advance-map-192-f7463.html
            ---

            That is because it is reading the text as a script, not as raw text. There is no way to just open up text and adjust it, without knowing the script it is called in. However, if you just need a quick change, try this script:

            Code:
            #Dynamic 0x800000
            #org @start
            msgbox 0x08XXXXXX
            callstd 0x2
            end
            Where XXXXXX is the offset of you text.

            If you compile that, and then open up the script that you compiled, it will pull up the text for you also, which you can then edit and recompile. You can use this script over and over in it's post-compiled state, just by changing the XXXXXX again.

            Hacking is all about thinking outside of the box. This is just another way of doing so.
            __________________

            Paired with Simba
              #26081    
            Old August 6th, 2013 (2:02 PM). Edited August 6th, 2013 by Xcisor.
            Xcisor's Avatar
            Xcisor Xcisor is offline
               
              Join Date: Jun 2006
              Gender:
              Nature: Adamant
              Posts: 29
              Quote:
              Originally Posted by karatekid552 View Post
              Refer to JPAN's Study on the Special and Special2 Commands. In it, there is a special that will get the starter pokemon you picked and place it on a var. Then, you can compare this var and branch to three different battles depending upon your starter.



              Thanks. To expand upon the question, where can I access the script boxes that edit the Champion battle as there don't appear to be any green "S" boxes on Advance Map for that match?!

              EDIT: The script for the battle with the Champion in FR can be found @ $8162B76
              __________________
              Pokémon Yellow Advanced Version Team:
                #26082    
              Old August 6th, 2013 (2:38 PM).
              karatekid552's Avatar
              karatekid552 karatekid552 is offline
              What happens if I push it?....
                 
                Join Date: Nov 2012
                Location: Do you really want to know? Really?
                Gender: Male
                Nature: Bold
                Posts: 1,766
                Quote:
                Originally Posted by Xcisor View Post
                Thanks. To expand upon the question, where can I access the script boxes that edit the Champion battle as there don't appear to be any green "S" boxes on Advance Map for that match?!

                EDIT: The script for the battle with the Champion in FR can be found @ $8162B76
                Just for future reference, they are map scripts, found in the map Header in A-map.
                __________________

                Paired with Simba
                  #26083    
                Old August 6th, 2013 (3:07 PM). Edited August 6th, 2013 by Xcisor.
                Xcisor's Avatar
                Xcisor Xcisor is offline
                   
                  Join Date: Jun 2006
                  Gender:
                  Nature: Adamant
                  Posts: 29
                  Quote:
                  Originally Posted by karatekid552 View Post
                  Just for future reference, they are map scripts, found in the map Header in A-map.
                  Was unaware of the function before hand, thanks again.

                  Follow up and FINAL question, any way to change the "ROAMING POKEMON" in Fire Red? Aka Raikou, Entei Suicune based on which starter you chose? Wanted to change it to a Ho-oh if at all possible.

                  EDIT: I Know that the event for roaming is triggered by special 0x129 and that is checks var 0x4031 to see which of the three will roam, but I can't seem to be able to pinpoint where and what numbers I need to change in the hex editor to make it Ho-oh!
                  __________________
                  Pokémon Yellow Advanced Version Team:
                    #26084    
                  Old August 6th, 2013 (10:24 PM).
                  karatekid552's Avatar
                  karatekid552 karatekid552 is offline
                  What happens if I push it?....
                     
                    Join Date: Nov 2012
                    Location: Do you really want to know? Really?
                    Gender: Male
                    Nature: Bold
                    Posts: 1,766
                    Quote:
                    Originally Posted by Xcisor View Post
                    Was unaware of the function before hand, thanks again.

                    Follow up and FINAL question, any way to change the "ROAMING POKEMON" in Fire Red? Aka Raikou, Entei Suicune based on which starter you chose? Wanted to change it to a Ho-oh if at all possible.

                    EDIT: I Know that the event for roaming is triggered by special 0x129 and that is checks var 0x4031 to see which of the three will roam, but I can't seem to be able to pinpoint where and what numbers I need to change in the hex editor to make it Ho-oh!
                    If you use JPAN's engine, he created special to completely let you create swarms and roaming pokes. Here is a snippet from his guide:

                    Quote:
                    Special 0x56 – Swarm-roaming Pokémon changer

                    Receives Arguments? YES.
                    Variable 0x8004 has a long key:
                    0 to 0x3fff: faced as pokemon number
                    0x4000-> 0x8015: faced as pokemon number IN the variable stored in 0x8004
                    0x8000-> 0xfffc: not defined
                    0xfffd-> specific pokemon stored at a pointer kept in two variables, 0x8008 0x8009. I already explained how that worked before
                    0xfffe-> specific pokemon stored at a pointer, that must be placed by hand in 0x0203f488
                    0xffff-> specific pokemon stored at the LoadPointer location
                    -----------------------
                    Variable 0x8005 has the chances of appearance
                    Those chances are calculated by number of pokémon in 65536 encounters
                    0x0 means as rare as a shiny
                    0x7fff is 50% chance
                    0xffff means always. No chance of non-appearance
                    -------------------------
                    Variable 0x8006 is the quantity
                    0x1 means the pokémon will only appear once, 0x2 two times… until 255 appearences(0xff)
                    0x0 means unlimited appearances. Recommended for Swarm-like events
                    -------------------------
                    Variable 0x8007 lower half is the location, and the upper half is the level the pokémon is found in. Used to avoid “underwater Charizard”-like scenarios.
                    First 4 bits of the word are the location values. 0x0 does the same as 0xf, that is, the pokémon is found anywhere you want.
                    Bit 0 = grass
                    Bit 1 = surfing
                    Bit 2 = tree\rock-smash
                    Bit 3 = fishing
                    So 0x9 (1001b) would mean that the pokémon is found on grass and by fishing
                    The upper half is the level of a roaming pokémon. For instance, if you want a lv. 80 pokémon in the wild grass only, use setvar 0x8007 0x5001
                    Returns values? No

                    All of those make anyone be put off by this code, but don’t be. This code is one of the most useful in this entire hack. Basically, it lets you create two types of events that everyone missed in Fire Red: Swarms and Roaming Legendaries.
                    I know the Legendary dogs roamed Kanto, but I didn’t know how so I made up my version. Basically, this code replaces one normal wild pokémon and places on its stead one we really want to appear. You can only replace the level for Roaming codes, that is, only for the ones in that 0x8006 = 1. For swarms, however, you cannot. That is the pokémon there will always be at the area’s level. But the level problem can be solved easily with something I will talk at the bottom.
                    You might have noticed that the variable 0x8004 key has something interesting near the bottom: The ability to load predefined pokémon. They must be at a full 100 bytes, but that way you can fight specific pokémon you pre-selected, just like Pal-park on the DS versions. That opens the window for a number of possibilities, such as having to bring a specific pokémon to someone, like a runaway pokémon, complete with that NPC’s OTID and Name.
                    Also 0xfffe makes you input the pokémon by hand. If you never used this code before, most likely you will be surprised by a very well trained ?????????. Use, as always, writebytetooffset to prevent that disaster.

                    Special 0x57 – Swarm-roam Pokémon canceller

                    Receives Arguments? No.

                    Returns values? No

                    Cleans all, including the pokémon.

                    Now, if you just want these parts of his engine, and not the rest, download v1.1 from the end of this thread. In it, there will be a patch, and a program. The program is what you need. It is in folder "Hack Tool". This program will allow you to apply each of his hacks individually, so just check the boxes you want, click apply, and then click save and it will ask you where to save the new rom. Remember, he also included a .doc file that serves as a guide to every hack he made, and then some. I learned a lot about hacking just from reading it, nevermind how to use his engine specifically.
                    __________________

                    Paired with Simba
                      #26085    
                    Old August 7th, 2013 (7:25 AM).
                    Branellope's Avatar
                    Branellope Branellope is offline
                    THIS. IS. SEMPITERNAL.
                       
                      Join Date: Apr 2013
                      Location: Manchester, England
                      Age: 22
                      Gender: Female
                      Nature: Sassy
                      Posts: 83
                      I want to replace ??? type with Fairy type. How would I go about doing that?
                      __________________
                      Watch this wicked Pokémon Battle, and PM me if you want a battle. Also watch me talking about how I flirted with famous people.
                      "A good trainer wins despite hinderances" - Serebii
                      "I can't drown my demons, they know how to swim" - Bring Me The Horizon - Can You Feel My Heart
                        #26086    
                      Old August 7th, 2013 (7:40 AM).
                      GoGoJJTech's Avatar
                      GoGoJJTech GoGoJJTech is offline
                      (☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
                      • Gold Tier
                       
                      Join Date: Nov 2012
                      Location: Earth
                      Age: 18
                      Gender: Female
                      Nature: Jolly
                      Posts: 2,477
                      Find the name of the ??? Type and change it. Then use a program that edits the type effectiveness. I did it manually, but there may be a tool that does it for you.
                      __________________
                      I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this into your signature.
                      The HGSS Music Patch - The BW/2 Music Patch - ASM: Switch Music Based on Seasons
                      Romhack.me Profile - Pokecommunity Profile - Youtube Channel

                      Support me at my site!
                      Pokémon Platinum Red and Blue
                        #26087    
                      Old August 7th, 2013 (7:48 AM).
                      Branellope's Avatar
                      Branellope Branellope is offline
                      THIS. IS. SEMPITERNAL.
                         
                        Join Date: Apr 2013
                        Location: Manchester, England
                        Age: 22
                        Gender: Female
                        Nature: Sassy
                        Posts: 83
                        Quote:
                        Originally Posted by gogojjtech View Post
                        Find the name of the ??? Type and change it. Then use a program that edits the type effectiveness. I did it manually, but there may be a tool that does it for you.
                        What did you use for it? I've looked for tools to do that with you see, can't find any.
                        __________________
                        Watch this wicked Pokémon Battle, and PM me if you want a battle. Also watch me talking about how I flirted with famous people.
                        "A good trainer wins despite hinderances" - Serebii
                        "I can't drown my demons, they know how to swim" - Bring Me The Horizon - Can You Feel My Heart
                          #26088    
                        Old August 7th, 2013 (8:39 AM).
                        karatekid552's Avatar
                        karatekid552 karatekid552 is offline
                        What happens if I push it?....
                           
                          Join Date: Nov 2012
                          Location: Do you really want to know? Really?
                          Gender: Male
                          Nature: Bold
                          Posts: 1,766
                          Quote:
                          Originally Posted by Branellope View Post
                          I want to replace ??? type with Fairy type. How would I go about doing that?
                          NOOO, you don't. ??? is used for eggs and the move Curse. So think. Think before you do.
                          __________________

                          Paired with Simba
                            #26089    
                          Old August 7th, 2013 (8:51 AM).
                          Branellope's Avatar
                          Branellope Branellope is offline
                          THIS. IS. SEMPITERNAL.
                             
                            Join Date: Apr 2013
                            Location: Manchester, England
                            Age: 22
                            Gender: Female
                            Nature: Sassy
                            Posts: 83
                            Quote:
                            Originally Posted by karatekid552 View Post
                            NOOO, you don't. ??? is used for eggs and the move Curse. So think. Think before you do.
                            Bleeehhhh how can I just add a new type?
                            __________________
                            Watch this wicked Pokémon Battle, and PM me if you want a battle. Also watch me talking about how I flirted with famous people.
                            "A good trainer wins despite hinderances" - Serebii
                            "I can't drown my demons, they know how to swim" - Bring Me The Horizon - Can You Feel My Heart
                              #26090    
                            Old August 7th, 2013 (9:27 AM).
                            pokefreake's Avatar
                            pokefreake pokefreake is offline
                               
                              Join Date: Nov 2012
                              Gender: Male
                              Posts: 69
                              Quote:
                              Originally Posted by Branellope View Post
                              What did you use for it? I've looked for tools to do that with you see, can't find any.
                              Here's the tool.
                              http://www.sendspace.com/file/685yxv
                                #26091    
                              Old August 7th, 2013 (9:59 AM).
                              karatekid552's Avatar
                              karatekid552 karatekid552 is offline
                              What happens if I push it?....
                                 
                                Join Date: Nov 2012
                                Location: Do you really want to know? Really?
                                Gender: Male
                                Nature: Bold
                                Posts: 1,766
                                Quote:
                                Originally Posted by Branellope View Post
                                Bleeehhhh how can I just add a new type?
                                Hacking the types with ASM.
                                __________________

                                Paired with Simba
                                  #26092    
                                Old August 7th, 2013 (3:29 PM).
                                DoesntKnowHowToPlay's Avatar
                                DoesntKnowHowToPlay DoesntKnowHowToPlay is offline
                                Tiny Umbrella with Lots and Lots of Good
                                   
                                  Join Date: Jan 2012
                                  Posts: 258
                                  Quote:
                                  Originally Posted by karatekid552 View Post
                                  Hacking the types with ASM.
                                  Do you actually need ASM for that? The type advantages are handled by a (somewhat strange) table somewhere, so you should just be able to change things to types past the normal ones without any ASM. Might have to break a few limiters and you'd obviously have to edit the type graphic, but IIRC there was space for a few freebie types.

                                  (not to mention that if you retype curse and don't have eggs, ??? is perfectly usable as long as you either use the phys/spec split or break all the related checks)

                                  http://www.pokecommunity.com/showthread.php?t=266698 relevant
                                  __________________

                                  Yet Another Fire Red Hack

                                  Physical/Special Split
                                    #26093    
                                  Old August 7th, 2013 (4:03 PM).
                                  pokefreake's Avatar
                                  pokefreake pokefreake is offline
                                     
                                    Join Date: Nov 2012
                                    Gender: Male
                                    Posts: 69
                                    Is it possible to add new graphics to unlz gba without replacing them?
                                      #26094    
                                    Old August 7th, 2013 (5:46 PM).
                                    destinedjagold's Avatar
                                    destinedjagold destinedjagold is offline
                                    Oh Hai Thar~
                                    • Silver Tier
                                     
                                    Join Date: May 2007
                                    Location: Philippines
                                    Age: 26
                                    Gender: Male
                                    Nature: Careful
                                    Posts: 8,549
                                    A simple question: what are the variables which are safe to use in a Ruby ROM?

                                    I am just recently introduced to vars (don't ask), and I created my very first script using vars, but I am not sure what variables are safe to use. :3
                                    __________________


                                    FC: 0061-1111-6462
                                    TSV: 1364(X), 0790(OR)

                                      #26095    
                                    Old August 7th, 2013 (5:49 PM).
                                    GoGoJJTech's Avatar
                                    GoGoJJTech GoGoJJTech is offline
                                    (☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
                                    • Gold Tier
                                     
                                    Join Date: Nov 2012
                                    Location: Earth
                                    Age: 18
                                    Gender: Female
                                    Nature: Jolly
                                    Posts: 2,477
                                    Well DJG, there is no list for Ruby, but maybe deleting certain events that use them can ensure they're free. However, a var can hold a value from 0-65535, so you may only need like two. So just to be safe, vars in the 4000 area. I'm pretty sure 8000 and higher are unsafe or temporary

                                    Pokefreake
                                    Use NSE or in un-lz, import an image, write the import offset, import pal, and don't click automatically fix pointers.
                                    __________________
                                    I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this into your signature.
                                    The HGSS Music Patch - The BW/2 Music Patch - ASM: Switch Music Based on Seasons
                                    Romhack.me Profile - Pokecommunity Profile - Youtube Channel

                                    Support me at my site!
                                    Pokémon Platinum Red and Blue
                                      #26096    
                                    Old August 7th, 2013 (6:51 PM).
                                    destinedjagold's Avatar
                                    destinedjagold destinedjagold is offline
                                    Oh Hai Thar~
                                    • Silver Tier
                                     
                                    Join Date: May 2007
                                    Location: Philippines
                                    Age: 26
                                    Gender: Male
                                    Nature: Careful
                                    Posts: 8,549
                                    Quote:
                                    Originally Posted by gogojjtech View Post
                                    Well DJG, there is no list for Ruby, but maybe deleting certain events that use them can ensure they're free. However, a var can hold a value from 0-65535, so you may only need like two. So just to be safe, vars in the 4000 area. I'm pretty sure 8000 and higher are unsafe or temporary
                                    Yesh, the very first var I used is 4000, since I based it on Birch's script where he's being chased by a Poochyena.

                                    Thankies for the info, by the way~
                                    __________________


                                    FC: 0061-1111-6462
                                    TSV: 1364(X), 0790(OR)

                                      #26097    
                                    Old August 7th, 2013 (8:06 PM).
                                    kearnseyboy6's Avatar
                                    kearnseyboy6 kearnseyboy6 is offline
                                    Aussie's Toughest Mudder
                                       
                                      Join Date: Dec 2008
                                      Posts: 300
                                      Hi all, I am new to ASM and it's going pretty well. Here's my code

                                      Quote:
                                      .text
                                      .align 2
                                      .thumb
                                      .thumb_func
                                      .global nature

                                      main:
                                      push {r0-r1, lr} \\lets me work with r0 and r1
                                      ldr r0, .POKE_DATA \\ Loads the address of specified below as a 'word'
                                      ldr r1, [r0] \\ Loads the value of the address into r1 as a 'word'
                                      add r1, r1, #0x1 \\ adds 1 to the word in r1
                                      str r0, [r1] \\ stores the 'word' in r1 to the address in r0.
                                      pop {r0-r1, pc} \\ puts the registers back


                                      .align 2
                                      .POKE_DATA:
                                      .word 0x02024284 \\address of the the PID
                                      Now is their a reason why this doesn't add 1 to the PID? I know its encrypted but I expected a bad egg instead of nothing. 100% sure the script works.
                                      __________________
                                      HOLIDAYING CURRENTLY!!
                                        #26098    
                                      Old August 7th, 2013 (8:28 PM). Edited August 7th, 2013 by karatekid552.
                                      karatekid552's Avatar
                                      karatekid552 karatekid552 is offline
                                      What happens if I push it?....
                                         
                                        Join Date: Nov 2012
                                        Location: Do you really want to know? Really?
                                        Gender: Male
                                        Nature: Bold
                                        Posts: 1,766
                                        Quote:
                                        Originally Posted by kearnseyboy6 View Post
                                        Hi all, I am new to ASM and it's going pretty well. Here's my code



                                        Now is their a reason why this doesn't add 1 to the PID? I know its encrypted but I expected a bad egg instead of nothing. 100% sure the script works.
                                        Just because it doesn't make a bad egg, doesn't mean it doesn't work. Did you open up the memory viewer at that address and check it before and after? (I haven't read your asm yet, I'm going back now..)

                                        Edit: You made a very common mistake. One sec...

                                        Code:
                                        .text
                                        .align 2
                                        .thumb
                                        .thumb_func
                                        .global nature
                                        
                                        main:
                                        push {r0-r1, lr} \\lets me work with r0 and r1
                                        ldr r0, .POKE_DATA \\ Loads the address of specified below as a 'word'
                                        ldr r1, [r0] \\ Loads the value of the address into r1 as a 'word'
                                        add r1, r1, #0x1 \\ adds 1 to the word in r1
                                        str r1, [r0] \\ stores the 'word' in r1 to the address in r0.
                                        pop {r0-r1, pc} \\ puts the registers back 
                                        
                                        
                                        .align 2
                                        .POKE_DATA:
                                        .word 0x02024284 \\address of the the PID
                                        Str and ldr tend to confuse people.

                                        ldr works like this:

                                        ldr rX, [rH]
                                        <-----------

                                        str works like this:

                                        str rX, [rH]
                                        ------------>

                                        Understand? They move in different directions. You load right to left, and store left to right. There are very few commands that work left to right, and str is one of them, which trips people up. Remember, [] signify the data at an address. So, str r0, [r1] would read the PID as a memory address and try and store the address in r0 there. Not good..XD
                                        __________________

                                        Paired with Simba
                                          #26099    
                                        Old August 7th, 2013 (8:39 PM). Edited August 7th, 2013 by Elaitenstile.
                                        Elaitenstile's Avatar
                                        Elaitenstile Elaitenstile is offline
                                        I am legend
                                           
                                          Join Date: Feb 2013
                                          Posts: 1,909
                                          Quote:
                                          Originally Posted by DoesntKnowHowToPlay View Post
                                          (not to mention that if you retype curse and don't have eggs, ??? is perfectly usable as long as you either use the phys/spec split or break all the related checks)

                                          http://www.pokecommunity.com/showthread.php?t=266698 relevant
                                          The only problem being I'm positive that the escapade move Struggle is the ??? type. I'm not sure about that but I think so. However Curse is a defensive move so yeah, the re-typing wont effect it

                                          Quote:
                                          Originally Posted by destinedjagold View Post
                                          A simple question: what are the variables which are safe to use in a Ruby ROM?

                                          I am just recently introduced to vars (don't ask), and I created my very first script using vars, but I am not sure what variables are safe to use. :3
                                          You'd be surprised to know that after a certain point (near Fortree I think) the game stats using vars like 0x1, 0x2, 0x3 etc.
                                          __________________
                                          ~
                                            #26100    
                                          Old August 7th, 2013 (8:51 PM). Edited August 7th, 2013 by kearnseyboy6.
                                          kearnseyboy6's Avatar
                                          kearnseyboy6 kearnseyboy6 is offline
                                          Aussie's Toughest Mudder
                                             
                                            Join Date: Dec 2008
                                            Posts: 300
                                            Spoiler:
                                            Quote:
                                            Originally Posted by karatekid552 View Post
                                            Just because it doesn't make a bad egg, doesn't mean it doesn't work. Did you open up the memory viewer at that address and check it before and after? (I haven't read your asm yet, I'm going back now..)

                                            Edit: You made a very common mistake. One sec...

                                            Code:
                                            .text
                                            .align 2
                                            .thumb
                                            .thumb_func
                                            .global nature
                                            
                                            main:
                                            push {r0-r1, lr} \\lets me work with r0 and r1
                                            ldr r0, .POKE_DATA \\ Loads the address of specified below as a 'word'
                                            ldr r1, [r0] \\ Loads the value of the address into r1 as a 'word'
                                            add r1, r1, #0x1 \\ adds 1 to the word in r1
                                            str r1, [r0] \\ stores the 'word' in r1 to the address in r0.
                                            pop {r0-r1, pc} \\ puts the registers back 
                                            
                                            
                                            .align 2
                                            .POKE_DATA:
                                            .word 0x02024284 \\address of the the PID
                                            Str and ldr tend to confuse people.

                                            ldr works like this:

                                            ldr rX, [rH]
                                            <-----------

                                            str works like this:

                                            str rX, [rH]
                                            ------------>

                                            Understand? They move in different directions. You load right to left, and store left to right. There are very few commands that work left to right, and str is one of them, which trips people up. Remember, [] signify the data at an address. So, str r0, [r1] would read the PID as a memory address and try and store the address in r0 there. Not good..XD
                                            Yes it does thanks! Thanks for clearing it up the [] as well, I now understand how values are pulled from an address without moving the address too XD. But are you 100% on the str though? In JPANs doc it quotes thumb assembly doesn't swap the convention unlike other languages:

                                            Quote:
                                            Notice that str, unlike some other assembly languages, is not an inverted form of Ldr. In thumb, both str’s and ldr’s have the same format
                                            I am happy to change my thinking but when I use this code (modifies HP) it works perfectly. I also have memory viewer on auto update too
                                            Spoiler:
                                            .text
                                            .align 2
                                            .thumb
                                            .thumb_func
                                            .global healthbooster

                                            main:
                                            push {r0-r1, lr}
                                            ldrh r0, .POKE_DATA
                                            ldr r1, [r0]
                                            add r0, r0, #0x64
                                            strh r0, [r1]
                                            pop {r0-r1, pc}


                                            .align 2
                                            .POKE_DATA:
                                            .word 0x02024287


                                            Sorry KK552, your method worked, I must have understood JPAN wrong. It worked like a charm! I got my bad egg Now to fix the checksum and I will be rolling. Thanks for the push!

                                            Also has anyone edited the PID? Or is it impossible haha!
                                            Closed Thread

                                            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 1:25 PM.