This commit adds a large fundamental change to KEP, that being Gym Rematches.
This is achieved alongside a rework to the script that makes those post-game-gating NPCs shift around. If you add a new one, just add its constant to the lists you'll see in the Hall of Fame script.
It also fixes a few bugs:
- Fixed a bug where Cinnabar Gym loaded a fleet of Blaines. This occurred due to the way he is coded at base, and a misunderstanding I had when implementing his scaling. This is now fixed by standardising his gym script instead, while letting the gym trainers still use the old one.
- Fixed a bug where the Up-Grade NPC would not appear after beating Silph Co. 11F. However, Giovanni currently seems to have trouble with his text. This floor needs some re-coding anyway, given we need to add Jessie and James to it.
And some misc. changes:
- Changed the first Moon Stone in Mt. Moon to a Poison Stone for the Nidoking speedrunners
- Debug Mode now has a line of code to set up the post-game easily
- Changed Surge's initial battle text to Yellow's
- Added Sabrina's more accurate LGPE initial battle text, referring to the spoon she bent by accident
This is basically done, but has a few glitches to iron out that I don't have time to do today. So, I'm sending this in as-is with the intent to finish (or someone else can idc) it later.
I initially thought to restrict this to after Vermilion Gym but Persian is really bad and Arcanine doesn't compare to the L30 Dugtrio, so I think it's ok. Just barely balances itself out.
Bugs:
- GiveMonName doesn't work properly for the Vermilion Beauty after receiving the Pokemon, jank ensues.
- Text scrolls immediately when receiving the Pokemon from the Vermilion Beauty.
- Attempted to fix the Mt. Moon J&J encounter (did not work, will look at the script file)
- Fixed a few bugged warps relating to Mt. Moon Square/Crater
- Fixed the credits text layout (just need to figure out how to decrease the delay between them, so it still matches the music...)
- Added the Crater guard back
- Changed the silhouettes in the credits to be more prominent Pokemon (Leader and E4 aces, plus some postgame teasers in Omega for the Chief fight, and the legendary wings)
Still need to find out what I want to do with Body Slam, Swords Dance, and Thunder Wave. Slam/SD are on the Sevii Islands, and TWave is on an existing NPC who usually gives Self-Destruct.
Could possibly refactor the item receiving text.
This adds Victory4 in its original form over Mt. Moon Square's music, which could possibly have the initial jingle removed. I noticed the GSC version was being used, which wasn't ideal.
Mt. Moon Square's map is added, with accessibility where the Crater's originally was (for now). One warp on the south part of the map doesn't go anywhere (actually it's a glitch city). The shop and Clefairy event aren't done yet.
The Mt. Moon Crater Guard has been removed with the pretence of re-adding him on the Square map once it's finished.
I'm trying out having the text in the raw script file without farcalling, which seems to be more optimal than doing it the way the devs originally did it. The Battle Tent does this too.
This update does a good few things. Giovanni now uses his unused encounter theme in all pre-fights, which is followed by the regular evil trainer theme when you're about to fight him. This feels very correct. His team has also been minorly altered.
I backported LGPE's pre-fight monologue for Giovanni in Rocket Hideout B4F. Adapted for RB's story, of course, no Cubones here. The original text is very awkward and abrupt, and it also makes the encounter theme feel much more effective in delivery. I think a lot of people can appreciate this.
I also backported Jessie and James for Rocket Hideout B4F while I was at it. I had to change their event script quite a bit for it to fit, and their walking seems...awkward. Regardless, it's functional. The rest will be done with time.
To make future dev door testing easier, I'm keeping all warps I've previously used in comments.
I messed up Garnet Cavern's 2F name for some reason
Also added all the warps which are, ironically, exactly the same as the international Cerulean Cave. Added the event for Galarian Articuno but gee I hope the constant skip doesn't cause any issues
Includes the same healing pad that was in Lavender Tower, as a reward for getting halfway! Trainers can't currently see you, which I'll fix once I've added the trainers on 2F and 3F.
This adds the first half of an event where you will find the Galarian Birds. It is not finished yet.
It currently bugs out when Galarian Zapdos tries to run away and I don't know why. Frame-by-frame, it seems to be when the player has to move. I've tried different things to make this less bad, but they don't work.
Here's how it's meant to go:
1) Articuno flies away (done)
2) Zapdos barges past the player like Silver does in GSC (bugs out)
3) Moltres moves in front of the player and engages (not done)
If anyone has a better way to do this, please let me know!
Minor changes;
- Connection for Brunswick-Citrine looks nicer
- Celeste has a few changes to make the event run easier.
The groundwork for Brunswick Trail events has been done. Wild data, Cactus event, and Zapdos-G events are set up, plus an NPC. This also makes the Fake Tree sprite available.
I made the warp at the tunnel in Brunswick goes directly to Celeste Hill and back. Warp tile made functional.
Many bugs right now:
- Cactus doesn't disappear after battling it. Also, making this work how I want it to is hard.
- Pokemon are encountered on every tile, which is likely because it's considered to be indoors. In trying to fix this, I seemed to completely screw up the maps, so this isn't being committed. Handle this with care.
- I made a spriteset specifically for Citrine, but it doesn't seem to be working for Brunswick, likely because Brunswick is an indoor map and thus isn't just taking it.
Misc. changes:
- Moved Sandy Shocks to a 4% encounter slot in Mt. Moon Crater to be equal to Scream Tail.
- Restored the proper translation for the "rotten PRESIDENT" scientist, courtesy of Dr. Lava and Nob Ogasawara.
Right now I'm facing a weird bug where if you enter, you get the quote, but the fight doesn't start and it happens while you're stepping for some reason. Very odd.
This adds the Mega Punch & Mega Kick guys from FireRed and LeafGreen.
Given Mega Punch was in Mt. Moon, and GF replaced it with Thief in FRLG, I decided to change the TM to the Wing Fossil, which currently isn't obtainable outside of Mt. Moon Crater.
So this isn't working very well. It's halfway there and worked exactly once with what I can only describe as a cosmic ray event.
Here's how it's intended to work: Right as you open the Card Key door, Omega comes barging through, having previously been fighting with Giovanni.
The walking and stuff seems to work, but there are three issues:
- Omega's battle doesn't start, causing a softlock. `call TalkToTrainer` seems to be the iffy point. Note that this code is usually used when talking to a static entity.
- The music bugs out as Omega walks over; this may be linked to the above problem.
- Once these issues are alleviated, Omega will have to disappear, but this isn't a massive deal.
Also includes a dev door in Red's room to easily access the event, and minor code cleanup with Viridian Pre-Gym and Oak's lab - just unnecessary comments.
A guy in a Safari Zone Rest House will hand you a Meltan he found lost. It's built off the Lapras guy in Silph.
Also changes the positions of some trader NPCs in the Pokemon Centres to match the others.
Replaces the nonsensical Crocky static with a more fitting Wugtrio encounter. Currently (hilariously) makes the Champion theme play in the battle, working on a fix later
This is a cave that connects Bill's Lighthouse and Route 10, only accessible after Surf is obtained. Contains a static Dragonite as a reference to the anime!
This code has a lot of problems with solutions that me and Frrf can't seem to figure out. We've taken a lot of references from Erika's Gym but we've got many bugs after Yujirou is defeated, such as one case where you end up instantly doing the rematch fight, which is insane because there's no way this can actually happen.
What's committed is a fight that can be re-fought when it shouldn't.
Seems to interact oddly with Saffron but I believe this is because of the way Team Rocket works. The event itself works fine.
Also added the Up-Grade, as before, Porygon was evolving via Trade.
Uses text referencing LGPE, and has a similar location.
Because of the sprite limit in Saffron, the Pidgeot NPC has been removed.
This adds the Dubious Disc Salesman to Cinnabar Pokemon Centre. I chose this area because it's late in the game and it seemed a bit iffy to constantly have to go with Pokemon Centres not in towns. Cinnabar has some connection to Silph, so it makes more sense than just balancing.
There are probably improvements that could be made (eg. a quote as you buy) but the salesman code is surprisingly brittle so I'd rather not break stuff for hours for something that already works perfectly fine.
- Replaces the Old Rod with the Candy Sack, an item to evolve Meltan into Melmetal. Meltan and Melmetal aren't in yet.
- Improves Gym Leader and Elite Four AI by a lot. They still use items, they're just better. Fixes XSpecial use while we're at it; before, it didn't actually increase the stat...
- The Scarlet Book now takes up both shelves, one section for each Paradox Pokemon. I also moved the bookshelf so it looks nicer.
- Text in Celadon University has been reduced significantly, taking up less memory and being a bit more RBY-like. It has also been made more accurate (thanks to Daiginjo for translating my booklet!)
- The Magikarp researcher in Celadon University now gives TM Dragon Rage (no longer unused!)
- Added a guard for Mt. Moon Crater.
- Removed TrainerNamePointers, Blank Leader Name Code, and Dakutens/Hakutens using a guide published by YakiNeen.
- PP no longer uses a shitty graphic and is instead properly implemented into the font, optimising the status screen. Also displays in-battle which is kinda cool.
- Lorelei, Bruno, and Agatha now play the Gym Leader theme, not just Lance.
Still unsure how to fix Celadon University's trainers, all I know is a lot of the information should be taken from the Oak fight I did. The code is radically different and doesn't call trainer headers at all. You'll likely want to start from scratch.
The Mt. Moon Crater Guard's text is a little wonky, not sure what's up there. May have been from the way I accessed Mt. Moon in testing. Anyway, if you want to mess around feel free.
I am 90% sure something will bug out, can't test the map right now for obvious reasons. Tested everything else, though.
Mostly copied data from Cinnabar Volcano while commenting out Vermillion Dock Mew info to move it.
Wild data has been added along with a fishing group, just dummied out slots.
Old Sea Chart is a clone of the Citrine Pass which is all it needs to be. It is obtainable near the truck.
Overall completes Celadon University sans a problem with sprites being a bit corrupted until you leave. New Magikarp Salesman-esque events in other pokecenters which is kinda neat
This adds;
- Text and stuff on the interior to add some really nice worldbuilding
- Trainers outside that you can fight with repeatedly.
The trainers need yes/no menus but I can't figure it out for the life of me. If anyone can do it, lemme know!