The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > ROM Hacks Showcase > Sideshow Showcase
Reload this Page Red Shin Pokemon Red/Blue/Green/JP builds (Bugfix, AI, and QoL patch)

Notices
For all updates, view the main page.

Sideshow Showcase The place to show side-projects that you're working on, for the small yet still big things you want to do, such as translation patches, "386" patches, and anything small like that.

Ad Content
Reply
Thread Tools
  #226   Link to this post, but load the entire thread.  
Old December 27th, 2020 (10:15 AM).
jojobear13's Avatar
jojobear13 jojobear13 is offline
 
Join Date: Nov 2019
Posts: 484
There was a typo in the object data of the unknown dungeon basement that affects the Green patches. I've fixed it and re-uploaded new Green patches. Please try again with these new patches if you are using Green version.
__________________
Author of Shin Pokemon Red/Blue/Green. A Gen 1 hack focusing on bugfixes, better AI, and QoL/151 enhancements. Come say hello in the sideshow thread.
Reply With Quote
  #227   Link to this post, but load the entire thread.  
Old January 1st, 2021 (11:43 PM).
jojobear13's Avatar
jojobear13 jojobear13 is offline
 
Join Date: Nov 2019
Posts: 484
After some discussion with my Reddit liaison, I've started work on a very simple randomizer for Shin Pokemon. I'm planing to have it be a unix bash script that can be run under cygwin with core utilities. The user will be prompted to input the name of the rom file as well as the banks and hex addresses of some important labels I'm adding to the .sym files (the .sym files will be added to the github). From there, the script will automatically do the necessary hex-editing on the rom file.

While it does require a little more skill than the nice GUI options for other game, the tradeoff is that it is compatible with all unix-based operating systems and environments (very handy for developers). It will also continue to work when I make new updates to Shin Pokemon.

Initial plans are as follows:
--Mew, Mewtwo, and the bird trio are unaffected since their encounters are handled by map scripts and I don't want to mess with that yet.
--Likewise, scripted pokemon (gifts, in-game trades, fossils, game corner, etc) are slated for later.
--But your starters will get randomized of course.
--151 availability is only in the master branch since that is already built into the rom itself.
--Random encounter-able land & water pokemon will be randomized on a global scale (all instances of one species become all one other species).
--Super rod pokemon will be randomized on a global scale.
--Trainer pokemon will be randomized on a global scale.
--Pokemon are put into A, B, and C tier lists. Randomization occurs within each separate list to prevent something like Brock throwing 2nd-stage evolutions at you.
--No move randomizer planned yet since it takes a while to do it in a way that prevents soft-locking.

Current status: I can accurately write bytes to a rom file, and I can randomize an array of pokemon hex values. Looking feasible but I have a long way to go.
__________________
Author of Shin Pokemon Red/Blue/Green. A Gen 1 hack focusing on bugfixes, better AI, and QoL/151 enhancements. Come say hello in the sideshow thread.
Reply With Quote
  #228   Link to this post, but load the entire thread.  
Old January 3rd, 2021 (10:46 PM).
jojobear13's Avatar
jojobear13 jojobear13 is offline
 
Join Date: Nov 2019
Posts: 484
So the randomizer bash script is making progress. I had to make sure VIM was installed to Cygwin so I could access the xxd command. Starter pokemon and trainer rosters can now be randomized.
__________________
Author of Shin Pokemon Red/Blue/Green. A Gen 1 hack focusing on bugfixes, better AI, and QoL/151 enhancements. Come say hello in the sideshow thread.
Reply With Quote
  #229   Link to this post, but load the entire thread.  
Old January 4th, 2021 (6:37 AM).
zycain zycain is offline
 
Join Date: May 2020
Posts: 9
Hey Jojo, hope youre keeping well, good to see progress is still going well with this rom :) so i discovered the New Game+ mechanism and played around with it a bit, saving my party to a box first then setting up with a junk pokemon ready to switch over (i actually did this several times to get it all just how i wanted it and experiment with the mechanism, and i believe i have found a bug, i left the old game with 80 pokemon in the bank and switched into the new game with only 78, when i got to the pokedex i can see whats going on, even though i have bulbasaur in the bank and i picked charmander this time, the pokedex is showing bulbasaur as not owned (no pokeball) so i'm guessing its something to do with the initial selection process clearing out the pokedex for the options i didnt pick? or something is re-setting any found status on the first 3 as you select one? not sure but yeah have at it :)
All the best :)
Reply With Quote
  #230   Link to this post, but load the entire thread.  
