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)
(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)
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.
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.
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
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
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.
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.
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
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.
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.