- 79
- Posts
- 10
- Years
- Seen Apr 1, 2023
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!
Well, there's the CH table on this post: https://www.pokecommunity.com/posts/8495151
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.
static void Cmd_critcalc(void)
{
gCritMultiplier = 1;
gBattlescriptCurrInstr++;
}
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.Just patch the function to increment the instruction pointer and set the multiplier to 1 instead of doing what it currently does. i.e.:
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 (theCode:static void Cmd_critcalc(void) { gCritMultiplier = 1; gBattlescriptCurrInstr++; }
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 thegCritMultiplier = 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.