Old January 4th, 2021 (11:20 AM).
jojobear13's Avatar
jojobear13 jojobear13 is offline
 
Join Date: Nov 2019
Posts: 484
Quote:
Originally Posted by zycain View Post
Hey Jojo, hope youre keeping well, good to see progress is still going well with this rom :) so i discovered the New Game+ mechanism and played around with it a bit, saving my party to a box first then setting up with a junk pokemon ready to switch over (i actually did this several times to get it all just how i wanted it and experiment with the mechanism, and i believe i have found a bug, i left the old game with 80 pokemon in the bank and switched into the new game with only 78, when i got to the pokedex i can see whats going on, even though i have bulbasaur in the bank and i picked charmander this time, the pokedex is showing bulbasaur as not owned (no pokeball) so i'm guessing its something to do with the initial selection process clearing out the pokedex for the options i didnt pick? or something is re-setting any found status on the first 3 as you select one? not sure but yeah have at it :)
All the best :)
Wait, did Pokémon get deleted from the PC? Or is it the owned Pokémon in the Pokédex?
__________________
Author of Shin Pokemon Red/Blue/Green. A Gen 1 hack focusing on bugfixes, better AI, and QoL/151 enhancements. Come say hello in the sideshow thread.
Reply With Quote
  #231   Link to this post, but load the entire thread.  
Old January 4th, 2021 (11:53 AM).
zycain zycain is offline
 
Join Date: May 2020
Posts: 9
Quote:
Originally Posted by jojobear13 View Post
Wait, did Pokémon get deleted from the PC? Or is it the owned Pokémon in the Pokédex?
it didnt get deleted from the pc, just in the pokedex it's not showing as owned, and actually i just withdrew bulbasaur from the bank to test if that would trigger it to show again and it's still not showing in the pokedex as owned (with a pokeball symbol)
Attached Images
File Type: jpg IMG_4629.jpg‎ (2.30 MB, 3 views) (Save to Dropbox)
Reply With Quote
  #232   Link to this post, but load the entire thread.  
Old January 4th, 2021 (12:20 PM).
jojobear13's Avatar
jojobear13 jojobear13 is offline
 
Join Date: Nov 2019
Posts: 484
Quote:
Originally Posted by zycain View Post
it didnt get deleted from the pc, just in the pokedex it's not showing as owned, and actually i just withdrew bulbasaur from the bank to test if that would trigger it to show again and it's still not showing in the pokedex as owned (with a pokeball symbol)
Ah, I see. That's good to know. I was worried I had a much bigger problem to solve. This is an easy fix. The issue is the StarterDex function that gets called every time you look at one of Oak's pokeballs.
Code:
; this function temporarily makes the starters (and Ivysaur) seen
; so that the full Pokedex information gets displayed in Oak's lab
StarterDex:
	ld a, %01001011 ; set starter flags
	ld [wPokedexOwned], a
	predef ShowPokedexData
	xor a ; unset starter flags
	ld [wPokedexOwned], a
	ret
The problem is that the whole byte gets cleared to zero after viewing the pokedex entry and then it is placed back into wPokedexOwned. Fine if you assume that the player has no pokemon, but a problem for NG+. It should be like this instead.
Code:
StarterDex:
	ld a, [wPokedexOwned]
	push af
	ld a, %01001011 ; set starter flags
	ld [wPokedexOwned], a
	predef ShowPokedexData
	pop af
	ld [wPokedexOwned], a
	ret
I've posted an issue on the github and slated the fix for the next version.
__________________
Author of Shin Pokemon Red/Blue/Green. A Gen 1 hack focusing on bugfixes, better AI, and QoL/151 enhancements. Come say hello in the sideshow thread.
Reply With Quote
  #233   Link to this post, but load the entire thread.  
Old January 4th, 2021 (1:35 PM).
zycain zycain is offline
 
