+ Reply to Thread
Results 1 to 9 of 9

Thread: Attempting to dissect a code...?

  1. #1

    Attempting to dissect a code...?

    Okay, I have run into a bit of a curiosity while looking for a code for Black & White, but I wonder if what I'm looking for is right in front of me. Here's what I'm looking at:

    Max IVs (Marking, Black)
    HP
    020195B4 FC24F7E8
    02001E00 73B4B4FF
    02001FFC BDF8BCFF
    02001E10 0024241F
    02001E14 43A06928
    02001E18 0024241F
    02001E1C 61284320
    Attack
    020195B4 FC24F7E8
    02001E00 73B4B4FF
    02001FFC BDF8BCFF
    02001E20 0164241F
    02001E24 43A06928
    02001E28 0164241F
    02001E2C 61284320
    Defense
    020195B4 FC24F7E8
    02001E00 73B4B4FF
    02001FFC BDF8BCFF
    02001E30 02A4241F
    02001E34 43A06928
    02001E38 02A4241F
    02001E3C 61284320
    Speed
    020195B4 FC24F7E8
    02001E00 73B4B4FF
    02001FFC BDF8BCFF
    02001E40 03E4241F
    02001E44 43A06928
    02001E48 03E4241F
    02001E4C 61284320
    Sp.Attack
    020195B4 FC24F7E8
    02001E00 73B4B4FF
    02001FFC BDF8BCFF
    02001E50 0524241F
    02001E54 43A06928
    02001E58 0524241F
    02001E5C 61284320
    Sp.Defense
    020195B4 FC24F7E8
    02001E00 73B4B4FF
    02001FFC BDF8BCFF
    02001E60 0664241F
    02001E64 43A06928
    02001E68 0664241F
    02001E6C 61284320
    (The hex I have in bold is what I believe is the point where I can edit the IV value between 00-1F if I so chose, if I'm wrong please let me know)

    Now this code maxes out the IVs of something when you use marking. I've been looking for a code that gives you something with max IVs outright from a wild encounter or when given to you (ie fossils and gifts, but not Mystery Gifts, it doesn't work then). Now, after comparing two codes, specifically the Marking Hidden Power Modifier and the wild IV modifier (labelled simply as Max IVs) in this thread, you'll see they use the identical addresses for the IVs. So here's where I began wondering about the code I just posted:

    If I were to simply chop off the part of the code related to the marking, which I believe would at least be the first three lines, would I then have a code that would affect wild encounters? Or perhaps, does this code affect wild encounters as-is? Or am I just trying too hard and seeing something that isn't there? (I have managed to tweak the Box 1 Slot 1 Nature Modifier code for HG/SS to simplify it and...well, lessen the bugs in that, still trying to totally debug it, but it's hard when you don't know the coding that well)

  2. #2

    Re: Attempting to dissect a code...?

    Code:
    020195B4 FC24F7E8 ;bl $0x02001E00
    Quote Originally Posted by NekoSabrina View Post
    If I were to simply chop off the part of the code related to the marking, which I believe would at least be the first three lines, would I then have a code that would affect wild encounters?
    I don't really know if it would affect wild encounters, but even if it did, if you remove that first line, you will never jump to that custom routine.

  3. #3
    Super Moderator Translation ContributorDeveloperGame Save ResearcherROM ResearcherRAM ResearcherIRC AOPSuper Moderator
    Join Date
    May 2010
    Age
    28
    Posts
    1,006

    Re: Attempting to dissect a code...?

    no, this won't work. the function that is being hooked is "storePKMData", a function that is a large switch statement that makes use of gamefreak's setup of pkm data as a series of fields. the case being hooked in the switch is the marking case and cutting off the top of the code will cause the game to function normally, since the hook is never written and the new routine never jumped to.

  4. #4

    Re: Attempting to dissect a code...?

    Well, at least it was a halfway decent theory I had... Am I at least correct about the variables I highlighted being the correct ones to edit if I didn't want a 31?

    I guess I'll have to be slightly resigned to use this if I can't find the wild/gift alternative I was looking for, I just find it more practical to just have it done than go back and edit later. *shrug* Oh well...

    Trying to figure this stuff out has taught me one thing: Gen 5 codes seem to be a lot more complex than Gen 4 codes.

  5. #5

    Re: Attempting to dissect a code...?

    Pardon the double-post, but I have a couple of more codes to try to run past the people who know more about this stuff than I do. These, however, are from HG/SS and I'm just trying to bugfix them rather than...whatever the heck my previous experiment was trying to do. They both have similar bugs, too.

    Nature Modifier - Box 1, Slot 1
    020D3F60 E12FFF1E
    94000130 FDFF0000
    020D3F60 EA0BB366
    E23C0D00 00000030
    E59F001C E5900000
    E59F4018 E7943000
    E2033A3E E1833523
    E28330XX E7843000
    E12FFF1E 02111880
    0000F710 E1A00000

    Now the XX is the variable that determines the nature, but that's not the part that's in question right now. This code has a couple of known bugs to it: first off, it changes the gender of some things it is used on (not everything, just some things). Secondly, it turns a Shiny Pokémon normal. I put the possible culprit line in italics, but I'm not quite sure what the fix would be (to remove that line, or just edit it), and if that isn't the culprit, I'm not sure where to look next on this code

    Use Marking for Shiny
    1206F04A 00004800
    0206F04C 023C0B91
    1206F050 00004700
    023C0B90 88049800
    023C0B94 88BE8845
    023C0B98 407788FF
    023C0B9C 0A24407C
    023C0BA0 407D70C4
    023C0BA4 407D2707
    023C0BA8 B0147005
    023C0BAC 46C0BDF8

    Now this is one I haven't tried myself, but apparently there's a bug in this one that changes whatever it's used on to female and changes the nature. Unlike the previous code, though......I have no damn idea where the possible problem may be.

    The key point in both of them, I guess, is to prevent both codes from messing with gender, and of course to not act like opposites of each other
    Last edited by NekoSabrina; Sep 2nd, 2012 at 12:24 PM.

  6. #6
    ¬‿¬ Pingouin7's Avatar
    Join Date
    Sep 2009
    Location
    Canada, Quebec
    Age
    19
    Posts
    845

    Re: Attempting to dissect a code...?

    Quote Originally Posted by NekoSabrina View Post
    Spoiler
    Pardon the double-post, but I have a couple of more codes to try to run past the people who know more about this stuff than I do. These, however, are from HG/SS and I'm just trying to bugfix them rather than...whatever the heck my previous experiment was trying to do. They both have similar bugs, too.

    Nature Modifier - Box 1, Slot 1
    020D3F60 E12FFF1E
    94000130 FDFF0000
    020D3F60 EA0BB366
    E23C0D00 00000030
    E59F001C E5900000
    E59F4018 E7943000
    E2033A3E E1833523
    E28330XX E7843000
    E12FFF1E 02111880
    0000F710 E1A00000

    Now the XX is the variable that determines the nature, but that's not the part that's in question right now. This code has a couple of known bugs to it: first off, it changes the gender of some things it is used on (not everything, just some things). Secondly, it turns a Shiny Pokémon normal. I put the possible culprit line in italics, but I'm not quite sure what the fix would be (to remove that line, or just edit it), and if that isn't the culprit, I'm not sure where to look next on this code

    Use Marking for Shiny
    1206F04A 00004800
    0206F04C 023C0B91
    1206F050 00004700
    023C0B90 88049800
    023C0B94 88BE8845
    023C0B98 407788FF
    023C0B9C 0A24407C
    023C0BA0 407D70C4
    023C0BA4 407D2707
    023C0BA8 B0147005
    023C0BAC 46C0BDF8

    Now this is one I haven't tried myself, but apparently there's a bug in this one that changes whatever it's used on to female and changes the nature. Unlike the previous code, though......I have no damn idea where the possible problem may be.

    The key point in both of them, I guess, is to prevent both codes from messing with gender, and of course to not act like opposites of each other
    Wouldn't really call it a bug, more a side-effect of using the cheat.
    Since they change the gender/nature/removes shinyness, I'm going to assume the cheats works by editing the PID of the Pokémon so that it remains legal, so that the PID matches the IV's and the nature.

  7. #7

    Re: Attempting to dissect a code...?

    Well, in any case, I want to try to neutralize these effects so the codes only do what they say they do and not have these other issues. I just don't know enough to figure that out myself

  8. #8
    Super Moderator Translation ContributorDeveloperGame Save ResearcherROM ResearcherRAM ResearcherIRC AOPSuper Moderator
    Join Date
    May 2010
    Age
    28
    Posts
    1,006

    Re: Attempting to dissect a code...?

    nature is part of the pid. to change it and keep the poke legal the pid has to change which will cause all those other issues.

  9. #9

    Re: Attempting to dissect a code...?

    Okay, I understand that. But is there any way to either fine-tune the codes to change only those specific parts of the pid so that those problems aren't caused (primarily the gender changing, if nothing else), or maybe figure out a way to coordinate the two codes to get a desired result?

    EDIT: The thought just occurred to me, if the Shiny via Marking code changes nature, perhaps there's a variable present that could be changed that would effectively allow the code to do both at once? (Although there's still the gender issue, but maybe that's not as difficult a fix if this turns out to be true) At least, that's if the nature changes to the same thing every time...
    Last edited by NekoSabrina; Sep 3rd, 2012 at 08:56 PM.

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
PPN Top 50