The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Sideshow Showcase (https://www.pokecommunity.com/forumdisplay.php?f=204)
-   -   Red Shin Pokemon Red/Blue/Green/JP builds (Bugfix, AI, and QoL patch) (https://www.pokecommunity.com/showthread.php?t=427398)

jojobear13 July 7th, 2021 7:13 PM

1 Attachment(s)
Quote:

Originally Posted by dannib (Post 10379463)
Sorry, I didn't see your other post saying to zip it! (message board noob)

here it is

Thanks. That helps me out more.

So here's what I did. I took the v1.21 master green patch from the github. Then I applied it to a regular vanilla USA Blue version rom file. This gave me a fresh and clean rom of shinpokegreen_1.21 to work with. Loaded the game up in mGBA. Save file was detected. Loaded up your save file and everything worked okay; no crashes or getting stuck in the overworld.

Loaded your save state. Everything worked fine. Butterfree was able to learn supersonic, and it was able to ditch learning supersonic. The battle ended successfully and I saved the game. See attachment.

I would suggest that you delete your current rom file and apply the shinpokegreen_1.21 patch over a fresh download of a Pokemon Blue (USA) rom.

dannib July 7th, 2021 8:56 PM

Wow, thank you so much for your quick replies and quick fix!

Also, loving the game and especially loving the level curve. Makes each battle much more strategic!

jastolze007 July 12th, 2021 9:22 AM

Hey Jojobear, would you be willing to, in a future release, make an NPC trigger an event with rematch battles where the opponent uses randomized mons? Some of the options I was thinking about would be similar strength or same type mons of the ones they replaced, or just overall random. That sounds like a lot of work, but it would be optional since you would have to activate it.

Anywho, I'm starting it up a run again, this time on an actual stable emulator. Most of the glitches I experienced in the past seemed to be Goomba-specific.

As always, I appreciate your work man!

jojobear13 July 13th, 2021 8:37 AM

Quote:

Originally Posted by jastolze007 (Post 10380898)
Hey Jojobear, would you be willing to, in a future release, make an NPC trigger an event with rematch battles where the opponent uses randomized mons? Some of the options I was thinking about would be similar strength or same type mons of the ones they replaced, or just overall random. That sounds like a lot of work, but it would be optional since you would have to activate it.

Anywho, I'm starting it up a run again, this time on an actual stable emulator. Most of the glitches I experienced in the past seemed to be Goomba-specific.

As always, I appreciate your work man!

So basically a built-in randomizer. The main issue is that rom space, which holds the trainer rosters, cannot be overwritten. Built-in randomizers have to have lookup lists and perform a search-replace for every trainer mon. I can test out a few ideas, but I’m concerned about what this would do to battle load times.

If all else fails, it would probably be easier to add a “replace by ‘mon group” option to the external randomizer script.

jastolze007 July 13th, 2021 8:43 AM

Quote:

Originally Posted by jojobear13 (Post 10381191)
So basically a built-in randomizer. The main issue is that rom space, which holds the trainer rosters, cannot be overwritten. Built-in randomizers have to have lookup lists and perform a search-replace for every trainer mon. I can test out a few ideas, but I’m concerned about what this would do to battle load times.

If all else fails, it would probably be easier to add a “replace by ‘mon group” option to the external randomizer script.

I figured it would be a pain to implement. I was just throwing out ideas.

This is literally my favorite Red hack. I play through the storyline just to be able to challenge the guy who uses six random mons that scale to your level. Definitely enjoying your work!

jojobear13 July 14th, 2021 11:08 PM

Quote:

Originally Posted by jastolze007 (Post 10381195)
I figured it would be a pain to implement. I was just throwing out ideas.

This is literally my favorite Red hack. I play through the storyline just to be able to challenge the guy who uses six random mons that scale to your level. Definitely enjoying your work!

Glad you enjoy it so much!

Actually, I may have something here. I can create a new list of pokemon to randomly choose from which contains only non-evolved pokemon (about 73 excluding legendaries). Then I can reuse the GetRandMon and EnemyMonEvolve functions that I previously created in order to swap out trainer rosters and evolve them based on level. This could be done pretty easily for all the regular, non-boss trainers that don't have custom team levels and moves. This would make all those trainers have the same 'mon count and levels, but the 'mons themselves would be randomized every match. I can have it toggled via a new NPC somewhere.

jojobear13 July 17th, 2021 9:19 AM

Quote:

Originally Posted by jastolze007 (Post 10380898)
Hey Jojobear, would you be willing to, in a future release, make an NPC trigger an event with rematch battles where the opponent uses randomized mons?

I've uploaded some beta patches in the master_dev branch. Apply your choice of beta3 patch to an unpatched rom. There's an aide in the Viridian pokemon center that will toggle randomization of no-name trainers. Among other new things.

jastolze007 July 17th, 2021 10:40 AM

Quote:

Originally Posted by jojobear13 (Post 10382699)
I've uploaded some beta patches in the master_dev branch. Apply your choice of beta3 patch to an unpatched rom. There's an aide in the Viridian pokemon center that will toggle randomization of no-name trainers. Among other new things.

That's so awesome! I'm currently on an older (1.19, I believe) beta and made some changes to the rom from compiling. Would there be any issue with me copying over some of the ASM files from that older version and compiling? I only changed typings and stats, a few moves, EXP growth rates, and the obvious level cap. I assume nothing has been changed since the newer release correct? Thanks again, man!

jojobear13 July 17th, 2021 11:34 AM

Quote:

Originally Posted by jastolze007 (Post 10382748)
I only changed typings and stats, a few moves, EXP growth rates, and the obvious level cap.

Probably? The proper way to handle this is through a git merge so your edits get overlaid onto my commits. Google for more info about that. Otherwise the safest thing to do is copy your edits into the new files using a side-by-side compare program like BeyondCompare.

RyuXen July 20th, 2021 9:13 AM

I can't get the patches to work, LIPS says they aren't ips files.

jojobear13 July 20th, 2021 11:20 AM

Quote:

Originally Posted by RyuXen (Post 10383743)
I can't get the patches to work, LIPS says they aren't ips files.

Zip and post your problem patches here. Otherwise I have nothing to go off of.

jastolze007 July 20th, 2021 12:02 PM

Regarding the recent randomizer you added, if I want to patch it to a specific version that I've already compiled, and not just a fresh red rom, how would I go about doing that? I saw in the tools section on your GitHub that some of the files were modified recently so I assume those are the right tools.

jojobear13 July 20th, 2021 12:26 PM

Quote:

Originally Posted by jastolze007 (Post 10383820)
Regarding the recent randomizer you added, if I want to patch it to a specific version that I've already compiled, and not just a fresh red rom, how would I go about doing that? I saw in the tools section on your GitHub that some of the files were modified recently so I assume those are the right tools.

Ips patches don’t work that way. They are just maps of bit-differences between two rom files. If you have the older revision downloaded and set up in a git environment to compile, then you could use the cherry-pick command to selectively apply newer commits then recompile.

jojobear13 July 26th, 2021 2:36 PM

So I've been doing some research on the gen-1 critical hit situation. I've been focusing on trying to find a reasonable way to rectify the odd situation where a critical hit can deal less damage than a non-critical hit.

Given the following:
A1 is the offensive stat and D1 is the defensive stat quantity for a non-critical hit.
A2 is the offensive stat and D2 is the defensive stat quantity for a critical hit.
L is the level of the attacker.

Then the damage from a non-critical hit will be equal to or more than the damage of a critical hit if:
(A1/D1) >= 2 * (A2/D2) * [ (L + 2.5) / (L + 5) ]

There is a chunk of the damage formula for critical hits that goes as follows: (2 * 2 * L / 5) + 2
I'll change this to the following for critical hits: (2 * 2 * L / 5) + 4
Why the change? Because it changes (L + 2.5) into (L + 5) which lets me simplify the algebra down to a simple linear ratio:
(A1/D1) >= 2 * (A2/D2) * [ (L + 5) / (L + 5) ]

I can use this to implement a check on these stats when calculating critical hit damage. If a non-critical hit would do equal or more damage, then A1 and D1 are used in place of A2 and D2.

This follows what I believe to be the original intent of Gen 1 critical hits: Crits should ignore defensive boosts and offensive penalties as a way to counter beefy wall 'mons, but they should not be so overwhelming as to allow the attacker offensive boosts while at the same time stripping defensive boosts from the defender. More or less, critical hits should be a large benefit to underdog attackers stuck in a low-damage situation and of middling benefit to high-damage attackers.

Ecto-1 [FR] July 28th, 2021 1:19 PM

Hello Jojo. I am addressing you today first of all as a fervent admirer of your work in reworking a 1st generation Pokémon game with brilliance. Your hack is splendid. Then, I would like to tell you that being French, the 1st generation is not the most popular and most played in my country. Nevertheless, it's the one I'm particularly attached to (with Black and White). That's why I'm taking the trouble to write you. Your excellent work has motivated me to undertake the invention of such a journey myself. However, I have little knowledge of rom hacking. Therefore, I would like to ask for your help in modifying a Pokémon Yellow rom, to tell me the steps to follow etc. Of course, I know it won't be easy to do it, but I would love to work on this project. I noticed your punctuality and your kindness, I don't doubt your sympathy towards the 1st time players ;) Thank you for reading my message, and I hope you will answer positively. See you soon!
Ecto-1, French player.

jojobear13 July 28th, 2021 5:15 PM

Quote:

Originally Posted by Ecto-1 [FR] (Post 10386896)
Hello Jojo. I am addressing you today first of all as a fervent admirer of your work in reworking a 1st generation Pokémon game with brilliance. Your hack is splendid. Then, I would like to tell you that being French, the 1st generation is not the most popular and most played in my country. Nevertheless, it's the one I'm particularly attached to (with Black and White). That's why I'm taking the trouble to write you. Your excellent work has motivated me to undertake the invention of such a journey myself. However, I have little knowledge of rom hacking. Therefore, I would like to ask for your help in modifying a Pokémon Yellow rom, to tell me the steps to follow etc. Of course, I know it won't be easy to do it, but I would love to work on this project. I noticed your punctuality and your kindness, I don't doubt your sympathy towards the 1st time players ;) Thank you for reading my message, and I hope you will answer positively. See you soon!
Ecto-1, French player.