Join Date: May 2020
Posts: 9
Quote:
Originally Posted by jojobear13 View Post
Ah, I see. That's good to know. I was worried I had a much bigger problem to solve. This is an easy fix. The issue is the StarterDex function that gets called every time you look at one of Oak's pokeballs.
Code:
; this function temporarily makes the starters (and Ivysaur) seen
; so that the full Pokedex information gets displayed in Oak's lab
StarterDex:
	ld a, %01001011 ; set starter flags
	ld [wPokedexOwned], a
	predef ShowPokedexData
	xor a ; unset starter flags
	ld [wPokedexOwned], a
	ret
The problem is that the whole byte gets cleared to zero after viewing the pokedex entry and then it is placed back into wPokedexOwned. Fine if you assume that the player has no pokemon, but a problem for NG+. It should be like this instead.
Code:
StarterDex:
	ld a, [wPokedexOwned]
	push af
	ld a, %01001011 ; set starter flags
	ld [wPokedexOwned], a
	predef ShowPokedexData
	pop af
	ld [wPokedexOwned], a
	ret
I've posted an issue on the github and slated the fix for the next version.
Thats fantastic, thanks for all your hard work :)
Reply With Quote
  #234   Link to this post, but load the entire thread.  
Old January 5th, 2021 (7:02 AM).
Jurei's Avatar
Jurei Jurei is offline
 
Join Date: Nov 2020
Posts: 1
Hey jojobear13, I love this hack so far (actually my favorite one) but I would like to ask you if a japanese version of it is planned ? I've been digging through the net for a disassembly of the Green version with no success. If it's not in your plans, how would I proceed to make a translation of your hack ? (if you allow me of course). Thanks !
Reply With Quote
  #235   Link to this post, but load the entire thread.  
Old January 5th, 2021 (10:02 AM).
jojobear13's Avatar
jojobear13 jojobear13 is offline
 
Join Date: Nov 2019
Posts: 484
Quote:
Originally Posted by Jurei View Post
Hey jojobear13, I love this hack so far (actually my favorite one)
Glad you enjoy it.

Quote:
but I would like to ask you if a japanese version of it is planned ?
Not planned. I'm not multilingual.

Quote:
I've been digging through the net for a disassembly of the Green version with no success. If it's not in your plans, how would I proceed to make a translation of your hack ? (if you allow me of course). Thanks !
Shin Pokemon is open source. You can clone the github repository, set up cygwin and rgbds to compile things, and start tinkering around. The first thing you'd want to do is restore the japanese characters by either replacing the text in gfx/font.png or restoring the japanese characters somehow. Then you would want to go to charmap.asm and remap the hex values from the english letters to the japanese letters.

This is not a beginner's-level endeavor.
__________________
Author of Shin Pokemon Red/Blue/Green. A Gen 1 hack focusing on bugfixes, better AI, and QoL/151 enhancements. Come say hello in the sideshow thread.
Reply With Quote
  #236   Link to this post, but load the entire thread.  
Old January 7th, 2021 (8:29 AM).
darthbr darthbr is offline
Banned
 
Join Date: Dec 2015
Posts: 237
How to make legendaries not spawn after beating future red?
Reply With Quote
  #237   Link to this post, but load the entire thread.  
Old January 8th, 2021 (1:13 PM).
jojobear13's Avatar
jojobear13 jojobear13 is offline
 
Join Date: Nov 2019
Posts: 484
Quote:
Originally Posted by darthbr View Post
How to make legendaries not spawn after beating future red?
Go to Route25Script3 and start commenting stuff out that you want to exclude.
__________________
Author of Shin Pokemon Red/Blue/Green. A Gen 1 hack focusing on bugfixes, better AI, and QoL/151 enhancements. Come say hello in the sideshow thread.
Reply With Quote
  #238   Link to this post, but load the entire thread.  
Old January 8th, 2021 (2:08 PM).
jojobear13's Avatar
jojobear13 jojobear13 is offline
 
