Guessing IVs on Generation 3 early

MKDasher
Schoolkid
Posts: 41
Joined: Fri May 02, 2014 5:31 pm

Guessing IVs on Generation 3 early

Post by MKDasher » Wed Apr 15, 2015 2:14 am

This thread mainly applies for FRLG and Emerald, since there's already a thread to RNG manipulate a mudkip in Sapphire.

RNG Manipulation Thread for Sapphire:
viewtopic.php?f=27&t=398

As described in the thread above, RNG Manipulation works on Sapphire because the seed is always the same when the battery is dead. Unfortunately it's not the same for emerald or FRLG, the seed is generated there in a really random way that is probably not possible to control. However, we can know what that seed value is, since it's exactly your Trainer ID.

I've been watching Emerald streams recently, and I've found out they consistently hit between frame 7600 to 7800. With this information, and checking level 5 stats, nature and trainer ID, I've been able to guess mudkip IV's before even getting level 6 (just using this level to confirm I was being right). Since I haven't created a tool to do this yet, I just went with a slow method, but it works for a viewer:

- Check Ranges with IV Calculator from level 5 stats
- On RNG Reporter, choose Method 1, Max Results 4000, Starting Frame 6000 (just to make sure).
- Seed(Hex) = your trainer ID in hexadecimal
- Nature = your nature
- Insert the IV ranges you obtained from level 5 stats in the IV section. Then press generate:
- After that some frame around 76xx (for emerald) should appear, if the person running just went as fast as possible from reset to mudkip. That's the mudkip the person just got. You can always double check in level 6 to see if your IVs where right.

I've talked with werster and I think we both agree some kind of tool similar to the gen 1 tool would be helpful for gen 3 speedrunners as well, to automatize all this process, so they can know their IVs as quick as possible. I'd do it myself, but unfortunately I don't have the time to do so right now. So my suggestion is:

- Creating a tool similar to the Gen 1 DV tool, where you also input your trainer ID and nature. The tool could display IV ranges based on what you know from your pokemon stats, and what you know from your seed, and those IVs ranges should dissapear very quickly.

- Technically some kind of tool could be created as well that receives a Trainer ID, and gives you a range of consecutive frames you could hit (sapphire RNG manip method), and how long do you have to wait to get those. Maybe this method would make you waste a lot of time anyway for it to be worth it, and there'd be many AI involved during the run that I'm not sure if you guys would really like the idea.

