• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Red hack: Shin Pokemon Red/Blue/Green/JP builds (Bugfix, AI, and QoL patch)

45
Posts
2
Years
    • Seen yesterday
    I've encountered a nasty glitch using the sleep/freeze clauses. It makes some trainer pokemon have infinite HP and become unbeatable.

    Shin Pokemon Red/Blue/Green/JP builds (Bugfix, AI, and QoL patch)


    It seems to happen when the enemy trainer inflicts a status on your Pokemon and then decides to switch out. I can make it happen fairly consistently against the Bellsprout trainer in Victory Road.
     
    536
    Posts
    4
    Years
    • Seen yesterday
    I've encountered a nasty glitch using the sleep/freeze clauses. It makes some trainer pokemon have infinite HP and become unbeatable.

    It seems to happen when the enemy trainer inflicts a status on your Pokemon and then decides to switch out. I can make it happen fairly consistently against the Bellsprout trainer in Victory Road.

    I've been looking at the function that checks if the sleep or freeze clause triggers. I really should be ashamed of the horrific mess of spaghetti code that I created. But I think I found the problem. I'm pretty sure the HandleSlpFrzClause function clobbers an address used for copying HP data when an opponent switches. It does this when copying the active battle data (HP, status, etc) to the party data. This results in the switched-in pokemon pulling a new HP value somewhere in the range of 0 to 65,535. You can still beat it. You just have to be...persistent.

    Anyway here's what all I did to improve things:
    1 - Back up and restore all registers with push/pop when HandleSlpFrzClause is called to prevent clobbering.
    2 - When calling HandleSlpFrzClause during trainer AI routines, back up the value of whose turn it is and force it to the enemy's turn. Restore this value when complete.
    3 - HandleSlpFrzClause should solely copy the status condition byte from the active data to the party data. Don't make it more complicated that it needs to be.
    4 - Remove all the fancy popping and pushing and jumping around. Rework the function to have a top-to-bottom procedure flow. Easier to follow and less room for error.

    I've attached a patch from my working dev build. You can patch a fresh rom file and see if the problems with the slp, frz, and item clauses go away.
     

    Attachments

    • shin_pokemon_blue_v1.22.2dev12072021.ips
      455.9 KB · Views: 3
    • shin_pokemon_green_v1.22.2dev12072021.ips
      466.4 KB · Views: 3
    • shin_pokemon_red_v1.22.2dev12072021.ips
      456.1 KB · Views: 2
    536
    Posts
    4
    Years
    • Seen yesterday
    Hi there! :)

    I just played Pokémon Shin Green up to the end! Honestly, I really loved it, it's awesome and revolutionary for sure! ;) I won't try Shin Red or Shin Blue, coz from what I've seen, there are mostly the same as Shin Green, and I chose Shin Green coz it has diferrent sprites than Red and Blue, and I wanted something really different as well! ;)

    Hi there. Glad you liked it! Sorry for the late response. I've been finishing up some things IRL.

    But yes, you are correct. The versions are just there for personal preference and have only minor differences.

    What I really liked in your game:
    - The fact that we can choose to make trainers harder! Oh my! What a great change is that! Of course, I activated it since the beginning. At first it was difficult (when I faced Beedrill in Viridian Forest), but I really enjoyed the challenge all the game! It's so great to have the choice for the difficulty! (It makes me remember Black2, though in that game, it's only activated after Elite 4) Great job for this! ;)

    Yeah. I don't mind rom hacks that try to be hard. But also I sometimes want to turn my brain off and play on autopilot. Its going to be impossible to strike a balance here that pleases everyone, so I try to give options instead of impositions.

    - The inclusion of the Move Deleter and the move relearner! Serisouly, those should have been present in the very orginal games (Gen 1 and 2)! They're very useful and convenient! The move deleter is the only way we can get rid of HM moves, and the move relearner allow us to obtain moves Pokémon learn at earlier levels, but that we missed them. There were no way in the originals Gen 1 games to do this!!! They're very useful! Awesome change and awesome job for this! ;) Thanks so much! ;)

    Your welcome. They seem like no-brainers now, but it's just something that wasn't thought about much until around 1999. Too many tropes from 90's RPGs were lingering around at it took a while ideas like this to gain traction.

    - The new content after Elite 4, like Oak's battle, Fuji's battle, etc. Very interesting, and it makes us play our game much longer than the original! ;) Good job!

    You have these old-timers who are alluded to have been deeply involved with pokemon in the past. I always wondered what their teams would be like had they been trainers in their youth. Former protagonists of an untold adventure.

    - Some improved movesets for certain Pokémon (Such as Koffing/Weezing getting Mimic via level-up, or some like Yellow). A difference that is always appreciated! ;)

    It's a balancing act between maintaining gen 1 legality and having movesets that play well with the AI. The wrong set on a weezing can mean it will always blow itself up on turn-1, and that gets old really fast.

    - That fact you keep the same Pokémon and same moves, without adding new ones! That allows us to trade with other games (including originals) without any glitch, so it's ALWAYS a good thing! Thanks so much for this as well, coz if you had added new moves or new or fake Pokémon, I won't have played it... never!

    It's part of what makes Gen 1 what it is. For better or worse. Really, I mainly kept it this way so that I could transfer my teams into Stadium and finally beat Round 2 after 20 years.

    - The fact we can have rematches with most trainers! What a great change for sure! No need for VS Seekers or Pokégaer calls to have rematches! A very nice and great feature that should be in the originals! Great and awesome job for this! ;) I love this!

    I never understood why the official games made us jump through hoops just to have extremely limited rematches. You're standing right there. Just challenge them again. It doesn't make the game any less fun, so why throw barriers in front of the player?
    - The sprites from Green is a real difference as well! They make a real change insted of the same from Red and Blue! Thanks so much! ;)

    Japanese builds are coming this month. Complete with original pokedex translations and metric units.

    - The fact that all marts have TMs on sale! It's a really good thing in itself, especially coz TMs are single-use and not like the ones in Gen 5, which they can be used infinitely in Gen 5. Anyway, thanks so much! ;)

    There's actually not enough item space available to support reusable TMs. 50 spots in the PC and 20 in your bag. So I had to get creative.
    - The fact we can sell our Pokémon. A new different thing useful for getting money.
    - The fact we can obtain coins by showing a Pokémon. Very good in itself too! ;)
    - The new tournament on S.S. Anne was aawesome too. It meks me remember the batle Tower in later gens! Great job for this! ;)

    I didn't even plan that stuff. It born out of me going "Oh, hey! I wonder what I can do if I play around with this section of code!"

    What I liked less in your game:
    - Well, the dialogs are mostly the same (about 90%) as the original game. I was quitte aware of that, and it's not a big problem in itself, but different dialogs would be great... Just a suggestion...

    Me no write gud.

    - I would have liked some TMs to be different, especially the uselss ones like TM37 (Too restricted!), TM41 (Too much restricted!) or TM04 (Whirlwind is completely useless in trainer battle!). There are other move possibilities... It's just a suggestion, but it doesnt ruin your game at all, don't worry! ;)
    - TM compatibilities with Pokémon could have been updated as well, according to later generations... I would have loved that, but then again, it's just a suggestion...

    Again. Trying to keep things gen 1 legal for better or for worse. For worse in this case.

    Bref, I really love your game in general, and I will always keep it in my games to play it again for sure! ;) Thank you so much for it, and for all the efforts you made! It's clear that you have put lots of work, passion and determination into it, and I really felt it all the way! I recommend it to everyone, coz it's flexible for everyone! I never seen a Pokémon game like this one!

    I'll be adding more options in the next version.

    You should become a part of the real Pokémon Team who makes real Pokémon games! ;) I'm sure they would love your ideas! ;) Revolution is always great! ;) You have lots of potential for sure! ;)

    Japanese work culture. Been there, done that. I'm too expensive to put up with that again.

    If you have other games like this one, and from Gen 2 too, I'm very interested to try them!

    Good luck, and good success, in your future projects! ;)

    They aren't my projects, but for follow-ups with a similar feel I recommend Perfect Crystal 2020 Update for Gen 2 and Cosmic Emerald for Gen 3.
     
    45
    Posts
    2
    Years
    • Seen yesterday
    About trainer rematches being limited in the original games: that's probably because they're overpowered. If you can infinitely rebattle the same trainer it means:

    1) There's no reason to grind wild encounters.
    2) You accumulate a ton of money.

    Grinding wild Pokemon is an intended part of the experience, since it leads you to naturally discover all the encounters in each route. Romhacks that focus heavily on trainer rematches (like Crystal Clear) aren't very fun because they render a large part of the game pointless. Even in Shin, I try to avoid doing too many rematches because it breaks the difficulty curve. It leads to the player having more money than they should at that point in the game.
     
    694
    Posts
    7
    Years
    • Seen Feb 22, 2024
    About trainer rematches being limited in the original games: that's probably because they're overpowered. If you can infinitely rebattle the same trainer it means:

    1) There's no reason to grind wild encounters.
    2) You accumulate a ton of money.

    Grinding wild Pokemon is an intended part of the experience, since it leads you to naturally discover all the encounters in each route. Romhacks that focus heavily on trainer rematches (like Crystal Clear) aren't very fun because they render a large part of the game pointless. Even in Shin, I try to avoid doing too many rematches because it breaks the difficulty curve. It leads to the player having more money than they should at that point in the game.

    I personally love the rematch part. It's arguably my favorite part of this hack, along with many, many others. If your team becomes too high leveled, turn on level scaling, maybe?
     
    45
    Posts
    2
    Years
    • Seen yesterday
    Just tried out the latest master dev branch. Current glitches:

    - Many NPCs aren't effected by text speed settings. e.g., the NPCs in the Pewter City pokemart.
    - I couldn't get the new disobedience mechanic to work.
    - Using sleep clause, when your Pokemon is asleep and you swap out, it sometimes wakes up "off screen".
    Save state: https://www.mediafire.com/file/nzdivo2g45hy361/shin_pokemon_blue_v1.23-01.sgm/file
    It should happen upon switching out Spearow. It behaves oddly, switching between asleep/awake as I battle with a different mon.

    Other thoughts:
    - The rival Abra getting Tri Attack feels really out of place. I think something like Mega Punch is more appropriate.
    - Vanilla text before fighting a fished pokemon is longer than normal wild encounters ("The hooked X attacked!" instead of "Wild X appeared!"), resulting in the text box needing scrolling. It would be great if it could be shortened.
    - The new Old Rod is far too powerful. It lets you catch formerly end-game water types like Staryu at level 20+ in Vermillion. Staryu stands out the most since in vanilla it's a strictly salt-water Pokemon found by the sea routes.
    - Yes/No prompts by hack-introduced NPCs behave differently from vanilla ones. The reversed No/Yes order is fine, but being unable to cancel them by pressing B is bothersome.
     
    Last edited:
    536
    Posts
    4
    Years
    • Seen yesterday
    Just tried out the latest master dev branch. Current glitches:

    - Many NPCs aren't effected by text speed settings. e.g., the NPCs in the Pewter City pokemart.

    I just checked all three guys in the Pewter Mart and I'm not seeing a problem.
    - I couldn't get the new disobedience mechanic to work.
    - Using sleep clause, when your Pokemon is asleep and you swap out, it sometimes wakes up "off screen".
    Save state: https://www.mediafire.com/file/nzdivo2g45hy361/shin_pokemon_blue_v1.23-01.sgm/file
    It should happen upon switching out Spearow. It behaves oddly, switching between asleep/awake as I battle with a different mon.

    I'm still tweaking the code a bit.

    - The rival Abra getting Tri Attack feels really out of place. I think something like Mega Punch is more appropriate.

    It fits for what I'm trying to do. It's a bit of a battle trap for the player. Abra's 100 base special largely makes it beefy against the player's special moves. Tri-Attack is there because it is 100 accuracy, with no other effects, and is 80 power to make up for abra's 15 base attack. It will take pot-shots at the player with Tri-Attack, and an unwary player might be baited into using moves like scratch, gust, horn attack, or double-kick. Doing so and failing to KO the abra leads to a 50% chance that it will strike back with Counter for punishing damage.

    - Vanilla text before fighting a fished pokemon is longer than normal wild encounters ("The hooked X attacked!" instead of "Wild X appeared!"), resulting in the text box needing scrolling. It would be great if it could be shortened.

    "The hooked" would need to be replaced with something that consists of 4 characters in order to get everything on a single line. I've yet to find a good option.

    - The new Old Rod is far too powerful. It lets you catch formerly end-game water types like Staryu at level 20+ in Vermillion. Staryu stands out the most since in vanilla it's a strictly salt-water Pokemon found by the sea routes.

    The max level generated for the Old rod is 19 (that is 12 + a random number between 0 to 7). This is consistent with route 11 wild pokemon next to Vermilion City. The chance of actually fishing up a Staryu with the old rod is 3.125% per cast, but I've been wanting to replace it with Psyduck.

    - Yes/No prompts by hack-introduced NPCs behave differently from vanilla ones. The reversed No/Yes order is fine, but being unable to cancel them by pressing B is bothersome.

    The No-Yes menu was coded by Gamefreak. I just reused it. Regardless, this was not a difficult request to do.
     
    536
    Posts
    4
    Years
    • Seen yesterday
    Might be user error, but how do I download?

    Go to the github page. Navigate to the IPS patches folder. Select the desired patch. Click the Download button on Github to download the ips patch. Use a patcher like Lunar IPS to apply it to the correct rom file.
     
    45
    Posts
    2
    Years
    • Seen yesterday
    I just checked all three guys in the Pewter Mart and I'm not seeing a problem.

    It seems to be inconsistent. I'll have to look around more.

    "The hooked" would need to be replaced with something that consists of 4 characters in order to get everything on a single line. I've yet to find a good option.

    "Wild" (4 char) can be changed to "Lured" (5 char). You can then change "Attacked" (8 char) into a word that only takes 7. For example, "Pounced" or "Strikes". "Lured X strikes!" could work.

    The max level generated for the Old rod is 19 (that is 12 + a random number between 0 to 7).

    That's definitely not the case. I saw level 22 Staryu, level 26 Goldeen, and level 25 Krabby.


    Overall I'm impressed where this hack is going. Playing with things like instant-text it feels like how RBY always should have been. It's a splendid project.
     
    536
    Posts
    4
    Years
    • Seen yesterday
    For the text speed bug, here's a save state: https://www.mediafire.com/file/srpz4h3h8e9wkau/shin_pokemon_blue_v1.23.sn1/file

    If you talk to that girl the text isn't instant. It gets fixed after reloading a regular save.

    Thanks. This helps a lot.

    I found out what was wrong with the text speed. The HRAM address used for recording who moved first in a round is FFF4. But this is also unknowingly used to clear some delay flags involved with text. The problem can be created by exiting a battle right after a round where the enemy went first. This address can be cleared and the problem corrected by reading the pokedex entry of a pokemon you own. Either way, I moved H_WHOFIRST to the unused address FFF2 to prevent this problem from showing up again after using the pokedex to correct it.

    On the rods, it looks like you caught a mistake I made. The RodResponse function is getting used for all the rods now, so 0-7 levels were getting added twice each time the Good/Old Rod routine runs.

    The SLP/FRZ clause handler is now read-only when it comes to party data. I discovered that the party data gets updated automatically in-between rounds, so trying to update it during the clause handler is unnecessary. I ran the the new code against your save state with Fearow vs Clefairy, and everything checked out.

    I was trying some things to slightly boost the rate of over-leveled obedience, but the way the math is processed makes things kinda wonky. I went back to Gamefreak's default obedience formula, and now it works as intended.

    I updated the patches in master_dev so that you can independently verify.
     
    45
    Posts
    2
    Years
    • Seen yesterday
    - I just got to the "ketchup" mechanic. 10/10, great pun.
    - The levelled disobedience limits definitely need tweaking. Level 15 is reasonable for Brock, but for everyone after it needs to be at around 5 levels higher. Right now you constantly brush into the limit and it lets gym leaders use higher level Pokemon than the player. I feel its main purpose should to be stop the player from overlevelling a single Pokemon to steamroll the game (which is normally the optimal strategy due to the game's XP formula), which means it doesn't have to be that tight. Personally I hate level caps and prefer the solution of later generations where XP is decreased when you outlevel the opponent. I'm assuming that's difficult to implement, so these caps might be a necessary evil.
    - I've been trying out the 60fps mode, and although it looks great, it makes the NPC sprite jitter stick out more. This problem was fixed in the gen 2 engine, so I've been wondering how hard it would be to backport.

    On an unrelated note, if you ever feel like implementing larger-scale original content that's faithful to the developer's vision, you could go about reimplementing this cut city:
    https://tcrf.net/Prerelease:Pokémon_Red_and_Blue#Capsule_Monster_Pitch
    Shin Pokemon Red/Blue/Green/JP builds (Bugfix, AI, and QoL patch)


    There was originally supposed to be another city right below Celadon. The only information we have the concept label "C" (since "T" is Tokyo, maybe Chiba?) and this rough placeholder map:
    https://tcrf.net/Development:Pokémon_Red_and_Blue/Unused_Maps#Exteriors
    Shin Pokemon Red/Blue/Green/JP builds (Bugfix, AI, and QoL patch)


    Looking at the vanilla map of Celadon, there's an awkward space near the cut tree. That's a possible place to put an entrance:
    Shin Pokemon Red/Blue/Green/JP builds (Bugfix, AI, and QoL patch)


    The hack has a growing amount custom NPCs. It might make sense to create a new location for them as the overworld gets crowded.
     
    536
    Posts
    4
    Years
    • Seen yesterday
    - I just got to the "ketchup" mechanic. 10/10, great pun.

    I've been working on my Dad-jokes. Pokemon is full of silly puns.

    - The levelled disobedience limits definitely need tweaking. Level 15 is reasonable for Brock, but for everyone after it needs to be at around 5 levels higher.

    Agreed. It's too punishing. Upping them all by 5 levels should do the trick.

    - I've been trying out the 60fps mode, and although it looks great, it makes the NPC sprite jitter stick out more. This problem was fixed in the gen 2 engine, so I've been wondering how hard it would be to backport.

    Yeah, it's still experimental. It's less about implementation and more about how the overworld is updated between frames. Gamefreak implemented a lot of lessons-learned in programming the Gen 2 games, so they are much more efficient in this regard. The Gen 1 vanilla games all have stuttering; I checked my old cartridges on my unmodded GBC to make sure I was still sane. It's very slight, but it's still there. The old TFT screens do a good job of hiding it. Modern LCD screens, doing stuff like 60 fps, and running shoes all combine to make it more and more noticeable.

    I may be able to make the overworld engine run more efficiently, but this is a long-term goal. The SHARP processor needs to do all the updates in under 16.6 milliseconds.

    There was originally supposed to be another city right below Celadon. The only information we have the concept label "C" (since "T" is Tokyo, maybe Chiba?) and this rough placeholder map

    I'm well aware of all the Capsule Monsters data that has come out, but I haven't the slightest clue about what I'd want to do with that alpha location. Something to keep on the back burner. With Saffron as the last map in the map list, I speculate that the "T" is for "Tower" and that the raid on Silph Co was going to be the climactic ending. The "C" then probably stands for "Cave" which I speculate was what became the Seafoam Islands considering there is unused pokemart data between Fuchsia and Cinnabar.
     
    536
    Posts
    4
    Years
    • Seen yesterday
    - I've been trying out the 60fps mode, and although it looks great, it makes the NPC sprite jitter stick out more. This problem was fixed in the gen 2 engine, so I've been wondering how hard it would be to backport.

    I did some very minor optimizations which help a little bit. But I've narrowed down the main sources of dropped frames that are inherent to gen 1's code:

    1 - There is 1 frame of lag right at the start of a movement from one square to another. The tile data for the direction the window scrolls needs to be searched and loaded, and this takes longer than 1 frame to complete.

    2 - The sprite updater for the overworld can normally be run in just under 1 frame. But the audio engine can sometimes take just long enough that the sprite updater cannot complete before the next screen refresh. This typically happens when all the audio channels need updating such as during an intense chord. The result is that this creates another 1 frame of lag at random times with a lot of trainers around.

    In the vanilla 30FPS game, there are is an extra frame of delay just to buffer against this kind of stuff. But you lose this buffer in 60FPS mode.
     
    81
    Posts
    3
    Years
  • I did notice in the latest release there was an ability to switch item bags so that more items can be carried
    though I wonder if there's a way to increase space on the pc item storage system to more than 50

    I kinda ask cuz I have to sell or throw away some of my unused TMs since I can't carry all 50 of them or store all 50 TMs in the item pc storage
     
    Back
    Top