Jump to content

Report of Possible Bug


Decrypt

Recommended Posts

Hello, I got a Pokemon Ruby (gen 3) save file (.sa1) that had Pokemon with Pokerus that I got in-game without using PKHeX. But, when I opened my save file with PKHeX, the box for ( Infected) is left unchecked. I think it might be a bug.

Link to comment
Share on other sites

Just now, theSLAYER said:

Hey quick question, which mon is supposed to be infected with pkrus?

It's Combusken. But the all of the other Pokemon in my party and in the PC also got infected with it. So, you can also check using the other Pokemon. 

 

 

Link to comment
Share on other sites

Looks like invalid pkrs values.

https://github.com/pret/pokeemerald/blob/5d7c438efcd341c777c866a7eb3f8401f8548dc5/src/pokemon.c#L6036-L6058

The byte at 0x44 has "01", which decomposes to "strain 0, days 1". Can't get strain 0, and when it's cured (days elapsed), it will never remember it had pkrs.

 

I simulated the numbers to generate a list of possible PKRS values:

https://github.com/pret/pokeemerald/blob/5d7c438efcd341c777c866a7eb3f8401f8548dc5/src/pokemon.c#L5940-L5978

var list = new List<int>();
for (int i = 0; i <= 255; i++)
{
	var val = i;
	if ((val & 0x7) == 0)
		continue;
	if ((val & 0xF0) != 0)
		val &= 7;
		
	val |= (val << 4);
	val &= 0xF3;
	val++;
	$"{i:000}: {val:X2}".Dump();
	list.Add(val);
}

list.OrderBy(z => z).Select(z => $"{z:X2}").Distinct().Dump();

And here is the list of initial values:

12 
23 
34 
41 
52 
63 
74 
92 
A3 
B4 
C1 
D2 
E3 
F4

Note how strain 0 and strain 8 are not generatable.

===

Did you hack in PKRS with a cheat?

  • Like 4
Link to comment
Share on other sites

16 hours ago, Kaphotics said:

Looks like invalid pkrs values.

https://github.com/pret/pokeemerald/blob/5d7c438efcd341c777c866a7eb3f8401f8548dc5/src/pokemon.c#L6036-L6058

The byte at 0x44 has "01", which decomposes to "strain 0, days 1". Can't get strain 0, and when it's cured (days elapsed), it will never remember it had pkrs.

 

I simulated the numbers to generate a list of possible PKRS values:

https://github.com/pret/pokeemerald/blob/5d7c438efcd341c777c866a7eb3f8401f8548dc5/src/pokemon.c#L5940-L5978



var list = new List<int>();
for (int i = 0; i <= 255; i++)
{
	var val = i;
	if ((val & 0x7) == 0)
		continue;
	if ((val & 0xF0) != 0)
		val &= 7;
		
	val |= (val << 4);
	val &= 0xF3;
	val++;
	$"{i:000}: {val:X2}".Dump();
	list.Add(val);
}

list.OrderBy(z => z).Select(z => $"{z:X2}").Distinct().Dump();

And here is the list of initial values:



12 
23 
34 
41 
52 
63 
74 
92 
A3 
B4 
C1 
D2 
E3 
F4

Note how strain 0 and strain 8 are not generatable.

===

Did you hack in PKRS with a cheat?

Hello Kaphotics. Thanks for the feedback. Sorry for the late response, I had cheats disabled in the emulator.

Edit: It seems like according to Bulbapedia, having a Pokemon with a Pokerus of 0 is not legitimate. I guess I may have unknowingly cheated in the game.

Edited by Decrypt
Did some research
Link to comment
Share on other sites

  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...