Update comments

06/05/12: More Capture Mechanics Stuff... and Non-Stuff

magical found yet another flaw in UPC's analysis of the fifth-generation capture formula the other day: the chance of a critical capture has a division by six that poccil seems to have overlooked. So critical captures are six times less likely than my catch rate calculator used to say. I fixed this on my fifth-generation capture mechanics page a few days ago.

Meanwhile, somebody actually e-mailed me about G/S/C Gameshark codes to encounter a level 52 Blissey with exactly 342 HP, so I could finally test it! ... except that nothing interesting happened and it just behaved roughly the same as trying to catch a Blissey with 336 HP. So did the 349 HP Blissey. Which appears to mean UPC and iimarckus were wrong about the possibility of disastrous truncations and underflows and the formula isn't nearly as interestingly wonky as I thought it was. D: I have a theory about why this is, but whatever the cause, obviously this renders large chunks of the in-progress G/S/C capture mechanics page incorrect, so ignore that for now while I get things confirmed and revamp it.

UPDATE EDIT: I went and pored over the code myself, and it turns out they weren't wrong, but there's another truncation that happens to exactly counteract all the other wonkiness with level 53 Blissey. I'm still puzzling over why the game doesn't appear to be dividing by zero when I try to catch the 342-HP Blissey, and I've yet to get around to testing Moon Balls and doing something more thorough about Heavy Balls, but at least the formula is still interestingly wonky - even more so than I thought, even - so I'm happy.

FURTHER UPDATE EDIT (06/06/12): The explanation for the lack of division by zero with the 342 HP Blissey turns out to be that it didn't have 342 HP in the first place. You see, apparently the Gameshark code people use to set the level of a wild Pokémon just changes what the game says the level is, rather than the actual level that the game uses to calculate the stats. When I'd caught the Blissey their stats were recalculated, so on my PC they appeared to be level 52 with 342 HP, but while I was battling them they were actually level 23 behind the scenes and only had 157 HP.

So once I managed to hack an encounter with a Blissey that was actually level 52, the game dutifully divided by zero, went into an infinite loop and froze like it was supposed to (now, there's a sentence you don't hear every day). This confirms the previous analysis of the algorithm, and in the process of all this I also discovered a memory location where the calculated X value is stored, which let me easily test everything else that had yet to be fully confirmed regarding balls and so on.

I am going to do a teensy bit more geeky analysis before I put up the updated page, but yay, the formula is wonky and the game is horribly buggy and it makes me so sad when people don't find this as awesome as I do.

The new version of the page also has a couple of fancy flourishes for more graphical visualization of things, which I'm planning to implement on the other capture mechanics pages as well when I'm done.

Comment on this - View comments

Post comment

Rude, offensive or otherwise inappropriate messages, including drama, controversy or other topics that might make others uncomfortable, will be deleted on sight. Repeat troublemakers will be banned altogether. Please keep any websites entered into the website field reasonably family-friendly. You can use BBCode (forum code) to format your messages.

  • [b]Bold[/b]
  • [i]Italic[/i]
  • [u]Underlined[/u]
  • [s]Strikethrough[/s]
  • [url=http://www.dragonflycave.com]Link[/url]
  • [spoiler]Spoiler[/spoiler]
667 Fun fact: The above sprite has a 1/8192 chance of being shiny. Feel free to brag if you get one.


My own messages will be signed as Butterfree, with the Admin label below my name. If someone signs as Butterfree without that label, it's probably not me.

Commenting on: 06-05-12

Oh wow I never knew there was a bug like this in gen 2.

[29/06/2012 19:40:50]

Website: Pokefarm user page
Commenting on: 06-05-12

As a computer science graduate, I admire your fiddling, and fiddling with a buggy program is a lot more fun than with one that's hard to break open.

[25/06/2012 08:57:50]

Commenting on: 06-05-12

I love math! Actually, doing simple calculations about my Pokemon is what started me on math :)

[08/06/2012 22:42:53]

Commenting on: 06-05-12

"…and it makes me so sad when people don't find this as awesome as I do."

No worries there; mathematics absolutely does not register in my brain, but I still find things like this really interesting :D

[08/06/2012 01:32:28]

Polymetric Sesquialtera
Commenting on: 06-05-12

I was inspired to draw this by that post.

[07/06/2012 17:16:18]

Page last modified April 17 2018 at 22:56 GMT