Join Date: Nov 2019
Posts: 484
Attn all. A basic bash script randomizer, "randoshinred", is now in beta test for those who compile the master development branch.
__________________
Author of Shin Pokemon Red/Blue/Green. A Gen 1 hack focusing on bugfixes, better AI, and QoL/151 enhancements. Come say hello in the sideshow thread.
Reply With Quote
  #239   Link to this post, but load the entire thread.  
Old January 8th, 2021 (6:33 PM).
Lord Gengar's Avatar
Lord Gengar Lord Gengar is offline
 
Join Date: Aug 2019
Location: U.S.A
Posts: 43
The randomizer sounds awesome; something that I feel more of these "expansion" hacks should implement as it creates a whole new experience- I'm tired of using the same dang 3 starters each time! lol
__________________
Reply With Quote
  #240   Link to this post, but load the entire thread.  
Old January 8th, 2021 (7:18 PM).
aicaimze aicaimze is offline
 
Join Date: Feb 2018
Posts: 40
do external randomizers still work?
Reply With Quote
  #241   Link to this post, but load the entire thread.  
Old January 9th, 2021 (12:33 AM).
jojobear13's Avatar
jojobear13 jojobear13 is offline
 
Join Date: Nov 2019
Posts: 484
Quote:
Originally Posted by aicaimze View Post
do external randomizers still work?
No. Generic external randomizers for vanilla red/blue edit bytes that have changed addresses in Shin Pokemon. The game just crashes as a result. That's why I had to make my own external randomizer from scratch.
__________________
Author of Shin Pokemon Red/Blue/Green. A Gen 1 hack focusing on bugfixes, better AI, and QoL/151 enhancements. Come say hello in the sideshow thread.
Reply With Quote
  #242   Link to this post, but load the entire thread.  
Old January 9th, 2021 (1:56 AM).
jojobear13's Avatar
jojobear13 jojobear13 is offline
 
Join Date: Nov 2019
Posts: 484
Quote:
Originally Posted by Lord Gengar View Post
The randomizer sounds awesome; something that I feel more of these "expansion" hacks should implement as it creates a whole new experience- I'm tired of using the same dang 3 starters each time! lol
I've learned that this is harder than it looks. A few things I discovered:
  • A built-in randomizer should not go editing its own rom addresses. It will not write anything if using a flash card. If an emulator even allows this in the first place, the rom changes just get lost once you close out. The rom needs to be randomized again with every startup unless there is a way to save the modified rom from the emulator. BGB will let you save, but many people play rom hacks using phone emulators nowadays.
  • So another option is for a built-in randomizer to do its randomizing on the fly. Essentially just load random mons into party rosters and whatnot as needed. This takes lots of code to implement well, and doubly so if you want a lot of different choices (bank sizes can become an issue in GBC games). It also means you cannot track wild pokemon with your 'Dex because it references the wild tables stored in the game rom.
  • Finally, and most practical, is to simply edit the rom file with an external script or program. This requires that the randomizer knows the exact bytes that need to change and their exact positions within the rom file. If an assumed position is off by even one bit, then the whole rom file is probably hosed. Programs like Universal Randomizer are created with vanilla roms in mind where all the relevant byte addresses are well-researched and set in stone. Sometimes they work for rom hacks that just so happen to avoid shifting or changing any byte addresses used by the randomizer. Often, like in Shin Pokemon's case, some assumption the randomizer makes isn't true anymore and the rom file gets hosed somewhere.
  • So that leaves me with the little external bash script I wrote. Run it in a unix terminal. Externally edit the rom. Prompt the user for banks and hex addresses from the rom's matching sym file. Then use the input from the user to point to the correct locations. Better than having to update the dang thing every time I make a small change to the game code. Anyone can see inside the .sh script file to either adapt it for their own project or (more than likely) make fun of my atrocious coding practices.
__________________
Author of Shin Pokemon Red/Blue/Green. A Gen 1 hack focusing on bugfixes, better AI, and QoL/151 enhancements. Come say hello in the sideshow thread.
Reply With Quote
  #243   Link to this post, but load the entire thread.  
Old January 12th, 2021 (5:59 AM).
jastolze007 jastolze007 is offline
 