(Note: This exact method works for FRLG as well, but the frame people hit there is usually around 3700 - 4100, could be wrong cause I haven't checked it for a while).
Last edited by MKDasher on Wed Apr 15, 2015 2:24 am, edited 2 times in total.

Exarion
Cooltrainer
Posts: 249
Joined: Thu Jul 17, 2014 10:07 am

Re: Guessing IVs on Generation 3 early

Post by Exarion » Wed Apr 15, 2015 2:17 am

All of this sounds fantastic. Emerald would be so much more runnable.
Twitch channel: http://www.twitch.tv/exarionu
Pokemon Red speedrunning guide: http://pastebin.com/CkVA5yvJ

User avatar
theoblivinator
Schoolkid
Posts: 45
Joined: Sun Jul 06, 2014 11:06 pm

Re: Guessing IVs on Generation 3 early

Post by theoblivinator » Wed Apr 15, 2015 3:17 am

Poop and Boner wrote:Poop and Boner rules
You got that right spud

speedfaces
Bug Catcher
Posts: 22
Joined: Wed Apr 15, 2015 3:35 am

Re: Guessing IVs on Generation 3 early

Post by speedfaces » Wed Apr 15, 2015 3:36 am

Hey guys, just posting to say I'm working on this. I've got a commandline tool thrown together with some of mkdasher's code, and I'll try to get some crappy Swing UI over it before bed tonight.

JP_Xinnam
Schoolkid
Posts: 29
Joined: Thu Apr 24, 2014 8:39 pm

Re: Guessing IVs on Generation 3 early

Post by JP_Xinnam » Wed Apr 15, 2015 4:27 am

This all sounds good. Being able to consistently get runnable starters, and knowing the IVs will help immensely, and I will be keeping an eye out.

EDIT: Did a quick test with Fire Red with RNG reporter. I went from power on to squirtle as I normally would (choosing girl, naming I and U, and hit frame 3870. So your guess on the frame range is pretty good.

speedfaces
Bug Catcher
Posts: 22
Joined: Wed Apr 15, 2015 3:35 am

Re: Guessing IVs on Generation 3 early

Post by speedfaces » Wed Apr 15, 2015 7:11 am

I made a lookup dealio for Squirtles and Mudkips. I'm just going to keep this post updated with whatever the most updated version is; see below posts for any other information.

Current version: https://mega.co.nz/#!VohBBRpS!JzdxGRmGh ... tFsvZ58qcQ
Last edited by speedfaces on Mon Apr 20, 2015 3:44 am, edited 3 times in total.

User avatar
werster
Site Admin
Posts: 110
Joined: Thu Apr 24, 2014 4:38 am

Re: Guessing IVs on Generation 3 early

Post by werster » Wed Apr 15, 2015 10:00 am

Just did a few attempts with it, worked fine for me. Only issue seemed to be that it would stop working sometimes, I think if I reset my splits after using it once it didn't work anymore? (i.e. I would hit generate but nothing would happen)

All the data seemed correct tho

User avatar
Hdot12
Preschooler
Posts: 7
Joined: Tue Aug 05, 2014 10:36 pm
Location: Germany

Re: Guessing IVs on Generation 3 early

Post by Hdot12 » Wed Apr 15, 2015 1:16 pm

This looks fantastic. I would love if someone would create that for fire red. This would finally end my problems figuring out how good my squirtle actually is.

speedfaces
Bug Catcher
Posts: 22
Joined: Wed Apr 15, 2015 3:35 am

Re: Guessing IVs on Generation 3 early

Post by speedfaces » Wed Apr 15, 2015 1:21 pm

werster wrote:Just did a few attempts with it, worked fine for me. Only issue seemed to be that it would stop working sometimes, I think if I reset my splits after using it once it didn't work anymore? (i.e. I would hit generate but nothing would happen)

All the data seemed correct tho
Ah yeah, error handling isn't in so if you give it a bad value for PID (e.g. a letter or something) it'll freeze. I'll reup a version with that and a reset function later tonight. Glad it works as far as values go; most of that code is Mkdasher's so I figured it should but also that I should check.
Hdot12 wrote:This looks fantastic. I would love if someone would create that for fire red. This would finally end my problems figuring out how good my squirtle actually is.
Should just be a matter of changing the starter's base stats and changing the frames looked through, right? If someone could give me a frame estimate that would be easy enough.

Oh, other thing I forgot to ask - are you guys getting several matches at a time often in the 7600-7800 range? It's built to handle that since my test case produced a couple possible matches, but is obviously less useful when it finds multiple. I could shrink the frame range if it happens often.
Last edited by speedfaces on Wed Apr 15, 2015 1:27 pm, edited 1 time in total.

User avatar
RXFADEZ
Pokémon Trainer
Posts: 121
Joined: Sun Nov 09, 2014 6:32 pm
Contact:

Re: Guessing IVs on Generation 3 early

Post by RXFADEZ » Wed Apr 15, 2015 1:21 pm

Great work but the range needs to be extended to maybe 8500. The majority of Emerald runners pick up the PC Potion which means that we hit between 7800 and 8200 normally from the few tests I've done. Also, do the frames start counting from the soft-reset, from New Game or from when the In Game Timer starts?

speedfaces
Bug Catcher
Posts: 22
Joined: Wed Apr 15, 2015 3:35 am

Re: Guessing IVs on Generation 3 early

Post by speedfaces » Wed Apr 15, 2015 1:29 pm

RXFADEZ wrote:Great work but the range needs to be extended to maybe 8500. The majority of Emerald runners pick up the PC Potion which means that we hit between 7800 and 8200 normally from the few tests I've done. Also, do the frames start counting from the soft-reset, from New Game or from when the In Game Timer starts?
Ahh, in light of that and my edit above I will just make the frame ranges editable. Gotta run to class for now; will try to add fixes in a couple hours.


++Update: https://mega.co.nz/#!88J2AZrL!yCN2IW1bw ... Ze4-xMLJp8 See below posts for further updates.

This should have everything that's necessary now. The default frame values are for potionless runs - potion grabbers can adjust the frame to whatever they need (7800/8200?). Let me know if the functionality isn't clear enough or is somehow broken. If anyone wants to get me a decent default frame range for FR, I can upload a version for that too.
Last edited by speedfaces on Mon Apr 20, 2015 3:40 am, edited 1 time in total.

MKDasher
Schoolkid
Posts: 41
Joined: Fri May 02, 2014 5:31 pm

Re: Guessing IVs on Generation 3 early

Post by MKDasher » Wed Apr 15, 2015 8:54 pm

Range for Firered should be 3700-4000, and a bit more if potion is obtained. Anyway, I guess you can just make it so people edit this.
RXFADEZ wrote: Also, do the frames start counting from the soft-reset, from New Game or from when the In Game Timer starts?
Frame starts counting after you choose your Trainer name, so it doesn't matter how slow / fast you are before that.

Just noticed a mistake in your tool, you wrote "PID" instead of "TID" or "Trainer ID". PID stands for Pokemon Id, which is a totally different thing of what you are actually introducing there (TID).

User avatar
RXFADEZ
Pokémon Trainer
Posts: 121
Joined: Sun Nov 09, 2014 6:32 pm
Contact:

Re: Guessing IVs on Generation 3 early

Post by RXFADEZ » Wed Apr 15, 2015 11:18 pm

Is it possible to get the source code from that calculator?
I find myself using RNG Reporter more because I have more freedom to change things.

speedfaces
Bug Catcher
Posts: 22
Joined: Wed Apr 15, 2015 3:35 am

Re: Guessing IVs on Generation 3 early

Post by speedfaces » Wed Apr 15, 2015 11:26 pm

MKDasher wrote:Range for Firered should be 3700-4000, and a bit more if potion is obtained. Anyway, I guess you can just make it so people edit this.
RXFADEZ wrote: Also, do the frames start counting from the soft-reset, from New Game or from when the In Game Timer starts?
Frame starts counting after you choose your Trainer name, so it doesn't matter how slow / fast you are before that.

Just noticed a mistake in your tool, you wrote "PID" instead of "TID" or "Trainer ID". PID stands for Pokemon Id, which is a totally different thing of what you are actually introducing there (TID).
I fixed it and I'll edit this post with a new version once I've got Squirtle's checks in later tonight.
RXFADEZ wrote:Is it possible to get the source code from that calculator?
I find myself using RNG Reporter more because I have more freedom to change things.
If MKDasher's okay with me posting the code I am - a lot of the backend is his so I won't post it without his permission.

MKDasher
Schoolkid
Posts: 41
Joined: Fri May 02, 2014 5:31 pm

Re: Guessing IVs on Generation 3 early

Post by MKDasher » Thu Apr 16, 2015 12:31 am

speedfaces wrote:If MKDasher's okay with me posting the code I am - a lot of the backend is his so I won't post it without his permission.
Sure, I'm fine with it.

speedfaces
Bug Catcher
Posts: 22
Joined: Wed Apr 15, 2015 3:35 am

Re: Guessing IVs on Generation 3 early

Post by speedfaces » Thu Apr 16, 2015 4:15 am

V3 .jar with Squirtle functionality: https://mega.co.nz/#!t1BWWDSI!PU1MBffJD ... 6XbnlbWw9s See below posts for further updates.
Zip with source: https://mega.co.nz/#!JoZQgTDB!xtgr9tA0Q ... Ln9bEumyq4

Forgive the shitty code in the default package, babes. Kudos if you actually read through this uncommented mess. Hopefully I didn't mess up the Squirtle stuff.
Last edited by speedfaces on Mon Apr 20, 2015 3:40 am, edited 1 time in total.

JP_Xinnam
Schoolkid
Posts: 29
Joined: Thu Apr 24, 2014 8:39 pm

Re: Guessing IVs on Generation 3 early

Post by JP_Xinnam » Thu Apr 16, 2015 5:16 am

Just checked new Squirtle functionality, and unfortunately there is already a problem...

Squirtle's IV Ranges (with stats at neutral natures) are as follows:

HP: 9 - (0-11); 10 - (11-31)
Attack: 9 - (0-3); 10 - (4-23); 11 - (24-31)
Defense: 11 - (0-9); 12 - (10-29); 13 - (30-31)
Special Atk: 10 - (0-19); 11 (20-31)
Special Def: 11 - (0-11); 12 - (12-31)
Speed: 9 - (0-13); 10 - (14-31)

That also doesn't cover + or - natures either. The Speed and Special Attack radio buttons are fine, but the others would need adjusted to account for different stat ranges. So, I would suggest for Squirtle:

HP: 19, 20
Attack: 8, 9, 10, 11, 12 (all possible, though 8 attack is 0-3 IV with a minus nature)
Def: 9, 10, 11, 12, 13, 14 (All possible runnable stats)
Special Def: 9, 10, 11, 12, 13 (All possible runnable stats)

The biggest issue is the Attack selection, because you can run with 10 attack, and you'd want to know if it was a high attack for future fights.

speedfaces
Bug Catcher
Posts: 22
Joined: Wed Apr 15, 2015 3:35 am

Re: Guessing IVs on Generation 3 early

Post by speedfaces » Thu Apr 16, 2015 5:48 am

JP_Xinnam wrote:Just checked new Squirtle functionality, and unfortunately there is already a problem...

Squirtle's IV Ranges (with stats at neutral natures) are as follows:

HP: 9 - (0-11); 10 - (11-31)
Attack: 9 - (0-3); 10 - (4-23); 11 - (24-31)
Defense: 11 - (0-9); 12 - (10-29); 13 - (30-31)
Special Atk: 10 - (0-19); 11 (20-31)
Special Def: 11 - (0-11); 12 - (12-31)
Speed: 9 - (0-13); 10 - (14-31)

That also doesn't cover + or - natures either. The Speed and Special Attack radio buttons are fine, but the others would need adjusted to account for different stat ranges. So, I would suggest for Squirtle:

HP: 19, 20
Attack: 8, 9, 10, 11, 12 (all possible, though 8 attack is 0-3 IV with a minus nature)
Def: 9, 10, 11, 12, 13, 14 (All possible runnable stats)
Special Def: 9, 10, 11, 12, 13 (All possible runnable stats)

The biggest issue is the Attack selection, because you can run with 10 attack, and you'd want to know if it was a high attack for future fights.
Oh, lol. I totally forgot to change the radiobutton grid. Might fix it tomorrow if I get a chance - gonna require a little retooling of the code.

User avatar
Amoeba
Cooltrainer
Posts: 280
Joined: Thu Apr 24, 2014 12:26 am
Contact:

Re: Guessing IVs on Generation 3 early

Post by Amoeba » Thu Apr 16, 2015 8:34 pm

Thanks for the work you've put into this MK and speedfaces~
~

Exarion
Cooltrainer
Posts: 249
Joined: Thu Jul 17, 2014 10:07 am

Re: Guessing IVs on Generation 3 early

Post by Exarion » Sat Apr 18, 2015 5:37 am

MKDasher wrote:Technically some kind of tool could be created as well that receives a Trainer ID, and gives you a range of consecutive frames you could hit (sapphire RNG manip method), and how long do you have to wait to get those. Maybe this method would make you waste a lot of time anyway for it to be worth it, and there'd be many AI involved during the run that I'm not sure if you guys would really like the idea.
I don't see why we wouldn't do this -- once the data has been compiled, we essentially have Sapphire RNG manipulation minus 2 seconds to check trainer ID and potentially a few seconds to wait for a decent cluster.

I would be happy to look up target clusters for each trainer ID, although I'm not sure which tool I should use to find that information.
Twitch channel: http://www.twitch.tv/exarionu
Pokemon Red speedrunning guide: http://pastebin.com/CkVA5yvJ

User avatar
Amoeba
Cooltrainer
Posts: 280
Joined: Thu Apr 24, 2014 12:26 am
Contact:

Re: Guessing IVs on Generation 3 early

Post by Amoeba » Sat Apr 18, 2015 9:22 am

Ohh, this being bumped reminded me; I was using the iv checker yesterday and, on a Quirky 13/10/9 mudkip, it gave about 100 results, all quirky but included ones with >20 atk ivs and <20 sp.atk ivs etc.
~

User avatar
roushmore917
Schoolkid
Posts: 40
Joined: Thu Jul 31, 2014 8:14 am

Re: Guessing IVs on Generation 3 early

Post by roushmore917 » Sun Apr 19, 2015 3:54 pm

Amoeba wrote:Ohh, this being bumped reminded me; I was using the iv checker yesterday and, on a Quirky 13/10/9 mudkip, it gave about 100 results, all quirky but included ones with >20 atk ivs and <20 sp.atk ivs etc.
Ok, so I guess I can't mentally keep hiding behind this facade that I'm "gone" anymore... I just can't keep this up.

I did some resets last night, and I tried actually using the RNG Reporter method of looking for good seeds. I would look up my TID while still in the truck, then while "mom" introduces herself and you to the house, would scramble with my right hand to input the SID into windows calculator, convert to hex, copy and paste into RNG Reporter (which i defaulted to show my specific "runnable" natures and MINIMUM runnable IVs, albeit possibly missing some potentially GOOD runnable plus natures, but with this method, it probably wouldn't matter, all i have to do is hit a frame), and while going through the rest of the intro text, simple look at the data for exactly which Kip I wanted. Note: the RNG reporter also shows hidden power BP and Type, so that factors into my decision (I found myself starting at frame 8200 and checking for up to 500 frames later, but I also pick up the PC potion...)

After my first 3 trials, I found my average difference between my timer and the in-game frames (I start my timer now after selecting Yes to my character's name), and am getting a consistent 5 frames OR LESS (I never actually HIT the exact frame, but got 1 frame off twice in 20 total resets using this method).

Although I'd like to consider this cheating due to using tools to help find our stats (are we trying to create human TAS bots yet?), but the method works. We may not be able to accurately grab the seeds we want, but it is very possible to pick and choose our mudkips now, if ya got amazing timing... Keep in mind that I never really left, and I've had Fadez beside me since last Sunday doing trials on this method, when we were trying to figure out if we could manipulate for a set seed (spent 4 hours looking for patterns, came up with none)... but this is the next best thing.

Good Luck fellas,

Roush

speedfaces
Bug Catcher
Posts: 22
Joined: Wed Apr 15, 2015 3:35 am

Re: Guessing IVs on Generation 3 early

Post by speedfaces » Mon Apr 20, 2015 3:15 am

Lookup machine updated once more, everything should be working as intended for both Mudkip and Squirtle (finally!)
https://mega.co.nz/#!VohBBRpS!JzdxGRmGh ... tFsvZ58qcQ

*One interesting thing I forgot to note: I was confused earlier testing out one of webster's Mudkips because it wasn't showing any results in the 7600-10k frame range. As it turns out, he actually grabbed the Mudkip on frame 7599 or so. As such, I adjusted the default start frame from 7600 to 7575 because it's a good number.
Amoeba wrote:Ohh, this being bumped reminded me; I was using the iv checker yesterday and, on a Quirky 13/10/9 mudkip, it gave about 100 results, all quirky but included ones with >20 atk ivs and <20 sp.atk ivs etc.
The problem was that I wasn't handling the HP, ATK, or SPE IVs on Mudkips not matching. That's been fixed.
Exarion wrote:
MKDasher wrote:-snip-
I don't see why we wouldn't do this -- once the data has been compiled, we essentially have Sapphire RNG manipulation minus 2 seconds to check trainer ID and potentially a few seconds to wait for a decent cluster.

I would be happy to look up target clusters for each trainer ID, although I'm not sure which tool I should use to find that information.
This doesn't strike me as something that would be too hard to do either, now that I'm more familiar with the predictive stuff. You could just go through and look for a good-natured Mudkip with IVs over a certain value (any runners mind suggesting what minimums they'd like to see in a Mudkip they find this way?) I'll see what I can get running tonight, maybe (the UI for this shouldn't be nearly as complicated as the one I just got finished with.)
roushmore917 wrote: Although I'd like to consider this cheating due to using tools to help find our stats (are we trying to create human TAS bots yet?), but the method works. We may not be able to accurately grab the seeds we want, but it is very possible to pick and choose our mudkips now, if ya got amazing timing... Keep in mind that I never really left, and I've had Fadez beside me since last Sunday doing trials on this method, when we were trying to figure out if we could manipulate for a set seed (spent 4 hours looking for patterns, came up with none)... but this is the next best thing.
I don't really think it's cheating. RNG manipulation has always been possible, but nobody is going to maintain it until the end of the run like a TASbot could. And yeah, with practice hitting a frame is not that tough, so I think it's definitely viable.

Exarion
Cooltrainer
Posts: 249
Joined: Thu Jul 17, 2014 10:07 am

Re: Guessing IVs on Generation 3 early

Post by Exarion » Mon Apr 20, 2015 6:16 am

Hitting a specific frame is not the way to go, for several reasons:

1) Trying to hit a single frame at 60 FPS would actually make the run more reset-heavy
2) Variance caused by good/bad stats is not nearly as high as variance caused by Abra, good/bad criticals and encounters
3) Unlike other games (HG for Red fight, Sapphire for T&L fight), there isn't a single Speed IV that saves a ton of time over the one below it

Simply aiming for a good cluster -- something like 7/10 passable Mudkips, or 5/10 decent Mudkips, or 3/10 really good Mudkips -- is likely the best strategy. The main goal should be to decrease the number of resets, thus giving runners more chances at getting a good Abra and completing a run. Keep in mind that the two best T&L times on record had 13/10/9 Mudkips, while hundreds of 14/11/9-10 Mudkips have died to Abra.

With that in mind, here's a shot at ranking Mudkip natures, followed by some key thresholds and a few "minimum runnable" Mudkips:

1. Rash
2. Naughty
3. Mild
4. Lonely
5. Naive
6. Hasty
7. Lax
8. Neutral
9. Quiet
10. Brave
11. Gentle
12. Relaxed
13. Sassy
14. Adamant
15. Jolly
16. Impish
17. Careful
(The four -Attack natures are always unrunnable)

IV thresholds
(ranked in order of importance)

3 IV Speed (get 1 Carbos to speedtie Carvanha, outspeed Grovyle and outspeed Mightyena)
6 IV Speed (outspeed Mightyena with no Carbos)
30 IV Sp. Attack (OHKO Shelly's Mightyena in Torrent, use fast T&L strat)
29 IV Attack (one higher stat point than 28 IV from Lv. 16-26)
18 IV Attack (5-hit Poochyena)
8 IV Sp. Attack (save 1-2 turns on Nosepass, OHKO Flannery's Numel)
24 IV Speed (outspeed Winona's Altaria)
18 IV Speed (outspeed Archie's Crobat at +1)

Minimum runnable Mudkip #1
Nature: Neutral
HP: 15
ATK: 23
DEF: 15
SA: 8
SD: 15
SPD: 9

Minimum runnable Mudkip #2
Nature: Neutral
HP: 0
ATK: 27
DEF: 0
SA: 8
SD: 0
SPD: 15

Minimum runnable Mudkip #3
Nature: Neutral
HP: 0
ATK: 20
DEF: 15
SA: 30
SD: 15
SPD: 6

Minimum runnable Mudkip #4
Nature: Brave
HP: 15
ATK: 7
DEF: 15
SA: 8
SD: 15
SPD: 20
Twitch channel: http://www.twitch.tv/exarionu
Pokemon Red speedrunning guide: http://pastebin.com/CkVA5yvJ

speedfaces
Bug Catcher
Posts: 22
Joined: Wed Apr 15, 2015 3:35 am

Re: Guessing IVs on Generation 3 early

Post by speedfaces » Mon Apr 20, 2015 6:57 am

I do see what you mean about Abra being a complete dick. If only there were some way we could analyze the RNG to get an Abra more consistently...

Trashing the old contents of this post to ask something more valuable. So how exactly can I determine the cutoff point for "runnable?" It looks like it's pretty varied depending on a number of factors. I don't know all of the things about Emerald that would make one set of IVs runnable and one not. Right now I have >= 6 spe and no -atk nature as hard rules that give pretty big clusters, but obviously we want harder criteria than that. I can try to infer some other rules from your examples, or you (and other runners) could give me some more rules that you think would be useful that I can plug into my code. Pretty much any information is useful since I think I'll have to check factors against one another in quite a number of ways for this.
Last edited by speedfaces on Mon Apr 20, 2015 7:58 am, edited 1 time in total.

Locked

Return to “Generation 3”

Who is online

Users browsing this forum: No registered users and 3 guests