The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Battle Any way to remove critical hits

Notices
For all updates, view the main page.

Binary ROM Hacking Need a helping hand or just want to talk about binary ROM hacks? Get comments and answers to any ROM Hacking-related problems, questions or thoughts you have here.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old February 3rd, 2020 (2:45 PM).
ApocalypticAnarchist's Avatar
ApocalypticAnarchist ApocalypticAnarchist is offline
 
Join Date: Jul 2014
Gender: Male
Nature: Naughty
Posts: 79
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!
__________________
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old February 3rd, 2020 (3:36 PM).
DarkCyborg DarkCyborg is offline
 
Join Date: Dec 2017
Location: Curitiba, Brazil
Gender: Male
Nature: Lonely
Posts: 31
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
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old February 3rd, 2020 (4:43 PM).
ApocalypticAnarchist's Avatar
ApocalypticAnarchist ApocalypticAnarchist is offline
 
Join Date: Jul 2014
Gender: Male
Nature: Naughty
Posts: 79
Quote:
Originally Posted by DarkCyborg View Post
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!
__________________
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old February 4th, 2020 (11:40 PM).
DarkCyborg DarkCyborg is offline
 
Join Date: Dec 2017
Location: Curitiba, Brazil
Gender: Male
Nature: Lonely
Posts: 31
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
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old August 14th, 2020 (12:29 AM).
Murkrow's Avatar
Murkrow Murkrow is offline
Nasty Plotting
 
Join Date: Jan 2008
Nature: Calm
Posts: 576
wonder if anyone knows how to do this for gen4/5
__________________

Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old August 14th, 2020 (1:57 AM).
Manekimoney Manekimoney is offline
Banned
 
Join Date: Nov 2017
Posts: 183
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.
Reply With Quote
  #7   Link to this post, but load the entire thread.  
Old August 14th, 2020 (9:30 AM).
mgriffin's Avatar
mgriffin mgriffin is offline
 
Join Date: Apr 2014
Posts: 1,406
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.
Reply With Quote
  #8   Link to this post, but load the entire thread.  
Old August 14th, 2020 (1:55 PM).
Manekimoney Manekimoney is offline
Banned
 
Join Date: Nov 2017
Posts: 183
Quote:
Originally Posted by mgriffin View Post
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.
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
Thread Tools

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 9:12 AM.