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 August 14th, 2020 11:37 PM

V1.15 is go for launch!

EDIT: Just realized this is post 151 of the thread. How appropriate.

Master branch patch notes:
#Hack-Induced Bugfixes & Adjustments since last version:
-----------
- Female trainer default name changed from YELLOW to VIOLET
- AI routine #3 favorability for 0 bp moves has been corrected.
- Fixed an issue where enabling gender symbols could cause a status screen crash
- More graphical fixes to the route 22 rival
- Female trainer has correct overworld sprite in intro


#New features & adjustments since last version:
-----------
- GBC color palettes have been back-ported from Yellow-version.
- Scrolling mons on the title screen have their own palettes loaded on the GBC.
- In the blue version intro, jigglypuff has it's own palette loaded on the GBC.
- Oak-speech nidorino has its color palette on the GBC.
- The formula functions for exp now have underflow protection.
- General RNG improved to the one used by Prism and Polished Crystal
- Female trainer now has her own fishing sprites


Lite branch patch notes:
#Latest Fixes (most recent ips patch):
---------------
- The Gameboy Color palette functionality from pokemon Yellow has been back-ported into the game
- Scrolling mons on the title screen have their own palettes loaded on the GBC.
- In the blue version intro, jigglypuff has it's own palette loaded on the GBC.
- Oak-speech nidorino has its color palette on the GBC.
- Ai routine #3 has a correction involving favoribility of 0 bp moves
- Minor graphical fixes to route 22 rival

darthbr August 29th, 2020 9:09 AM

Battle system is not good yet. I mean The AI. They switch when pokemon is on Red Life HP. then put another one. IF this one faint. They return The Red hp one again. Also pokemon use dumb moves constant. Like leer or tail whip. Even in e4. Im not complaining. Just saying The original vanila is stupid. So The AI can be better.

IF i have a raichu. And trainer have gyarados. He Will switch to a krabby. Doesnt make sense.

jojobear13 August 30th, 2020 8:25 AM

Quote:

Originally Posted by darthbr (Post 10201839)
They switch when pokemon is on Red Life HP. then put another one.

Yes, this is intended.

Quote:

IF this one faint. They return The Red hp one again.
This will happen if the other possible switch-ins are determined to not be good choices either. But I can adjust the AI scoring so that red health is penalized more heavily.

Quote:

Also pokemon use dumb moves constant. Like leer or tail whip. Even in e4
The battle engine chooses moves randomly even if AI is active. The difference is that it will randomly choose between the most-preferred moves. If multiple moves are in the most-preferred list, then each one has an equal chance of being chosen. Pokemon with mostly non-damage moves tend to skew this preferred list. There's not a lot I can do, but I'll see if I can tweak it some more by occasionally discouraging these moves.

Quote:

IF i have a raichu. And trainer have gyarados. He Will switch to a krabby. Doesnt make sense.
Yes it does. The krabby is scored higher than the gyarados because krabby has a 2x weakness to your raichu as opposed to the 4x weakness of gyarados. The other switch-in choices were scored either equal to or less than the krabby. However, I can look at giving a harsher penalty for type weaknesses.

Illusioned September 2nd, 2020 7:52 PM

Really good stuff. I'm just wondering if it is possible to implement custom movesets for Gym Leaders and Elite four similar to how that is handled in gen 2? The AI could really shine with beefed up movesets.

Chronosplit September 3rd, 2020 4:24 AM

Quote:

Originally Posted by Illusioned (Post 10203833)
Really good stuff. I'm just wondering if it is possible to implement custom movesets for Gym Leaders and Elite four similar to how that is handled in gen 2? The AI could really shine with beefed up movesets.

Yep! Trainer_moves.asm and trainer_parties.asm in the data folder should be what you're looking for.

darthbr September 3rd, 2020 4:44 AM

Started to play shin pokered master version, awesome, just wondering, could u make those 2 guys in oak lab like ''yes or no'', i mean, not just talk and activate, make it like ''rematch'' system.

I have kids, they just talk to the npc and the game becomes harder (the npc that makes pokemon stronger), and keeps me asking why hahahaha, so i have to change it, anyway, its just a suggestion...

Also, can u make the game start with ''set'' option? i have been playing with SET, and its awesome, not very difficult, but not very easy.. perfect

