ROM Hack [Release] Gen 1 Pokemon VC wild encounter DV NTR Overlay

DocKlokMan

Plugin Dev
Member
Joined
Apr 20, 2007
Messages
3,009
Trophies
2
Age
36
XP
4,571
Country
United States
"Not to be outdone, the HP stat undergoes some quirks. In the Pokemon's data structure, only four DVs are stored: Attack, Defense, Speed, and Special. The HP DV is determined by the last bit of each of these four DVs. An odd Attack DV adds 8, Defense adds 4, Speed adds 2, and Special adds 1. For example, a Lugia with the DVs 5 Atk, 15 Def, 13 Spe, and 13 Spc will have the following HP:

Attack = Odd, HP += 8
Defense = Odd, HP += 4
Speed = Odd, HP += 2
Special = Odd, HP += 1
resulting in an HP stat of 15.

On the other hand, a Dragonite with 15 Atk, 3 Def, 10 Spe, and 11 Spc will have 8 + 4 + 0 + 1, or 13 HP."

quoted from http://www.smogon.com/ingame/guides/rby_gsc_stats

i have actually managed to get my code implemented into yours and functioning correctly
Alright, I have uploaded a new version including HP. Used this equation here:
Code:
int hp = (8*(attack % 2)) + (4*(defense % 2)) + (2*(speed % 2)) + (1*(special % 2));

That should be all the changes I'm gonna make tonight. Be sure to grab the latest version if you want.
 

Veund

Well-Known Member
Member
Joined
Feb 6, 2017
Messages
140
Trophies
0
Age
32
Location
australia
XP
152
Country
United States
Alright, I have uploaded a new version including HP. Used this equation here:
Code:
int hp = (8*(attack % 2)) + (4*(defense % 2)) + (2*(speed % 2)) + (1*(special % 2));

That should be all the changes I'm gonna make tonight. Be sure to grab the latest version if you want.
no problem that's far more elegant than my solution, I tend to overthink things and over complicate things with a language i know well let alone one i don't

if you look at the code it references myself and shadowofdarkness and the version number you should put yourself in there :)
 
Last edited by Veund,

greenDarkness555

Well-Known Member
Member
Joined
Feb 27, 2016
Messages
122
Trophies
0
Age
28
XP
220
Country
United States
yeah he updated his original post not Shadows original post
Awesome. Thanks.

--------------------- MERGED ---------------------------

I managed to find a way of testing it, but the latest version is here: #33
Thanks, I'm gonna try it with Yellow now.
Edit: It works great with Yellow version.
Also, would this tool work for G/S/C? And would it be possible to implement checking the DVs of the first Pokemon in your party that way you can tell if your starter is shiny?
 
Last edited by greenDarkness555,

DocKlokMan

Plugin Dev
Member
Joined
Apr 20, 2007
Messages
3,009
Trophies
2
Age
36
XP
4,571
Country
United States
Awesome. Thanks.

--------------------- MERGED ---------------------------


Thanks, I'm gonna try it with Yellow now.
Edit: It works great with Yellow version.
Also, would this tool work for G/S/C? And would it be possible to implement checking the DVs of the first Pokemon in your party that way you can tell if your starter is shiny?
It will not work with G/S/C, especially since they are not officially released on 3DS. As for party Pokémon, ask OP, they're the ones that found all the offsets.
 
  • Like
Reactions: greenDarkness555

greenDarkness555

Well-Known Member
Member
Joined
Feb 27, 2016
Messages
122
Trophies
0
Age
28
XP
220
Country
United States
It will not work with G/S/C, especially since they are not officially released on 3DS. As for party Pokémon, ask OP, they're the ones that found all the offsets.
Thanks for the info and for your work!

--------------------- MERGED ---------------------------

This is a quick NTR overlay plugin I made for the generation 1 Pokemon games to show the DVs (predecessor of IVs) of the wild Pokemon. You can use this to catch the best ones including being able to spot a shiny Pokemon if transferred to newer generations.

I'm not a coder so I made only a two line change to the clock demo to show the DVs instead of the time. It still shows the battery because I didn't know how to get rid of it.