Join Date: Jan 2017
Age: 31
Gender: Male
Nature: Bold
Posts: 650
I thought I'd report that upon testing to see if my PKMN could indeed correctly level up past 100 via the cap change I made, while rare candies work, the said PKMN doesn't gain any exp on 100. If I used a rare candy to raise it above 100 and then go into battle, it will reset to 100 and try to learn all of its level up moves. With that said, I've noticed in past Red builds I've made, that this only is affected when using a gift Pokemon. For instance, my Gyarados that I paid for when it was a Magikarp on Route 4 or starter PKMN. I know this isn't a problem from your code, but it's kinda unfortunate as I would have liked to continue to play.
Reply With Quote
  #244   Link to this post, but load the entire thread.  
Old January 12th, 2021 (10:23 AM).
jojobear13's Avatar
jojobear13 jojobear13 is offline
 
Join Date: Nov 2019
Posts: 484
Quote:
Originally Posted by jastolze007 View Post
I thought I'd report that upon testing to see if my PKMN could indeed correctly level up past 100 via the cap change I made, while rare candies work, the said PKMN doesn't gain any exp on 100. If I used a rare candy to raise it above 100 and then go into battle, it will reset to 100 and try to learn all of its level up moves. With that said, I've noticed in past Red builds I've made, that this only is affected when using a gift Pokemon. For instance, my Gyarados that I paid for when it was a Magikarp on Route 4 or starter PKMN. I know this isn't a problem from your code, but it's kinda unfortunate as I would have liked to continue to play.
What did you set as the level cap?
__________________
Author of Shin Pokemon Red/Blue/Green. A Gen 1 hack focusing on bugfixes, better AI, and QoL/151 enhancements. Come say hello in the sideshow thread.
Reply With Quote
  #245   Link to this post, but load the entire thread.  
Old January 12th, 2021 (10:34 AM).
jastolze007 jastolze007 is offline
 
Join Date: Jan 2017
Age: 31
Gender: Male
Nature: Bold
Posts: 650
Quote:
Originally Posted by jojobear13 View Post
What did you set as the level cap?
I believe it was 250. I was at 101 via rare candy to test it and went into a battle via the randomized trainer.
Reply With Quote
  #246   Link to this post, but load the entire thread.  
Old January 12th, 2021 (12:38 PM).
jojobear13's Avatar
jojobear13 jojobear13 is offline
 
Join Date: Nov 2019
Posts: 484
Quote:
Originally Posted by jastolze007 View Post
I believe it was 250. I was at 101 via rare candy to test it and went into a battle via the randomized trainer.
Pokemon structures only have 3 bytes allotted for experience. A max level of 250 causes the CalcExperience function to overflow into 4 bytes. This will be different depending on a mon's growth rate.

Let's look at mewtwo for example. Math will be done in hex so it's easy to see the bytes being used. 250 in hex is $A8. Mewtwo's growth rate is "slow", so the exp it needs to hit the level cap i$s 5/4 n^3. Calculating ($A8)^3 gives $485a00. That's three bytes, so we're good so far. Now multiply by 5 to get $0169C200. Uh oh, that's 4 bytes. You've overflowed so that leftmost 01 gets tossed out of calculations. That leaves $69C200 / 4 to give a final result of $1A7080. This is an incorrect exp result that corresponds to a much lower level.

By my calculations, the highest value for max_level without initiating an overflow for any of the growth rates is 140.
__________________
Author of Shin Pokemon Red/Blue/Green. A Gen 1 hack focusing on bugfixes, better AI, and QoL/151 enhancements. Come say hello in the sideshow thread.
Reply With Quote
  #247   Link to this post, but load the entire thread.  
Old January 12th, 2021 (1:19 PM).
jastolze007 jastolze007 is offline
 
Join Date: Jan 2017
Age: 31
Gender: Male
Nature: Bold
Posts: 650
Quote:
Originally Posted by jojobear13 View Post
Pokemon structures only have 3 bytes allotted for experience. A max level of 250 causes the CalcExperience function to overflow into 4 bytes. This will be different depending on a mon's growth rate.