jojobear13 September 3rd, 2020 1:41 PM

Quote:

Originally Posted by darthbr (Post 10203945)
Started to play shin pokered master version, awesome, just wondering, could u make those 2 guys in oak lab like ''yes or no'', i mean, not just talk and activate, make it like ''rematch'' system.

I have kids, they just talk to the npc and the game becomes harder (the npc that makes pokemon stronger), and keeps me asking why hahahaha, so i have to change it, anyway, its just a suggestion...

Also, can u make the game start with ''set'' option? i have been playing with SET, and its awesome, not very difficult, but not very easy.. perfect

These are all simple requests. I'll make a note to do them.

CadmiumRED September 3rd, 2020 6:31 PM

On my deviantart page, I actually attempted to make "devamped" GSC Spaceworld '97-style sprites of some of the Pokemon from Gen 1. I might attempt to do more later on if it can aid in this project.

https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/ba4fb8b0-41cc-4fad-9d61-7bab628b0ab6/ddiq4a0-5a6b0c96-1946-4bb9-9c74-eaaeb50e9a94.png?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1cm46YXBwOiIsImlzcyI6InVybjphcHA6Iiwib2JqIjpbW3sicGF0aCI6IlwvZlwvYmE0ZmI4YjAtNDFjYy00ZmFkLTlkNjEtN2JhYjYyOGIwYWI2XC9kZGlxNGEwLTVhNmIwYzk2LTE5NDYtNGJiOS05Yzc0LWVhYWViNTBlOWE5NC5wbmcifV1dLCJhdWQiOlsidXJuOnNlcnZpY2U6ZmlsZS5kb3dubG9hZCJdfQ.NB_DKJf1ygBZaUrXUSaCSzQIlPKrpdoAgyVyKHOXCdA
https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/ba4fb8b0-41cc-4fad-9d61-7bab628b0ab6/ddiqo6v-6cfc41ac-02a2-46b4-bc7f-c91773ba719c.png?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1cm46YXBwOiIsImlzcyI6InVybjphcHA6Iiwib2JqIjpbW3sicGF0aCI6IlwvZlwvYmE0ZmI4YjAtNDFjYy00ZmFkLTlkNjEtN2JhYjYyOGIwYWI2XC9kZGlxbzZ2LTZjZmM0MWFjLTAyYTItNDZiNC1iYzdmLWM5MTc3M2JhNzE5Yy5wbmcifV1dLCJhdWQiOlsidXJuOnNlcnZpY2U6ZmlsZS5kb3dubG9hZCJdfQ.Qa_4fPfJEjt9qslyF7T4RIdilBdAp8LKodvUGBLEzsM
https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/ba4fb8b0-41cc-4fad-9d61-7bab628b0ab6/de3r8d5-f77c8ff6-d8e8-451f-95bb-6d07e45efdca.png?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1cm46YXBwOiIsImlzcyI6InVybjphcHA6Iiwib2JqIjpbW3sicGF0aCI6IlwvZlwvYmE0ZmI4YjAtNDFjYy00ZmFkLTlkNjEtN2JhYjYyOGIwYWI2XC9kZTNyOGQ1LWY3N2M4ZmY2LWQ4ZTgtNDUxZi05NWJiLTZkMDdlNDVlZmRjYS5wbmcifV1dLCJhdWQiOlsidXJuOnNlcnZpY2U6ZmlsZS5kb3dubG9hZCJdfQ.SfaHOoPBLDtmnXgtCo66OSElOIbUVXETtO3y89JbgbA

jojobear13 September 3rd, 2020 7:10 PM

Quote:

Originally Posted by Illusioned (Post 10203833)
Really good stuff. I'm just wondering if it is possible to implement custom movesets for Gym Leaders and Elite four

As Chronosplit posted, those two files control trainer rosters and custom movesets. This is what Gamefreak did to get custom movesets working for Yellow version. I just backported it into red & blue. It's not super elegant, but it works.

darthbr September 6th, 2020 9:32 AM

I have found a minor minor error. When u give a drink to The girl on Last floor of celadon store. Appears a "N" into The Middle of The boarder.

jojobear13 September 6th, 2020 2:44 PM

