• 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)

536
Posts
4
Years
    • Seen today
    Would that be possible for Shin to fold in later on if desired? I realize that it looks like there's some extra steps involved.

    Yeah, that would be possible. I'd handle it with instructions for self-compiling like I do for the green or yellow front sprites. I'd have to do some tests to see if I can do a 1:1 replacement of the back sprites or if I have to move stuff around memory banks.
     
    536
    Posts
    4
    Years
    • Seen today
    Version 1.11 has been added to github. This fixes a major bug that affects most of the previous versions. Trainer pokemon now have the correct statexp amounts instead of what was found to be ~54,000 for each stat. Trainers in the game will be a little less tanky as a result. Oopsies.
     

    darthbr

    Banned
    237
    Posts
    8
    Years
    • Seen Dec 8, 2023
    how do i compile this? i want to use the shin version without the rematches and shiny animation.
     
    536
    Posts
    4
    Years
    • Seen today
    how do i compile this? i want to use the shin version without the rematches and shiny animation.

    I did make ips patches for the lite branch if that's what you are looking for. Otherwise follow the instructions in install.md. Anyone on the pret/pokered team can help you.
     

    darthbr

    Banned
    237
    Posts
    8
    Years
    • Seen Dec 8, 2023
    I saw the IPS patches, the lite version is perfect for me, but i want to add 151 like the master version.
     
    1
    Posts
    4
    Years
    • Seen Feb 14, 2020
    IUsing 1.11 ips patch, trainer escape glitch is still possible, at least with the fisherman on route 12.

    Edit 1:
    Was successfuly able to spawn a level 7 Blastoise so there's that. I know that since stats have changed it may be harder to get the pokemon you want but it can still be exploited.

    Also to add to what Chronosplit said, would you ever consider implementing in Drenn's full color overworld?

    Edit 2: you can also still fish in the pokemon statues, I'm assuming surf as well. While we're on the topic, would it be possible to add fishing rod to the select qol function? I had an idea on how it would conflict with select as surf if that was implemented (haven't got surf yet to test) maybe a dialog box to choose between fishing and surfing (not really vanilla is it) or B+select to fish. (Cleaner implementation if you ask me)

    Edit 3: I was somehow able to spawn a missingno this way and it came along with the 6th slot item glitch.

    Had to bend the rules of the glitch a bit but here's the steps to recreate:

    1. use pokecenter in lavender
    2. trainer fly glitch with rt.12 fisherman fly to vermillion.
    3.fight and beat first trainer West of vermilion on rt.11 ekans is his only pokemon
    4.enter first room of diglett tunnel and use dig (or escape rope) returning you to lavender.
    5.head to route 12 to trigger battle
    6. Hey look a missingno!
     
    Last edited:
    536
    Posts
    4
    Years
    • Seen today
    The trainer escape glitch has been low on my priority list since it takes deliberate effort to do it, but maybe it's time for me to look at it. The main hole that needs to be plugged is preventing the player from bringing up the main menu after triggering a trainer.

    The statue bases being treated as shoreline was something I forgot about. I can fix that with one or two lines of code.

    Adding full color is beyond the scope of this project. I thought about it, but it would likely break compatibility with pre-GBC hardware and be more work than I'm willing to do right now.

    B+Select is a good idea for the fishing rod. I just have to mull it over a bit. Overworld stuff like that is a little tricky since it assumes you are calling the functions from a menu.
     

    Chronosplit

    I play for keeps!
    492
    Posts
    13
    Years
    • Seen today
    I thought about it, but it would likely break compatibility with pre-GBC
    I'm pretty sure that this is true for most color hacks unfortunately, pokered-gbc included. In order to use the GBC to it's full potential (in other words, the GBC's added memory/processor power and I think the full color capability) you can't really make it a hybrid. Super Mario Land 2 DX isn't compatible with Game Boy/Super Game Boy because it needs that mode to reduce the slowdown present in the original game, for example.

    And of course, it'd be insane to ask to keep a version with and without color due to how everything would be different from the ground up between the two (I mean that literally, just a quick look at the source code says that).
     
    Last edited:
    18
    Posts
    9
    Years
    • Seen Jun 7, 2023
    This hack is perfection and I love the new AI. Just one question, would it be possible for you to make a version that uses the spaceworld front/back battle sprites?
    Shin Pokemon Red/Blue/Green/JP builds (Bugfix, AI, and QoL patch)
     
    536
    Posts
    4
    Years
    • Seen today
    This hack is perfection and I love the new AI. Just one question, would it be possible for you to make a version that uses the spaceworld front/back battle sprites?
    Shin Pokemon Red/Blue/Green/JP builds (Bugfix, AI, and QoL patch)

    So quite a few folks have been asking for swaps with different sprites. Here's how I'm going to handle this so I don't have to make 16 different patches for every update to cater to every combination.

    I'll expect people to clone and compile the shinpokered project themselves with their preferred changes (the pret/pokered team has instructions to do this). There's a folder with instructions on how to change the front sprites to green or yellow version. It's just a matter of swapping the memory banks that hold the sprites (done with the included modified main.asm and pokered.link), and then doing a replace-all in the new main.asm for the correct folder (bmon replaced with ymon or whatever).

    So all I really need to do is add folders for the Starworld beta sprites which can be had from the associated pret team disassembly.
     
    18
    Posts
    9
    Years
    • Seen Jun 7, 2023
    Thanks for the quick reply. I think replacing the rgmon front sprites with spaceworld would work with your modified files, but I get this error message when making.

    rgblink -d -n pokered.sym -l pokered.link -o pokered.gbc audio_red.o main_red.o text_red.o wram_red.o
    error: Unknown symbol 'TrainerRematch'
    make: *** [Makefile:52: pokered.gbc] Error 1

    I don't know how to make the bigger spaceworld backsprites work.
     
    536
    Posts
    4
    Years
    • Seen today
    Thanks for the quick reply. I think replacing the rgmon front sprites with spaceworld would work with your modified files, but I get this error message when making.

    rgblink -d -n pokered.sym -l pokered.link -o pokered.gbc audio_red.o main_red.o text_red.o wram_red.o
    error: Unknown symbol 'TrainerRematch'
    make: *** [Makefile:52: pokered.gbc] Error 1

    I don't know how to make the bigger spaceworld backsprites work.

    Uh...crap. I forgot to update that modified main.asm, so it's not finding certain custom functions. I'm planning on redoing that instructional anyway. In the meantime, try adding the following lines somewhere at the bottom of that file.
    INCLUDE "custom_functions/func_ai.asm"
    INCLUDE "custom_functions/func_battle.asm"
    INCLUDE "custom_functions/func_enc_gen.asm"
    INCLUDE "custom_functions/func_misc.asm"
    INCLUDE "custom_functions/func_monlists.asm"
    INCLUDE "custom_functions/func_overworld.asm"
    INCLUDE "custom_functions/func_shiny.asm"
     
    536
    Posts
    4
    Years
    • Seen today
    IUsing 1.11 ips patch, trainer escape glitch is still possible, at least with the fisherman on route 12.


    Edit 2: you can also still fish in the pokemon statues, I'm assuming surf as well. While we're on the topic, would it be possible to add fishing rod to the select qol function? I had an idea on how it would conflict with select as surf if that was implemented (haven't got surf yet to test) maybe a dialog box to choose between fishing and surfing (not really vanilla is it) or B+select to fish. (Cleaner implementation if you ask me)

    Quick dev update for what I'm currently testing.

    I've got it so you cannot surf or fish in statues.

    I've plugged a hole on trainer escaping. Trainers spotting you will stop fly/teleport/rope entirely by clearing the appropriate bits in wram. The trainer battle then initiates as normal.

    Bike and fishing rod now have a quick-key combo to use them. Bump up to some shoreline and press Select while holding A; you will use the best rod in your bag. Do the same thing while not facing shoreline to use the Bike in your bag.
     
    536
    Posts
    4
    Years
    • Seen today
    V1.12 is up now on github. Fixes for trainer escape and fishing/surfing in statues have also been migrated to the lite branch.
     
    18
    Posts
    9
    Years
    • Seen Jun 7, 2023
    I downloaded the latest version and followed the instruction.md to use spaceworld front and back sprites, but this error happens when I try to make.

    ERROR: main.asm(575):
    Section 'Pics 1' is too big (max size = 0x4000 bytes).
    make: *** [Makefile:42: main_red.o] Error 5
     
    536
    Posts
    4
    Years
    • Seen today
    I downloaded the latest version and followed the instruction.md to use spaceworld front and back sprites, but this error happens when I try to make.

    ERROR: main.asm(575):
    Section 'Pics 1' is too big (max size = 0x4000 bytes).
    make: *** [Makefile:42: main_red.o] Error 5


    Aww crap. What a mess. These sprites are large enough to require two whole extra memory banks. This is going to take some figuring out.

    EDIT: So the spaceworld front sprites will work just fine. It's the spaceworld back sprites that are a problem. Just to give some perspective, Gen 1 pkmn back sprites are 18898 bytes while spaceworld pkmn back sprites are 43287 bytes! So the banks for front and back sprites need to be increased from five to seven.

    Problem 1 - five rom banks for pics is hardcoded. I need to rework UncompressMonSprite in home.asm to support seven banks.

    Problem 2 - Gen 1 back sprites are super-compressed so the game is hardcoded to scale them up by 2 (a space-saving measure by Gamefreak). Doing this with the spaceworld back sprites will cause them not to load properly. The scaling function needs to be bypassed.

    Edit 2: Okay, got it to work. I pushed updated instructions to the master branch. I'll update the lite branch over the weekend.
     
    Last edited:
    18
    Posts
    9
    Years
    • Seen Jun 7, 2023
    Aww crap. What a mess. These sprites are large enough to require two whole extra memory banks. This is going to take some figuring out.

    EDIT: So the spaceworld front sprites will work just fine. It's the spaceworld back sprites that are a problem. Just to give some perspective, Gen 1 pkmn back sprites are 18898 bytes while spaceworld pkmn back sprites are 43287 bytes! So the banks for front and back sprites need to be increased from five to seven.

    Problem 1 - five rom banks for pics is hardcoded. I need to rework UncompressMonSprite in home.asm to support seven banks.

    Problem 2 - Gen 1 back sprites are super-compressed so the game is hardcoded to scale them up by 2 (a space-saving measure by Gamefreak). Doing this with the spaceworld back sprites will cause them not to load properly. The scaling function needs to be bypassed.

    Edit 2: Okay, got it to work. I pushed updated instructions to the master branch. I'll update the lite branch over the weekend.

    Thanks. Those little back sprites were an eyesore. I noticed something weird after checking all the pokedex though, Dugtrio and Dewgong have scrambled front sprites.
    Shin Pokemon Red/Blue/Green/JP builds (Bugfix, AI, and QoL patch)
     
    Last edited:
    536
    Posts
    4
    Years
    • Seen today
    Thanks. Those little back sprites were an eyesore. I noticed something weird after checking all the pokedex though, Dugtrio and Dewgong have scrambled front sprites.
    Shin Pokemon Red/Blue/Green/JP builds (Bugfix, AI, and QoL patch)

    Interlacing is wrong. Looks like it's pulling the file dimensions from the wrong place.

    Go into data/baseStats/dewgong.asm.
    Change pic/bmon/dewgong.pic to point instead to pic/swmon/dewgong.pic
    Now do the same for dugtrio and any others that have the same problem.

    EDIT: Ultimately, I think I'm going to have to define string symbols for all the front pic filepaths, keep those symbols in one new file, then replace all the filepath strings with those symbols. That will keep everything modular.
     
    Last edited:
    536
    Posts
    4
    Years
    • Seen today
    Okay, here's the current status of switching out the front and back sprites (for both master and lite branch).

    Here's what goes on normally:
    -->In main.asm there are filepaths to all the front and back pokemon pics that are included for the compiler.
    -->In every pokemon's baseStat file, the filepath to its front pic is listed in order to grab its size from the first two bytes of the pic.
    -->Changing the sprites properly means having to edit the filepath in all 151 baseStats files as well as doing a replace-all in main.asm.

    Here's what I did to make it less painful:
    -->There is a new constants file called monfrontpic_constants.asm. This file defines string symbols for all the front pic file paths. This way one can simply refer to the symbol in other asm files and the compiler will interpret it as the proper filepath string.
    -->In main.asm there are filepaths to all the back pokemon pics that are included for the compiler. All the front pic filepaths have been replaced by their equivalent symbols.
    -->Every pokemon's baseStats file has been edited to use the proper symbol in place of the front pic filepath.
    -->Changing the sprites means you just have to do a replace-all in main.asm for the back pics and monfrontpic_constants.asm for the front pics.

    The folder for sprite switching has updated instructions. There is a modified main.asm and pokered.link file that expands the memory banks for front and back pics to seven instead of five. There is also a function you have to paste-over in home.asm. Refer to the additional instructions for adding spaceworld back sprites because they require two additional function modifications to interlace correctly.
     
    Back
    Top