ROM Hack Wurmple evolution bugged? What did I wrong?

Puddies

Well-Known Member
OP
Member
Joined
Jan 13, 2016
Messages
156
Trophies
0
Age
37
XP
174
Country
Gambia, The
I read that the evolution of Wurmple depends on its personality value:
p mod 65536 = pw
pw mod 10 < 5 then evolve to Silcoon, else evolve to Cascoon
Source: http://bulbapedia.bulbagarden.net/wiki/Personality_value#Wurmple.27s_evolution

I play pokemon omega ruby and I have 2 Wurmples. I looked up their personality values using pkhex.
(I used Encryption Constant, because it is the 6th Generation)

One with
p = 0x41472683 = 1095181955,
pw = p mod 65536 = 9859,
pw mod 10 = 9 (should be Cascoon)

The other one with
p = 0xB7C26A86 = 3082971782
pw = p mod 65536 = 27270
pw mod 10 = 0 (should be Silcoon)

But both Wurmples evolved to Silcoon. Any ideas how this can be? Why do both Wurmples evolve to Silcoon??

I also tried this calculation with their PIDs (allthough this only matters in the 3rd Generation), but there is the same result. One should evolve to Silcoon, the other one to Cascoon.
 
Last edited by Puddies,

KazoWAR

Well-Known Member
Member
Joined
Aug 12, 2008
Messages
1,952
Trophies
1
Age
35
Location
Winter Haven
XP
2,135
Country
United States
I read that the evolution of Wurmple depends on its personality value:
p mod 65536 = pw
pw mod 10 < 5 then evolve to Silcoon, else evolve to Cascoon
Source: http://bulbapedia.bulbagarden.net/wiki/Personality_value#Wurmple.27s_evolution

I play pokemon omega ruby and I have 2 Wurmples. I looked up their personality values using pkhex.
(I used Encryption Constant, because it is the 6th Generation)

One with
p = 0x41472683 = 1095181955,
pw = p mod 65536 = 9859,
pw mod 10 = 9 (should be Cascoon)

The other one with
p = 0xB7C26A86 = 3082971782
pw = p mod 65536 = 27270
pw mod 10 = 0 (should be Silcoon)

But both Wurmples evolved to Silcoon. Any ideas how this can be? Why do both Wurmples evolve to Silcoon??

I also tried this calculation with their PIDs (allthough this only matters in the 3rd Generation), but there is the same result. One should evolve to Silcoon, the other one to Cascoon.
Gens 3/4 use the first 16 bits(p mod 65536), but gens 5/6 use the last 16 bits(p / 65535)
 
  • Like
Reactions: Puddies

Puddies

Well-Known Member
OP
Member
Joined
Jan 13, 2016
Messages
156
Trophies
0
Age
37
XP
174
Country
Gambia, The
Well ok, but I play omega ruby, this is the 6th generation. So my calculation should be correct because I used the last bits, shouldnt it?
 

Puddies

Well-Known Member
OP
Member
Joined
Jan 13, 2016
Messages
156
Trophies
0
Age
37
XP
174
Country
Gambia, The
Ah ok, this might be the solution. Using p / 65536 I get the values 2 and 1.
But it is strange in the article, it says:

"Mathematically, pw can be derived by calculatingp % 65536 for Generations III and IV or p / 65536 (rounded down) for Generation V. In Generation VI, Wurmple's evolution is now determined by the encryption constant, albeit with the same formula."

So, only Generation V should use p / 65536, and Generation VI should use the encryption constant without any 65536 calculation ... But using this and converting it to decimal, and calculating mod 10, the results are again different evolutions (5 and 0). Very strange.
 
Last edited by Puddies,

xirtamehtsitahw

Well-Known Member
Member
Joined
Dec 9, 2011
Messages
140
Trophies
0
Age
43
Location
I simultaneously exist across all moments in time.
XP
306
Country
United States
This is one of the great Pokemon mysteries. Why on Earth did Nintendo code such a low-end Pokemon as the common Wurmple to have such a complicated evolution formula? I can figure out the math behind it, but it seems like so much work to code this type of evolutionary tactic when a simple RNG event would have been so much easier. (As in, RNG set to choose between 0 and 1. If RNG = 0, evolve into Silcoon. If 1, evolve into Cascoon).
 

Puddies

Well-Known Member
OP
Member
Joined
Jan 13, 2016
Messages
156
Trophies
0
Age
37
XP
174
Country
Gambia, The
p / 65536 with p = encryption constant seems to be correct. I got a Wurmple with a value of 8 and finally it evolved to Cascoon.
Thank you for that hint! :)
 

Kaphotics

badc0ded
Member
Joined
Sep 10, 2010
Messages
612
Trophies
0
XP
626
Country
United States
smaller protip: ctrl click the legality indicator to see a verbose output.

x9dea5z.png
 
  • Like
Reactions: Puddies

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    BakerMan @ BakerMan: (that's like 3 months i might be cooked)