The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Battle Any way to remove critical hits (https://www.pokecommunity.com/showthread.php?t=430473)

ApocalypticAnarchist February 3rd, 2020 2:45 PM

Any way to remove critical hits
 
I'm trying to remove critical hits, specifically from emerald, is there any way to do it? I haven't been able to find any info on this. Any help is appreciated!

DarkCyborg February 3rd, 2020 3:36 PM

Well, there's the CH table on this post: https://www.pokecommunity.com/showthread.php?p=8495151#post8495151

It looks like the divider for Critical Hit chance (ex: 0x10 = 16, which means 1/16 for no CH modifiers). Maybe if you put 0xFF, you can make it 1/256, but I'm not sure. That's not 0, but 0,4% is nice.

__________

There's also this routine that changes CH to 1.5x. Maybe you can use it to change it to 1, but probably it won't remove other effects from a Critical Hits (such as ignoring defensive status changes).

https://www.pokecommunity.com/showthread.php?p=8497631#post8497631

ApocalypticAnarchist February 3rd, 2020 4:43 PM

Quote:

Originally Posted by DarkCyborg (Post 10121948)
Well, there's the CH table on this post: https://www.pokecommunity.com/showthread.php?p=8495151#post8495151

It looks like the divider for Critical Hit chance (ex: 0x10 = 16, which means 1/16 for no CH modifiers). Maybe if you put 0xFF, you can make it 1/256, but I'm not sure. That's not 0, but 0,4% is nice.

So I tried changing just 10 to FF and nothing seemed to change so I changed {10 00 08 00 02 00 01 00 01 00} to {FF 00 FF 00 FF 00 FF 00 01 00} and it seemed to do the trick. I was testing by spamming slash, didnt try focus energy but I might if I start playing and I see crits too often.

I no absolutely know nothing about editing so I have no idea how to do any of the routine stuff, I dont even know what I changed and why it works lol but it does lol. Thanks for the help!

DarkCyborg February 4th, 2020 11:40 PM

You're welcome! Actually, changing only the first value was expected to not work on your tests, because you were using Slash, which has a +1 CH modifier ^^

I recommend you to change that last 01 to FF as well, otherwise things like Farfetch'd + Stick + Dire Hit + Slash will always crit (100% to +4). Take a look at the table on Bulbapedia: https://bulbapedia.bulbagarden.net/wiki/Critical_hit

___

Btw, I'm not great with routines as well xD

Murkrow August 14th, 2020 12:29 AM

wonder if anyone knows how to do this for gen4/5

Manekimoney August 14th, 2020 1:57 AM

While 1/256 fix is neat, it makes the same meme as "Gen 1 miss". It is rare, but since it's so unanticipated, it's a bummer when it happens from your opponent's side.

I wish there was a way to completely remove crits, at least for the first stage of the table.

mgriffin August 14th, 2020 9:30 AM

Just patch the function to increment the instruction pointer and set the multiplier to 1 instead of doing what it currently does. i.e.:
Code:

static void Cmd_critcalc(void)
{
  gCritMultiplier = 1;
  gBattlescriptCurrInstr++;
}


I know you're probably asking about binary, but fortunately you could just compile this and inject it into your ROM and repoint the command in the battle script table. Or even just work out where the original code is (the
pokeemerald.map
file will tell you the offset if you make the function non-static) and replace the first non-
push
instruction with a branch directly to the
gCritMultiplier = 1;
line.

EDIT: Also, instead of 1/256, looks like the table contains u16s so you could have a 1/65536 chance. But obviously that's not removing them.

Manekimoney August 14th, 2020 1:55 PM

Quote:

Originally Posted by mgriffin (Post 10195396)
Just patch the function to increment the instruction pointer and set the multiplier to 1 instead of doing what it currently does. i.e.:
Code:

static void Cmd_critcalc(void)
{
  gCritMultiplier = 1;
  gBattlescriptCurrInstr++;
}


I know you're probably asking about binary, but fortunately you could just compile this and inject it into your ROM and repoint the command in the battle script table. Or even just work out where the original code is (the
pokeemerald.map
file will tell you the offset if you make the function non-static) and replace the first non-
push
instruction with a branch directly to the
gCritMultiplier = 1;
line.

EDIT: Also, instead of 1/256, looks like the table contains u16s so you could have a 1/65536 chance. But obviously that's not removing them.

Some of these might be beyond my skill level. I'm pretty shaky when it comes to messing with decomp, but I will try. If nothing else works, I will definitely at least do the 1/65536 change.


All times are GMT -8. The time now is 9:12 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.