How to read the info
You will see a string of four letters and numbers representing the DVs in the following order, note it does not show HP since that is not random but derived from the rest.

Speed / Special / Attack / Defence

The numbers are exact and for numbers it is basic hex ( a=10 b=11 c=12 d=13 e=14 f=15) 15 is max

If you see any of the following CATCH it they are shiny (multiple sets due to gen 7 using swapped attack and defense requirements.

aaaa would be shiny in either gen 2 or 7 it's universal

This set is only shiny in gen 2 so keep it around until the gen 2 VC release
aa2a aa3a aa6a aa7a aaba aaea aafa

This set is only shiny in gen 7 so transfer through Bank right away
aaa2 aaa3 aaa6 aaa7 aaab aaae aaaf


I have versions for Red, Blue, and Yellow
wilddv is for Blue
redwilddv is for Red
yellowwilddv is for Yellow

Any chance you'd be willing to add the offsets for the DVs of the first Pokemon in your party as well?
 

shadowofdarkness

Well-Known Member
OP
Member
Joined
Apr 17, 2007
Messages
536
Trophies
1
XP
2,263
Country
Canada
I was actually thinking of finding the offsets for GSC at least Traiver's wireless trading injected versions. I'll do that tomorrow and if I get around to it I can also find the offset for the first party Pokemon that wouldn't be hard to just use the same method of searching for known data.

One thing to note with making GSC versions, we have no idea Nintendo's future plans with regards to the swapped attack and defense. My best guess being that they are going to swap it back and the current set of bankable shiny DVs will stop working, I doubt they will make both work. but they will have to make the original work to not piss people off that transfer Gyarados or any other shiny from gen 2.

For now though I would prefer to have both sets still detected in case someone comes across a current g7 shiny from the first gen set and can trade it to the official for Bank transfer.
But if they find any from 152-251 there is no guarantee what will happen after official g2 Bank support but better safe then sorry.

Also when I get time I'll update the first post with the newest version.
 

Veund

Well-Known Member
Member
Joined
Feb 6, 2017
Messages
140
Trophies
0
Age
32
Location
australia
XP
152
Country
United States
It will not work with G/S/C, especially since they are not officially released on 3DS. As for party Pokémon, ask OP, they're the ones that found all the offsets.
i found the offset for the party Pokemon in blue, it shows the dv of the Pokemon when you look at its stats or the last Pokemon in your party always

the offset is 0x0892fcdb have tested it by splicing it into some code hopefully i can get the offset for red and yellow soon
 

DocKlokMan

Plugin Dev
Member
Joined
Apr 20, 2007
Messages
3,009
Trophies
2
Age
36
XP
4,571
Country
United States
i found the offset for the party Pokemon in blue, it shows the dv of the Pokemon when you look at its stats or the last Pokemon in your party always

the offset is 0x0892fcdb have tested it by splicing it into some code hopefully i can get the offset for red and yellow soon
Is that offset for the Pokémon you're actively looking at on the status screen or for the last one in your party?
 

Zan'

2F88744FEED717856386400A44BBA4B9CA62E76A32C715D4F
Member
Joined
Oct 8, 2015
Messages
387
Trophies
0
Age
32
XP
271
Country
Alright, I have uploaded a new version including HP. Used this equation here:
C:
int hp = (8*(attack % 2)) + (4*(defense % 2)) + (2*(speed % 2)) + (1*(special % 2));

That should be all the changes I'm gonna make tonight. Be sure to grab the latest version if you want.
More efficient would be this:
C:
unsigned char hp = ((atk & 1)<<3) + ((def & 1)<<2) + ((spe & 1)<<1) + (spc & 1);
AND 1 is faster than MOD 2 since you just want to reduce it to the least significant bit.
And bitshift operations are faster than multiplications.
There's possibly a better way but that would require some brainwork.

Additionally I would use unsigned chars (basically byte) instead of integers since you can't have negative values anyway and the game also handles the values in bytes I'd think since they cap at 255.
 
Last edited by Zan',

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: Lmao that sold out fast +1