Trust me. You’d be much better served by the pret discord community for the pokered disassembly.

https://discord.gg/xXp9cnnS

eshasunrise August 11th, 2021 11:14 AM

So I've got a question. I added a female character option to my own hack using the instructions in the "how to" file, but whenever I withdraw an item from my PC or leave Red's living room, my character sprite becomes male again. Any thoughts?

jojobear13 August 12th, 2021 2:03 PM

The npc sprites get reloaded every time you change areas or a menu system closes. Sounds like you missed something somewhere, and the game is loading the male sprites by default. Probably happens in the home/overworld.asm file.

Try taking a look at loadplayerspritegraphicscommon::

Alternately, download my repository and use something like notepad++ to search every file for every instance of the string “female trainer”. That should pull up every everything I modified for a girl trainer.

jastolze007 August 13th, 2021 5:50 PM

Question: Am I only able to use Amnesia twice successfully because the base stat is too high? I heard that 1024 is the max but I didn't think it would throw a "Nothing happened" on the third use. My SPC stat without any modifications is 354 so I assume that's why it's giving me that message.

jojobear13 August 14th, 2021 4:59 PM

Quote:

Originally Posted by jastolze007 (Post 10392988)
Question: Am I only able to use Amnesia twice successfully because the base stat is too high? I heard that 1024 is the max but I didn't think it would throw a "Nothing happened" on the third use. My SPC stat without any modifications is 354 so I assume that's why it's giving me that message.

