Jump to content

Recommended Posts

Posted

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.

Posted
Just now, Decrypt said:

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.

are you sure you loaded the correct save into PKHeX?

Posted
Just now, theSLAYER said:

are you sure you loaded the correct save into PKHeX?

Hello Pokemon Chief. Yes, I loaded the correct save. 

Posted
2 minutes ago, theSLAYER said:

I assume you're using an emulator. Would that be VBA?

Yes. I am using VBALink 1.7 LAN edition.

Posted
3 minutes ago, Decrypt said:

Yes. I am using VBALink 1.7 LAN edition.

Save the game in-game twice, then export your save, then send it to me here.
image.png
or
image.png

(options may differ due to emulator version, but it's effectively something like that)

Posted
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. 

 

 

Posted

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
Posted (edited)
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
  • 2 years later...
Posted

Upon (a much later) investigation, Ruby/Sapphire has a "bug" (that was not fixed in 1.1, but was fixed in Emerald) that didn't do the &7 loop for picking a valid strain.

Future commits/releases will be adjusted to allow strain 0/8.

  • Like 1

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...