Let's look at mewtwo for example. Math will be done in hex so it's easy to see the bytes being used. 250 in hex is $A8. Mewtwo's growth rate is "slow", so the exp it needs to hit the level cap i$s 5/4 n^3. Calculating ($A8)^3 gives $485a00. That's three bytes, so we're good so far. Now multiply by 5 to get $0169C200. Uh oh, that's 4 bytes. You've overflowed so that leftmost 01 gets tossed out of calculations. That leaves $69C200 / 4 to give a final result of $1A7080. This is an incorrect exp result that corresponds to a much lower level.

By my calculations, the highest value for max_level without initiating an overflow for any of the growth rates is 140.
140? That sucks. This is so much easier in gen 3 hacks, where I can go to 255 with no overflow errors. Thanks for the info. I was using a modified Gyarados with a medium slow exp formula instead of slow so it could go higher but that doesn't matter as much now, I suppose.
Reply With Quote
  #248   Link to this post, but load the entire thread.  
Old January 12th, 2021 (2:56 PM).
jojobear13's Avatar
jojobear13 jojobear13 is offline
 
Join Date: Nov 2019
Posts: 484
Quote:
Originally Posted by jastolze007 View Post
140? That sucks. This is so much easier in gen 3 hacks, where I can go to 255 with no overflow errors. Thanks for the info. I was using a modified Gyarados with a medium slow exp formula instead of slow so it could go higher but that doesn't matter as much now, I suppose.
Not all is lost. The engine for doing multiplication and division actually uses 4 bytes, so there is a bit of leeway the function for calculating experience. I whipped up a little something in about an hour.

Try implementing the changes in this commit. This updates the CalcExperience function to do math with 4 bytes instead of 3 bytes. This will prevent the left-most byte from being dropped and give accurate math. Since pokemon are still restricted to 3 bytes of exp, I also made it so that it dynamically lowers the max_level for each pokemon (based on growth rate) such that the maximum experience achievable stays within 3 bytes. Theoretically, mons with the fast growth rate can go all the way to level 255 now while mons at the slow growth rate are capped to level 237.
__________________
Author of Shin Pokemon Red/Blue/Green. A Gen 1 hack focusing on bugfixes, better AI, and QoL/151 enhancements. Come say hello in the sideshow thread.
Reply With Quote
  #249   Link to this post, but load the entire thread.  
Old January 12th, 2021 (5:08 PM).
jastolze007 jastolze007 is offline
 
Join Date: Jan 2017
Age: 31
Gender: Male
Nature: Bold
Posts: 650
Quote:
Originally Posted by jojobear13 View Post
Not all is lost. The engine for doing multiplication and division actually uses 4 bytes, so there is a bit of leeway the function for calculating experience. I whipped up a little something in about an hour.

Try implementing the changes in this commit. This updates the CalcExperience function to do math with 4 bytes instead of 3 bytes. This will prevent the left-most byte from being dropped and give accurate math. Since pokemon are still restricted to 3 bytes of exp, I also made it so that it dynamically lowers the max_level for each pokemon (based on growth rate) such that the maximum experience achievable stays within 3 bytes. Theoretically, mons with the fast growth rate can go all the way to level 255 now while mons at the slow growth rate are capped to level 237.
I appreciate you doing all that man! I still need to find a way to update from 1.15 to more recent. I've been playing on Goomba and haven't been able to transfer save without starting over. Could I just apply the changes you made in the older version of code I have?

Also, would this work with a previous save? Or would I need to start over?
Reply With Quote
  #250   Link to this post, but load the entire thread.  
Old January 12th, 2021 (6:41 PM).
jojobear13's Avatar
jojobear13 jojobear13 is offline
 
Join Date: Nov 2019
Posts: 484
Quote:
Originally Posted by jastolze007 View Post
I appreciate you doing all that man! I still need to find a way to update from 1.15 to more recent. I've been playing on Goomba and haven't been able to transfer save without starting over. Could I just apply the changes you made in the older version of code I have?

Also, would this work with a previous save? Or would I need to start over?
Yeah, it should work if you just apply those changes.

In terms of updating your game save, have you tried saving outside in pallet town and using the softlock teleport?
__________________
Author of Shin Pokemon Red/Blue/Green. A Gen 1 hack focusing on bugfixes, better AI, and QoL/151 enhancements. Come say hello in the sideshow thread.
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 8:52 AM.