Stats are hard-capped at 999 and have nothing to do with restricting move effects. Stat mods go up to 6 stages in either direction like how it's always been. The reason you cannot use amnesia a third time is because the value $0D is in address $CD1D (indicating special is boosted to +6).

Chirutalis August 15th, 2021 6:19 PM

Hi. I noticed that Elite Four battle theme was changed to regular Trainer battle theme.
Can you teach me how to edit manually? I mainly used HxD to hack.

jojobear13 August 15th, 2021 10:50 PM

Quote:

Originally Posted by Chirutalis (Post 10393836)
Hi. I noticed that Elite Four battle theme was changed to regular Trainer battle theme.
Can you teach me how to edit manually? I mainly used HxD to hack.

I cannot help you, for I do not posses that knowledge.

jastolze007 August 16th, 2021 9:35 AM

Quote:

Originally Posted by Chirutalis (Post 10393836)
Hi. I noticed that Elite Four battle theme was changed to regular Trainer battle theme.
Can you teach me how to edit manually? I mainly used HxD to hack.

I'd like to mention that the first three members of the E4 do not have their E4 theme, only Lance. That's how it was in Vanilla as well. JoJo didn't change the default themes.

jojobear13 August 16th, 2021 1:52 PM

I kinda changed the music. The Lite branch keeps the music the same as it was in Vanilla: Lorelei, Bruno, and Agatha play the trainer theme and Lance plays the gym leader theme. The Master branch takes more liberties and makes all four of them play the gym leader theme.

You can see the tweaks I made to battle music selection here. This is how it works.

The value in wGymLeaderNo is read. If the value is 9, then it loads the champion battle theme. If the value is a different non-zero number, then it loads the gym leader theme. If the value is zero, it checks to see the value of the currently-loaded opponent. Values below 200 are wild pokemon, so the wild theme gets played. Values >= 200 are trainers, so some more checks are run. If the trainer is Rival3 (from the final battle), always play the champion theme. If the trainer is Lance, always play the gym leader theme. Otherwise play the trainer theme.

This makes it easy to set the music for scripted trainer battles like the elite 4. I just go into the map script files for each elite 4 room, and then I load any value from 1 to 8 into wGymLeaderNo upon talking to them.

EDIT: Note that this is not something that can be done manually in a hex editor without a great deal of effort and expertise.

eshasunrise August 17th, 2021 12:40 AM

So I got the female trainer to maintain during a play session, but now it resets to male whenever the save file is loaded. I think the bit is resetting when the game shuts down. How would I go about maintaining the selection?

Also, wow Notepad++ is freaking phenomenal! Thanks for telling me about it!


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


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.