Quote:

Originally Posted by darthbr (Post 10205129)
I have found a minor minor error. When u give a drink to The girl on Last floor of celadon store. Appears a "N" into The Middle of The boarder.

Fixed it. The code tries to dynamically print the item name of the TM stored in wram as part of the text. The really weird thing about it is that this is only done on the celadon mart roof. Every other instance in the game just prints a straight string of "TMxx contains".

It makes me think that Gamefreak originally wanted to reuse the same block of text for the thirsty girl and just swap out the TM names (an attempt to save on rom space). Then later they changed their minds and left it as-is.

darthbr September 7th, 2020 5:18 AM

Another request. What is The possibility to add automatic use of pokeflute in both snorlax? Just a minor improv

Grilo September 7th, 2020 7:38 AM

the possibility of adding the event in the pikachu surf game the same as the yellow one?

darthbr September 8th, 2020 5:55 PM

Agatha is op as hell. Every pokemon i take she uses hypnosis without fail (how do i make to use less hypnosis)? . Too many substitutes and mega Drain and psych? Omg

jojobear13 September 8th, 2020 8:30 PM

Quote:

Originally Posted by darthbr (Post 10206031)
Agatha is op as hell. Every pokemon i take she uses hypnosis without fail (how do i make to use less hypnosis)? . Too many substitutes and mega Drain and psych? Omg

You'd have to change the moves on her team. Agatha's pokemon all have move sets that are relatively straightforward to use yet are very effective. The best strategy for her is to simply not make any dumb mistakes. What you are experiencing is the natural result of the AI keeping her from making dumb mistakes. Take her lvl 60 Gengar for example:
Quote:

Gengar: lvl 60
-confuse ray
-psychic
-hypnosis
-dream eater
AI layer 1 will heavily discourage dream eater if the opponent is awake. This leaves an almost equal chance for any of the other three moves to be chosen (a 1-in-3 chance to use psychic and a 2-in-3 chance to throw a status effect your way). Then AI layer 3 runs to check type-matching. If the target is weak to psychic moves, then psychic will get the preference and be used.

Let's say the opponent is already confused. In that case AI layer 1 will heavily discourage confuse ray. AI layer 3 runs next and finds a resistance to psychic moves, so it discourages psychic and dream eater. Confuse ray is discouraged, hypnosis is neutral, psychic is discouraged, and dream eater is discouraged. The AI will try to keep hitting with hypnosis under these conditions. Once the enemy is asleep, hypnosis gets heavily discouraged and dream eater gets a slight bump in preference. Now the AI will keep trying to use dream eater as it is the best option available. If the opponent recovers from confusion, now confuse ray becomes the best option available and it gets used. If the opponent wakes up, now hypnosis becomes the best option again and it gets used. It's a deadly cycle.

So yeah, it's not really the AI itself. The AI mostly runs off the concept of "don't do that". The move sets are just highly geared towards having only one good choice for every situation.

BrianRolling September 16th, 2020 7:15 PM

Hi. I'm a fan of your rom hack because it actually fixes the game. I'm using it as sort of a building base for some additional modding I'm doing to the game. I'm writing to ask you a favor, or at least a question. How easy is it for you to alter a move's critical hit ratio and priority? The reason I'm asking is because I'm altering moves with a tool and it's unable to do any of these. I'm specifically looking to increase critical hit ratio on Cut and increase move priority on Swift like it does for Slash and Quick Attack respectfully. I understand it might be a hard coding situation, but I don't know how to code, so I can't figure this out myself. Since I'm using your hack as a base I figured this is a good place to start asking for help. If you can, or if you know anyone else who can figure this thing out for me instead, I'd love the assistance either way. Again, I like this mod a lot. Keep up the good work and I hope to see a reply soon.

jojobear13 September 17th, 2020 9:14 PM

Quote:

Originally Posted by BrianRolling (Post 10208741)
Hi. I'm a fan of your rom hack because it actually fixes the game. I'm using it as sort of a building base for some additional modding I'm doing to the game. I'm writing to ask you a favor, or at least a question. How easy is it for you to alter a move's critical hit ratio and priority? The reason I'm asking is because I'm altering moves with a tool and it's unable to do any of these. I'm specifically looking to increase critical hit ratio on Cut and increase move priority on Swift like it does for Slash and Quick Attack respectfully. I understand it might be a hard coding situation, but I don't know how to code, so I can't figure this out myself. Since I'm using your hack as a base I figured this is a good place to start asking for help. If you can, or if you know anyone else who can figure this thing out for me instead, I'd love the assistance either way. Again, I like this mod a lot. Keep up the good work and I hope to see a reply soon.

The code that handled these things use to be kinda messy. I ended up simplifying both these things a bit when fixing issues with critical hits and the move Counter. It is now very easy to do.

Your list of move constants is going to be in "/constants/move_constants.asm", so leave that file open in a side window and use it as a reference.

To set move priority, go to "custom_functions/func_battle.asm" and look at these functions:
Code:

LowPriorityMoves:
        cp COUNTER
;        ret z
;        cp BIND
;        ret z
;        cp WRAP
;        ret z
;        cp FIRE_SPIN
;        ret z
;        cp CLAMP
        ret


Code:

HighPriorityMoves:
        cp QUICK_ATTACK
;        ret z
;        cp DUMMY_MOVE1
;        ret z
;        cp DUMMY_MOVE2
;        ret z
;        cp DUMMY_MOVE3
;        ret z
;        cp DUMMY_MOVE4
        ret


You'll see there are lines I have removed (aka commented out) by using the ";" character (makes everything after it treated as a comment to be ignored by the compiler). Simply un-comment two lines at a time and replace the move constant with that of your choice. Making Swift a high priority move would look like this:
Code:

HighPriorityMoves:
        cp QUICK_ATTACK
        ret z
        cp SWIFT
;        ret z
;        cp DUMMY_MOVE2
;        ret z
;        cp DUMMY_MOVE3
;        ret z
;        cp DUMMY_MOVE4
        ret


As you might be able to guess, you can add as many moves as rom space will permit by copy-pasting lines.

Now for high-crit moves, you want to go to the "engine/battle/core.asm" file and go to this function:
Code:

HighCriticalMoves:
        db KARATE_CHOP
        db RAZOR_LEAF
        db CRABHAMMER
        db SLASH
        db $FF


As you can see, it's just a list of move constants with FF as an end-of-list signifier. Just add CUT to the list as such:

Code:

HighCriticalMoves:
        db KARATE_CHOP
        db RAZOR_LEAF
        db CRABHAMMER
        db SLASH
        db CUT
        db $FF


Rom space in the core battle file is really tight. You don't have a lot of extra bytes to add moves. You might want to find the "UnusedHighCriticalMoves:" list and comment that whole list out like so:
Code:

;UnusedHighCriticalMoves:
        ;db KARATE_CHOP
        ;db RAZOR_LEAF
        ;db CRABHAMMER
        ;db SLASH
        ;db $FF


That should give you a little more wiggle-room.

BrianRolling September 18th, 2020 2:03 AM

Oh, nice. I appreciate it. I can see the files in your github page, but how do I apply the changes to my copy of the rom? Sorry that I'm asking this. Like I said, I've been using utility tool executable to edit the game, so I've never actually tried to get into the code.

jojobear13 September 18th, 2020 12:19 PM

Quote:

Originally Posted by BrianRolling (Post 10209070)
Oh, nice. I appreciate it. I can see the files in your github page, but how do I apply the changes to my copy of the rom? Sorry that I'm asking this. Like I said, I've been using utility tool executable to edit the game, so I've never actually tried to get into the code.

Hacking utilities will not necessarily work on shinpokered. Those assume everything is arranged in rom addresses the same as the retail games. A lot of stuff has been shifted around, so certain values are not where they were originally located.

You need to download the repository, set up the compiler, edit the files, and compile the rom yourself. It's the same as setting up and compiling pokered.

BrianRolling September 18th, 2020 3:08 PM

Gotcha. Some utilities such as move and pokemon stat editor still work on your rom hack, which are what I'm using. The move editor just doesn't have an option for the effects I've mentioned before. I bet I can change which type deals physical or special moves easily with your layout as well. I will try that. Thanks a lot for your help.

jojobear13 September 21st, 2020 10:11 PM

