1 2
9 10 11 12 13
GoddessMaria
She/Her
Reviewer, Experienced player (862)
Joined: 5/29/2009
Posts: 518
Location: Hell...
Since I got the confirmation to do so, here it is. Pokémon Gen 3 Lua Script Creator: MKDasher Supported emulator: BizHawk Features:
    Supports all Gen 3 main games (R/S/FR/LG/E) Currently only US and JP versions are supported. Will have to manually add support for other regions. Easy to use interface RNG viewer for battles, encounters, catch rate, and even Pokérus
[/left] NOTE: On Bizhawk, go to Config / Display... Then uncheck Stretch pixels by integers only. ALWAYS make sure to backup your progress! There is a chance that BizHawk will crash suddenly because of the script. EDIT: There was a problem with luainterface (the pre 2.0 lua) that occasionally causes memory leaks. For those using the older BizHawk versions before 64-bit exclusivity, always backup your progress. For those using the latest versions of BizHawk, you should be fine as lone as you use kopi-lua/nLua.
Current projects: failing at life
Skilled player (1737)
Joined: 9/17/2009
Posts: 4979
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
GoddessMaria wrote:
ALWAYS make sure to backup your progress! There is a chance that BizHawk will crash suddenly because of the script.
Did you tried using the latest version of BizHawk, using kopi-lua/nLua: There was a problem with luainterface (the pre 2.0 lua) that occasionally causes memory leaks. If it still happens please report it. Also, thanks for posting the script!
GoddessMaria
She/Her
Reviewer, Experienced player (862)
Joined: 5/29/2009
Posts: 518
Location: Hell...
Sadly I have not tried it on the latest version of BizHawk since I don't have an easily accessible Win-64 PC to test on, but I believe it will work all the same. Will update the post to include that. Thanks!
Current projects: failing at life
Experienced player (675)
Joined: 2/5/2012
Posts: 1786
Location: Brasil
kinda unrelated but has there been any research about feebas tiles?RNG
TAS i'm interested: Megaman series, specially the RPGs! Where is the mmbn1 all chips TAS we deserve? Where is the Command Mission TAS? i'm slowly moving away from TASing fighting games for speed, maybe it's time to start finding some entertainment value in TASing.
Fortranm
He/Him
Editor, Experienced player (877)
Joined: 10/19/2013
Posts: 1121
Experienced player (675)
Joined: 2/5/2012
Posts: 1786
Location: Brasil
i'm trying to find mem adresses tables for the roaming pokemon location,but datacrystal and bulbapedia don't have any(i'm playing sapphire btw),if anybody has it,i'd appreciate, even if it's not for sapphire.
TAS i'm interested: Megaman series, specially the RPGs! Where is the mmbn1 all chips TAS we deserve? Where is the Command Mission TAS? i'm slowly moving away from TASing fighting games for speed, maybe it's time to start finding some entertainment value in TASing.
Fortranm
He/Him
Editor, Experienced player (877)
Joined: 10/19/2013
Posts: 1121
I thought MKDasher's new lua for Gen 3 already had this function?
Joined: 1/6/2012
Posts: 51
Location: France
grassini wrote:
i'm trying to find mem adresses tables for the roaming pokemon location,but datacrystal and bulbapedia don't have any(i'm playing sapphire btw),if anybody has it,i'd appreciate, even if it's not for sapphire.
RAM adresses concerning roamers for Ruby/Sapphire (except Jpn versions) : 0x02026A5F : TV news flag (byte, highest byte of the bit) 0x0202887C : PID (double-word) 0x02028880 : species (word) 0x02028882 : HP (word) 0x02028884 : Lv (word) 0x02028886 : Status (double-word ?) 0x0202888B : KO or not (byte, lowest byte of the bit) 0x02039302 : Location (word, a map index value)
Experienced player (675)
Joined: 2/5/2012
Posts: 1786
Location: Brasil
Thanks for the help!
TAS i'm interested: Megaman series, specially the RPGs! Where is the mmbn1 all chips TAS we deserve? Where is the Command Mission TAS? i'm slowly moving away from TASing fighting games for speed, maybe it's time to start finding some entertainment value in TASing.
Skilled player (1737)
Joined: 9/17/2009
Posts: 4979
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
Not sure where to ask, but are there any glitch moves that helps tremendously in contests? Also is the route mentioned in https://pastebin.com/GjPxMXGu still up to date? Not going to attempt it; just curious.
Joined: 1/6/2012
Posts: 51
Location: France
jlun2 wrote:
Not sure where to ask, but are there any glitch moves that helps tremendously in contests? Also is the route mentioned in https://pastebin.com/GjPxMXGu still up to date? Not going to attempt it; just curious.
There are not that many glitch moves that can be used in contests as battle animations are always displayed (almost every glitch move animation will crash or randomly crash the game), and as glitch moves names are also displayed (they overwrite some RAM data when read, which can freeze the game if the move name is too long). I never really looked into this as I focused more on speedrun routes, so I don't know if the values used for contests can be overwritten with a glitch move name or not. Else, I didn't work again on a 4-star TAS route. I worked on 3-star routes (league, battle frontier, contests), who are almost done. (aside from small improvements or new techniques, I think that some RNG-related things are left to work on) 3-star TAS route : https://pastebin.com/q6sbycRb 3-star speedrun route : https://pastebin.com/05131g0z I don't really remember how was the 4-star route, but I think that I would need to nearly redo it with the data from the 3-star route in order to include better strategies and Pokémon choices.
Skilled player (1737)
Joined: 9/17/2009
Posts: 4979
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
Not TAS related, but is it possible to corrupt a pokemon's XP in the daycare to be a very large value? Or any quick way to get to level 99 outside quick dupe rare candies for casual play?
Joined: 12/29/2007
Posts: 489
With ACE you can do anything, but the setup would probably take much longer than just repeating the cloning glitch 17 times.
Joined: 1/6/2012
Posts: 51
Location: France
jlun2 wrote:
Not TAS related, but is it possible to corrupt a pokemon's XP in the daycare to be a very large value? Or any quick way to get to level 99 outside quick dupe rare candies for casual play?
The "gained Exp" value at Day Care is stored in a double-word, so you can easily corrupt it with a Glitzer Popping (Pomeg Glitch Data Corruption), by holding Up for less than 10 seconds (I don't have the exact timing for this one). However, I need to see where this value is located related to the data of the Day Care Pokémon because it is also easy to corrupt a Day Care Pokémon and turn it into a Bad Egg. The easiest working method that I see to corrupt a Pokémon's Exp would be to use a Glitch Pokémon with a specific species name. This species name, when read by the Slateport Poké Fan Club Reporter, would corrupt the value managing the party slot of the currently fighting Pokémon, setting it to something near 200 (computation of the exact value needed). Then, by having a fully KO party (with Pomeg Glitch) and by making a wild battle, you would send out a Pokémon made from the data of this party slot. Since this data will not be valid Pokémon data (incorrect checksum), the game will corrupt it while trying to turn the "current Pokémon" into a Bad Egg. This corruption would then corrupt the amount of Exp gained at Day Care without corrupting the data of the Day Care Pokémon (nor anything else important). This corruption procedure would basically allow you to gain 0x0500 000 or 0x4000 0000 exp, something that would put your Pokémon to Lv 100 immediatly (some Glitch Exp Curves need more than that to get to Lv 100, though). However, this procedure still involves a randomness part (due to the game's DMA), and the success chance would be something like 2-3-4 out of 32. Else, you can use the same principle to corrupt the amount of Rare Candies you have (https://pastebin.com/Ke3wUsZX) in PC to gain 0x4000 additional exemplaries. That would only be 1 corruption, and Rare Candy levelling then. Else, with ACE you can set up the "Gained Exp" value to whatever you want, but this means that you need to set up everything for ACE, and you still need to perform an ACE for every Day Care Pokémon (there is no way for now to set up a persistent ACE that would be preserved by screen transitions or things like that).
merrp
She/Her
Player (20)
Joined: 7/31/2019
Posts: 56
For a few days I've been working on a TAS of the Japanese version of Emerald, that will use a different lategame route and beat the game using ACE. It won't require beating the Weather Institute, fighting Brendan again, beating Winona, or traveling through Victory Road, etc. At the moment this is just a WIP, any feedback is appreciated. One of the things not shown here that I'm currently struggling with is avoiding encounters on the Mach bike--on foot you can just pause a frame or two, but that doesn't work as well with the bike. :/ The trainer name is signifcant; when encoded as an ARM instruction it represents a relative jump of +15 double words. Abra's nickname is also significant, it will be used as the "bootstrap" code for ACE. Mudkip's nickname is not significant and I just picked it since it was short. Also of note is that in the final run it's not necessary to beat Brawly, but I did here anyway, as I haven't decided what shorter fight(s) I'm going to go for instead to make Mudkip evolve into Marshtomp. I'm also going to clean up waiting for Wally's Ralts to generate so that his Zigzagoon kills it--RNG wasn't nice to me there and as a result I had to wait a bit, but I can reduce the time by spending a bit longer in the first battle with the Youngster since the RNG advances faster there. Link to video
Editor, Expert player (2072)
Joined: 6/15/2005
Posts: 3282
Hello merrp. I have a few comments about your WIP. - Your video seems to indicate that the RNG value is always seeded at 0 and goes through the formula: seed × [41C64E6D] + [6073] without being reseeded at any point in this TAS. Is that true in Pokemon Emerald? I haven't done Emerald for a while so I may be confusing it with Ruby/Sapphire/Fire Red/Leaf Green. - What is the Lua script you are using? Do you have a way to indicate things like critical hits? - 2:15: It is faster to talk to the girl instead of walking up beside her. (It might not matter because of the delays.) - 5:20: IIRC it is faster to walk over and talk to Mom to get the running shoes. - You definitely have to beat Brawly to activate Norman's gym. (Unless you mean to say that Norman's gym is skippable all together in this exploit.) I'll say more if anything else comes to mind.
merrp
She/Her
Player (20)
Joined: 7/31/2019
Posts: 56
The RNG is in fact reseeded right after the trainer name is confirmed--it's just difficult to see at 60 fps. The value it's seeded with is precise more or less to the CPU cycle (it uses one of the GBA's timer registers, which starts when the naming screen is entered). It can be influenced somewhat by pressing more or fewer buttons in the naming screen, as pressing buttons takes more/less cycles than not pressing any. Of course, waiting also allows for different initial seeds. I aimed for a seed that would give me a good Mudkip PID 6018 RNG cycles later--the approximate time it takes to get to the starter selection. The Lua script I'm using is custom; for critical hits, an exclamation point appears next to the damage value. I plan on making the display prettier, I just started using it instead of RAM watch to display values. After some discussion in the Discord, I discovered that I do in fact have to beat Brawly--I was under the impression that he could be skipped until Ever Grande, but as you said, I do have to beat him to fight Norman. For Mudkip, I already have to wait about half a second or so to get the PID I want, so talking to the girl instead won't save time, I'll just have to wait longer in the starter selection. At 5:20, I'll test talking to Mom instead and see if it's faster. There might be a chance that the few frames saved might enable an easier fight, but I'll have to test it to find out. Edited for a more in-depth explanation and clarity.
merrp
She/Her
Player (20)
Joined: 7/31/2019
Posts: 56
There's still a few, mostly minor time saves in this, but I did make it to the end. This beats the game with 5 badges with arbitrary code execution. Final input at 231382 frames, 01:04:33.80 https://www.youtube.com/watch?v=p0Nyrp8yPOw Link to video List of things I know of and am likely going to fix: - Frames can be saved waiting for Wally's Ralts by spending more time in the battle with the Youngster beforehand. - I recently wrote a 7 instruction payload that is a little more difficult to work with, but requires one less Poochyena, so I will be updating the later parts of the run with that. - Am not sure if I can skip the wild battle just before Pomeg glitching, or if there is a setup without the extra battle + fleeing. The setup for Pomeg glitch is one of my weaker areas of knowledge - Maybe some minor time saves with better movement in a few areas. - Haven't tested it, but I might be able to knock out 1 Ralts with Marshtomp late in the run instead of two Zigzagoon and it'll still work. This is done to change one of the glitch moves Marshtomp gets to not crash the game. Alternatively, I could knock out a pokemon that yields 2 Speed EVs somewhere else, maybe. - It may be worthwhile to catch 1 Oddish instead of Poochyena and use Sweet Scent to RNG for an encounter that gives good corruption offsets, since the wait times can be upwards of a few seconds otherwise. Again, I'd have to test it.
Joined: 1/6/2012
Posts: 51
Location: France
Wow that's really impressive ! If I understand things right, you perform a double corruption on your Marshtomp (with Corruption Type 1 maybe ?) in order to get an ACE Glitch Move, and you only use Pokémon nicknames+OT to store an ACE code that allows you to launch credits. Do you think that a similar nickname manipulation could be done on non-japanese versions (who have less characters to work with) ? Else, regarding the trigger of the Pomeg Glitch, one of the ingredients is the party slot of the last fighting Pokémon. So in your last necessary battle (the one where you kill a Zigzagoon to get some Speed EVs, if your Marshtomp is in the 3rd,4th,5th or 6th party slots, you will be able to send an empty slot to the battle once your party is reduced to KO Poochyena + KO Abra. So yeah, you can trade the final battle before triggering Pomeg Glitch for a party Pokémon swap + a switch during the Zigzagoon battle. (you could also put KO Poochyena - KO Poochyena - Marshtomp as the first party Pokémon, that could be faster than switching to Marshtomp and having an extra exp gain)
merrp
She/Her
Player (20)
Joined: 7/31/2019
Posts: 56
Yeah, the double corruption is performed on Marshtomp, the PID, TID & SID were manipulated so that two corruptions (the one that sets bit 6) on the PID and ID would swap EVs for moves to acquire the glitch move. I haven't found a better glitch move than 0x3110 on JP, unfortunately getting it requires the extra Protein and HP Ups. The two Speed EVs are to make the second glitch move not crash the game--without them, you can't even open the move select, because its name is so long it causes an overflow, I think. A similar manipulation can be done on non-Japanese versions, but the bootstrap code (the animation script and address to jump to) has to be written with something other than nicknames, since the bytes required aren't available. I explored using Pokemon EVs to write the animation code, but it didn't seem practical. Glitch items can also be used if available, but would of course need a different glitch move to target them. Glitch move 0x3110 targets 0x02330000, RNG'd to be Abra's nickname. The code on Abra is: 1F 50 00 33 02 (FF), which calls CreateSoundTask and jumps to 0x02330050. The code on the Poochyena is an 8 instruction loop that calls the software interrupt for VBlank, reads from the joypad and writes the lower 8 bits consecutively into memory, and loops back if L&R are not pressed. When L&R are pressed it jumps to the start of the code written. The code I ended up inputting is a simple credits warp but is very easily changed. So if I set up the party order as KO Poochyena - KO Poochyena - Marshtomp - Abra, I'll still be able to perform the pomeg glitch? Using the menu to switch is likely much faster than an extra battle, and I can just do it when I already use the menu on Route 106 to teleport.
Experienced player (675)
Joined: 2/5/2012
Posts: 1786
Location: Brasil
does it activate post game events normally, is it a real completion flag for the game or not?
TAS i'm interested: Megaman series, specially the RPGs! Where is the mmbn1 all chips TAS we deserve? Where is the Command Mission TAS? i'm slowly moving away from TASing fighting games for speed, maybe it's time to start finding some entertainment value in TASing.
merrp
She/Her
Player (20)
Joined: 7/31/2019
Posts: 56
This version does not; however it's very easy to switch the final payload to set those flags, or even to end the battle and warp into the Hall of Fame map, whichever is faster.
Joined: 1/6/2012
Posts: 51
Location: France
So if I set up the party order as KO Poochyena - KO Poochyena - Marshtomp - Abra, I'll still be able to perform the pomeg glitch?
Yes, you can either : KO 2 Poochyena (and other things) Reorder the party as : KO Poochyena - KO Poochyena - Marshtomp - Abra - Poochyena - Poochyena Make the last Zigzagoon Battle or : KO 1 Poochyena (and other things) Reorder the party as : X - X - Marshtomp - X - X - X Make the last Zigzagoon Battle and switch to Marshtomp In both ways, after the last Zigzagoon battle, the value for the Party Slot of the fighting Pokémon will be 0x02 (corresponding to party slot 3). Then, once you will deposit 4 Pokémon and use a Pomeg Berry on Abra, your party will be : KO Poochyena - KO Abra Then, when you make an additional battle, the game will not find any alive Pokémon, will not update the value for the Party Slot of the fighting Pokémon, and send the Pokémon at party slot 3 (an empty slot). Else, have you tried picking a Qualot Berry to change Marshtomp Def EVs to see if the new 2nd move you obtain after double-corruption is harmless ? That could be a bit faster than an extra Zigzagoon fight, and you could do the previous process on the Wingull fight. (let Abra's HP fall to 1 then switch to the Poochyena at Party Slot 3 and flee (if you can flee) // let Abra's HP fall to 1 then switch to the Poochyena at Party Slot 4, send out the Poochyena at Party Slot 3 and flee // move Abra to party slot 3, let a Poochyena die, then switch to Abra and let its HP fall to 1 and use Teleport)
Editor, Expert player (2072)
Joined: 6/15/2005
Posts: 3282
Hm, interesting run. Some comments: - It seems like you take longer paths in Granite Cave (~18:04) and after leaving Mauville Gym (~33:23) here. - You mentioned saving frames (waiting for Wally tutorial Ralts) by waiting in the Youngster battle, so it scrolls at 2 RNG cycles per frame. I think you can scroll it faster by running near the spinner at ~6:22 and in the grass, so it scrolls at least 2 cycles per frame from rerolling the spinner duration every frame, and you get free grass rolls (and possibly others). - If I understand the data corruption correctly, you are setting up 0x10 HP EVs and 0x31 Attack EVs so you can make the game think you have the move 0x3110 when you corrupt the PID. Would Pokerus be helpful here, to cut down on the extra fights (and maybe collect less Protein)? Pokerus check occurs after every battle (regardless of result) and you just need RNG value of 4000xxxx/8000xxxx/C000xxxx , though it might be hard to find. - Is double corruption necessary? Would it be possible just by corrupting PID instead of both PID and TID? (Bad eggs can still use moves, and move #1 is not affected by the changed PID.) - Have you considered whether other forms of data corruption are possible to get move 0x3110? Looking at the data substructures seems to indicate that it is possible to have an experience of 0x3110 and turn it into move #3 using corruption.
merrp
She/Her
Player (20)
Joined: 7/31/2019
Posts: 56
Hm, I wasn't aware spinners advanced the RNG every frame you ran near them, I thought it was only when you crossed the center of a tile. However that might be useful for the corruption manipulation to make the wait go by faster. Hm, I had thought I took the fastest route in Granite Cave and in Route 111/113/114. I also haven't quite figured out a good way to avoid encounters on the bike besides slowing down for a tile? Is there an optimal route drawn out somewhere? I considered getting Pokerus, but I would have to get it rather late, as otherwise I'll gain too many EVs just from fighting mandatory trainers, and like you said, RNG frames with those properties seem rather rare. I guess I could look at the route and see if there is a place where I could get pokerus and still end up with the right EVs. The main thing to save would be to avoid picking up the 3rd protein that's out of the way. Can I still use a bad egg (and use an elixir on it) even if I deposit all other Pokemon? I figured the game wouldn't let me have just a bad egg in my party. A single PID corruption is definitely faster though. As for other corruption types, I'm not sure experience works, it might be too difficult to get exactly 12560 experience on Marshtomp. Not to mention, changing the PID for Marshtomp of course requires redoing the entire run because IVs and rng will change, unless I was lucky and there is an identical nature/IV PID a few frames after the one I'm using. Alternatively, if I were to use experience i could catch a wild pokemon. I'll look into it.
1 2
9 10 11 12 13