Notable Breakpoints

  • Topic Archived
  1. Boards
  2. Pokemon Pearl Version
  3. Notable Breakpoints
8 years ago#421
hey im sure this has been asked before but i would really like to get into programming. i dont know anyone with skills in this field so im not sure where to start. could anyone give me some options?
Pokemon Pearl Friend Code: 1847 8375 6974
I cry because I play MMO's. :(
8 years ago#422
Ideally, you should find a course, if structure's your thing. If you want to teach yourself, there are plenty of decent tutorials on the internet, but more importantly, there are pages which explain what a good learning mindset incorporates:



* (this one's sparse, but has some good points)

I'll put this corollary here, since one of the next few questions is inevitably a form of, "which language should I learn?" The answer to that is heavily dependent on why you want to learn programming:

*) If you want to automate your daily/weekly/monthly computer maintenance, then it'd be a good idea to learn some shell scripting (either bash/tcsh/ksh/etc. or cmd, whatever's your flavor).

*) If you want to process text, perhaps Perl will be more up your alley.

*) If you want to do math, perhaps Fortran would work for you.

*) If you want to make games, perhaps something like C, C++, or Java would be good.

*) If you want to make interactive web sites, PHP might be a good place to start.

*) If you're looking for general-purpose programming, then Ruby or Python could work well, too.

Good luck.
Where the fear has gone there will be nothing.
Only I will remain.
8 years ago#423
X-Act has released a guide detailing PV/IV generation, so those who are curious can look at how normal pokemon generation works:

He will also be releasing an applet which can perform PV/IV generation, pending some prettying-up.

Thus ends my self-imposed blackout on information.
8 years ago#424
X-Act's IV-to-PV generator has been released and is available online:
Where the fear has gone there will be nothing.
Only I will remain.
8 years ago#425
Based on what you've posted in this thread, I think X-Act might need to mention chained shinies. Since a chained shiny can break the regular nature / perfect IV correlation that can be expected from the PRNG use, can other "illegal" PV / IV combinations come about from chaining? I don't remember you mentioning mechanics here, and I haven't searched Smogon for it, but I'm guessing there's another method. Does it only cover chained shinies, or any chained capture? Since (I think) any chainable Pokemon besides Ditto can also be the result of breeding, it won't make much difference in Shoddy's mechanics, but if people are using the tool to check for non-bred PVs (which include chained shinies), then it is relevant.

My first thought when I saw this - I could use my shiny, honey tree caught Heracross to find out all but the lowest 3 bits of my secret ID. Once I have the PV, and XOR the halves, I can figure out at least part of my secret ID by using bits that will result in 0 after the other two XOR operations. The lowest 3 bits can't be determined directly, because whether they're 0 or 1, after the XORs, the result will always be < 8. It might be possible to run multiple Pokemon from the same cart through the PID applet and compare results to get those last 3 bits, but I will think more about that later (if I remember to).

After considering the PV / shiny / secret ID connection, I realized that chained shinies can throw a wrench into it.
8 years ago#426
[This message was deleted at the request of the original poster]
8 years ago#427
To my knowledge: with the right trainer/secret ID combination, any nature/perfect IV combination is possible with chained-shiny pokemon. The method is indeed more complex than the normal PV/IV algorithm [1]:

1) Proc a chained-shiny encounter,
2) Roll the PRNG twice to generate the initial PV (low word first, then high word),
3) Roll the PRNG thirteen times to mangle the top bits of the PV such that they are made shiny relative to the player's trainer/secret ID, and
4) Roll the PRNG twice to generate IVs.

The magic in step #3 happens thus:
1) XOR the trainer and secret ID to produce value T,
2) For each bit B in the range 3 through 16 (inclusive):
3a) Roll the PRNG once to get value X, then
3b) If B is set in T, then
3b.i) If X is odd, set B in the low word, or
3b.ii) If X is even, set B in the high word; otherwise,
3c) If B is not set in T, then
3c.i) If X is odd, set B in both the low and high words.

In theory, the same algorithm could be run with minor changes (reversed checks) to force a non-shiny; one way to test this would be to take Wonder Card pokemon (which are allegedly always non-shiny) and to see whether the top thirteen bits are always set (since to me, that would be the easiest way to force a non-shiny).

Some more notable breakpoints:
0x0205DED Create chain set
0x0205DF42 End of create chain set function

[1]: Credit goes to loadingNOW for the chained-shiny algorithm.
Where the fear has gone there will be nothing.
Only I will remain.
8 years ago#428
Possibly a typo, but if step 3 procs the PRNG 13 times, shouldn't the bit range in the PV be 3 to 15 if counting from 0, or 4 to 16 if counting from 1?

Also, does the chance exist for a shiny patch to be non-shiny? In steps 3b.i. and 3b.ii., if it sets B in one word, doesn't it need to unset B in the other word? If it doesn't, B could be set in both words, resulting in 0 after the PV XOR, and then a 1 in a high bit after the T XOR, which results in a non-shiny.
8 years ago#429
You're right about step 3: assuming you start counting from 0, then bits to be checked are indeed bits 3 through 15, inclusive. I miscommunicated what I have in my code.

When I first implemented this from notes, I also wondered why the algorithm doesn't unset bits. In practice, the algorithm has worked for all the numbers I've thrown at it. I've snipped out my Python implementation and put it up on my site, for the curious:

There exists the possibility that I've mis-transcribed parts of the algorithm in this thread. That being the case, I'll add posts later correcting any mistakes. Comments and criticism are welcome, as always.
Where the fear has gone there will be nothing.
Only I will remain.
8 years ago#430
After taking another glance at my code, I realized that I left out something vital in the algorithm: the algorithm only keeps the lowest three bits of the pre-generated PV low/high words, so the upper 13 bits always start at 0.

That's what I get for writing a hasty response. -_-
Where the fear has gone there will be nothing.
Only I will remain.
  1. Boards
  2. Pokemon Pearl Version
  3. Notable Breakpoints

Report Message

Terms of Use Violations:

Etiquette Issues:

Notes (optional; required for "Other"):
Add user to Ignore List after reporting

Topic Sticky

You are not allowed to request a sticky.

  • Topic Archived