1 Attachment(s)
I did some editing on the female trainer. I changed up her clothes a bit, gave her a nose job, made her waist slightly smaller, and overall tried to make her more feminine. Sprite editing at this resolution is harder than I thought. A mere 1 or 2 pixels have a major effect on appearance.

Lv.12 Slime September 25th, 2020 7:40 AM

Hi! I'm working on my own hack and I'm really inexperienced. so I have a suuuuper kinda important question: could you put the trainer rematching and female trainer as separate patches? I'd really appreciate it, good luck on your projects!

jojobear13 October 7th, 2020 5:18 PM

V1.16 has been uploaded. The big feature added to the master branch is an experimental New Game+. Both branches also had some tweaks and bugfixes.

Master branch changelog
#Hack-Induced Bugfixes & Adjustments since last version:
-----------
- The aides in Oak's lab that activate features now have a no/yes prompt
- More AI tweaking
--- AI scoring for switching puts a heavier penalty on potentially switching in a bad type matchup
--- AI scoring imposes a very heavy penalty for potentially switching in pokemon with less than 1/4 HP
--- AI layer 3 changes that affect most 0-power moves (with only a few exceptions like heal effects)
----- now has a hard stop on using 0-power moves on consecutive turns
----- heavily discourages 0-power moves if below 1/3 hp
- Fixed text overflow into window border on the celadon mart roof
- Fixed the Missingno battle not triggering
- Missingno sets a non-key item in bag slot 6 to 99 if beaten

#New features & adjustments since last version:
-----------
- A regular New Game will default the battle style to SET
- New Game Plus has been added (still experimental)
--- Activated under these conditions:
----- Must have an existing non-corrupt game save on-file
----- Must have beaten the elite 4 in the on-file save
----- Press and hold SELECT while choosing the New Game option
----- A jingle will play to indicate NG+ has activated and the SELECT button can now be released
--- Preserves ONLY the following information (your current party will be lost):
------ Boxed pokemon
------ Play clock
------ Pokedex seen/owned registry
------ Hall of Fame (experimental)
------ Option screen selections
--- A new trainer ID and hash is generated, so boxed pokemon are permanently treated as traded pokemon
- Type immunity prevents trapping moves from taking hold at all
- Yes/No prompt for flute use has been added to blocking snorlax
- Clefable and Wigglytuff get some moves back via level-up
- Encountering Missingno will not give 128 of the item in the sixth bag slot
- Re-worked the front and back pics for the female trainer
- Erika uses her pic from yellow version which alters her funerary clothes to a proper kimono
- Fossil guy in mt moon can be rematched
- Fixed text overlap with Oak giving you pokeballs
- Cannot bypass Brock's gym via the start menu
- Diglett & Dugtrio can learn cut like in yellow version
- In SET batle mode, X-stat items have double the effect


Lite branch changelog
- More AI tweaking
--- AI scoring for switching puts a heavier penalty on potentially switching in a bad type matchup
--- AI scoring imposes a very heavy penalty for potentially switching in pokemon with less than 1/4 HP
--- AI layer 3 changes that affect most 0-power moves (with only a few exceptions like heal effects)
----- now has a hard stop on using 0-power moves on consecutive turns
----- heavily discourages 0-power moves if below 1/3 hp
- Type immunity prevents trapping moves from taking hold at all
- Erika uses her pic from yellow version which alters her funerary clothes to a proper kimono
- Cannot bypass Brock via the start button

Illusioned October 9th, 2020 11:38 PM

I have a bug to report. When using GBC palette functionality, a transformed pokemon's palette changes to random colors when an opponent is knocked out.
https://i.imgur.com/6gUyeSU.png

jojobear13 October 10th, 2020 8:36 AM

Quote:

Originally Posted by Illusioned (Post 10216753)
I have a bug to report. When using GBC palette functionality, a transformed pokemon's palette changes to random colors when an opponent is knocked out.https://i.imgur.com/6gUyeSU.png

Thanks. I think I know the cause. I’ll look into it.

EDIT: I think I found the cause. The color change is not random. It's actually is trying to default to the Grey palette. This is because the function that updates pokemon palettes assumes that a transformed pokemon always has PAL_GREYMON assigned to it rather than actually searching out and defaulting to the palette assigned to Ditto.


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.