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

Veund

Well-Known Member
Member
Joined
Feb 6, 2017
Messages
140
Trophies
0
Age
32
Location
australia
XP
152
Country
United States
So today i have been programming the day away and I have an update the main difference between this version and that last is that it checks the hex values and informs you if they are shiny so if you get a AAAx it will tell you they are shiny in gen 7 and if you get a AAxA it will tell you they will be shiny in the gen 2 vc release it also tells you that if you have 0000 that's a perfect gen 1 stat pokemon

all the new information is displayed as text under the current 0000 but as a side effect the text is displayed for "perfect gen 1 stats" untill you get your first encounter (working on that) still trying to remove the rendering on the top screen
 

Attachments

  • Universal-wilddv.zip
    5.2 KB · Views: 354
  • Universal-wilddv-source.zip
    484.7 KB · Views: 285

greenDarkness555

Well-Known Member
Member
Joined
Feb 27, 2016
Messages
122
Trophies
0
Age
28
XP
220
Country
United States
So today i have been programming the day away and I have an update the main difference between this version and that last is that it checks the hex values and informs you if they are shiny so if you get a AAAx it will tell you they are shiny in gen 7 and if you get a AAxA it will tell you they will be shiny in the gen 2 vc release it also tells you that if you have 0000 that's a perfect gen 1 stat pokemon

all the new information is displayed as text under the current 0000 but as a side effect the text is displayed for "perfect gen 1 stats" untill you get your first encounter (working on that) still trying to remove the rendering on the top screen
Great work! Any chance you'd be willing to translate the hex to the actual DV values?
 

Veund

Well-Known Member
Member
Joined
Feb 6, 2017
Messages
140
Trophies
0
Age
32
Location
australia
XP
152
Country
United States
Thats on my list of things to do, the problem is working out how to seperate the hex values if i can store the hex values indervidually instead of together i can manipulate them easier
 
Last edited by Veund,
  • Like
Reactions: greenDarkness555

shadowofdarkness

Well-Known Member
OP
Member
Joined
Apr 17, 2007
Messages
536
Trophies
1
XP
2,256
Country
Canada
Thats on my list of things to do, the problem is working out how to seperate the hex values if i can store the hex values indervidually instead of together i can manipulate them easier

Just a note 0000 isn't perfect that's is the worst stats ffff would be perfect.

For separating them I don't know but I think it may be easier to convert the hex to binary then cut them apart.

When i learned about the structure in order to know what to look for in RAM the write-up i found said that is how is done.

The game takes the DV's in binary in the order of attack defense speed special appended together then converts it to hex

So a attack of 15 defense of 8 speed of 11 and special of 5 would be 1111100010110101 in binary

If you also wanted to show HP you can calculate it in that DV order think of odd numbers as 1 and even as 0 and you have the HP DV in binary
 

Veund

Well-Known Member
Member
Joined
Feb 6, 2017
Messages
140
Trophies
0
Age
32
Location
australia
XP
152
Country
United States
I essentially want to impliment all the features you mentioned on the bottom screen with a decent looking layout.

I always thought dv's were taken away from the max stat not added, hence why 0000 is programmed as the best not ffff

The problem im having is using the #define __dvb (*(vu16*)0x80000) for use in any other way than the way you use it, the compiler fails or it doesn't render correctly

If i can output the hex data into an array then i can call each digit indervidually, but im struggling with that, preferably if like to convert the hex into decimal then store each decimal in an array that i can then call and display
 

shadowofdarkness

Well-Known Member
OP
Member
Joined
Apr 17, 2007
Messages
536
Trophies
1
XP
2,256
Country
Canada
I have never heard of anyone that thought DV's are taken away from a max stat. They're just like IV's with the only difference being that they have half the possible values and each value has double the effect of IV's

DV's have 16 values (0-15) and each one is +2 to the stat at L100
IV's have 32 values (0-31) and each one is +1 to a stat at L100

For the compiler problem I wouldn't know, all I figured out was that a similar looking line was referencing a memory location so I copied it and changed the name, size (u16) and target RAM address without really understanding it.
 

DocKlokMan

Plugin Dev
Member
Joined
Apr 20, 2007
Messages
3,009
Trophies
2
Age
36
XP
4,571
Country
United States
I essentially want to impliment all the features you mentioned on the bottom screen with a decent looking layout.

I always thought dv's were taken away from the max stat not added, hence why 0000 is programmed as the best not ffff

The problem im having is using the #define __dvb (*(vu16*)0x80000) for use in any other way than the way you use it, the compiler fails or it doesn't render correctly

If i can output the hex data into an array then i can call each digit indervidually, but im struggling with that, preferably if like to convert the hex into decimal then store each decimal in an array that i can then call and display
Code:
int speed = (__dvx >> 0xC) % 0x10;
int special = (__dvx >> 0x8) % 0x10;
int attack = (__dvx >> 0x4) % 0x10;
int defense = (__dvx >> 0x0) % 0x10;
 
Last edited by DocKlokMan,

Veund

Well-Known Member
Member
Joined
Feb 6, 2017
Messages
140
Trophies
0
Age
32
Location
australia
XP
152
Country
United States
Code:
int speed = (__dvx >> 0xC) % 0x10;
int special = (__dvx >> 0x8) % 0x10;
int attack = (__dvx >> 0x4) % 0x10;
int defense = (__dvx >> 0x0) % 0x10;
causes a compiler error

here(pointing to the brackets)

source\main.c:39:13: error: initializer elerment is not constant
int speed = (__dvb >> 0xC) %0x10;
^
 
Last edited by Veund,

DocKlokMan

Plugin Dev
Member
Joined
Apr 20, 2007
Messages
3,009
Trophies
2
Age
36
XP
4,571
Country
United States
causes a compiler error

here(pointing to the brackets)

source\main.c:39:13: error: initializer elerment is not constant
int speed = (__dvb >> 0xC) %0x10;
^
Maybe it's because you're using a DEFINE. Here, I made my own version using the source provided. Need people to test it out for the Shiny detection:

-snip screenshots-
EDIT: Re-uploaded to fix Shiny detection based on the info here: https://nm.reddit.com/r/pokemon/comments/5q2ayz/so_it_turns_out_transferring_rby_pokemon_to/ and here: https://twitter.com/SciresM/status/824125775565754372

Feel free to use this @shadowofdarkness

This post will be the release post for the alternate version of DV NTR Overlay.
Last Update: Feb-17-2017 6:00PM EST

Features:
  • Wild encounter DVs, highlighting for Best DV and Worst DV, confirmation on shiny status according to generation. Info updates at the start of a battle.
  • Party Pokémon DVs, highlighting for Best DV and Worst DV, confirmation on shiny status according to generation. Info updates upon opening a Pokémon's stat screen from the Pokémon menu.
  • Each info box can be toggled with L & R. Both may be on at once, they start disabled.
Screenshots:
bot_0000.png bot_0001.png bot_0002.png
Plugin and source attached below.
 

Attachments

  • DV_Calc.zip
    490.1 KB · Views: 325
Last edited by DocKlokMan,

DocKlokMan

Plugin Dev
Member
Joined
Apr 20, 2007
Messages
3,009
Trophies
2
Age
36
XP
4,571
Country
United States
nice!!!! this is what i have been trying to work out !!!!
According to your source, Gen7 was 0xAAA? and Gen2 is 0xAA?A. So you're sure that a Gen7 shiny would be any value between 0xAAA0 - 0xAAAF, right? The OP states only some are Gen7. I modeled it just like your source but I want to be sure.
 

Veund

Well-Known Member
Member
Joined
Feb 6, 2017
Messages
140
Trophies
0
Age
32
Location
australia
XP
152
Country
United States
According to your source, Gen7 was 0xAAA? and Gen2 is 0xAA?A. So you're sure that a Gen7 shiny would be any value between 0xAAA0 - 0xAAAF, right? The OP states only some are Gen7. I modeled it just like your source but I want to be sure.
yeah the op just has some examples, all 16 should be shiny
 

Veund

Well-Known Member
Member
Joined
Feb 6, 2017
Messages
140
Trophies
0
Age
32
Location
australia
XP
152
Country
United States
I have just confirmed this is not the case. Here are the proper ranges:

0xAAA[2/3/6/7/A/B/E/F] I will update the plugin to reflect this.
oh my bad

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

I have just confirmed this is not the case. Here are the proper ranges:

0xAAA[2/3/6/7/A/B/E/F] I will update the plugin to reflect this.
i have put together a little bit of code to calculate the hp dv if you wanted to implement it in your code

int atk = 0;
int def = 0;
int spd = 0;
int spe = 0;
int hp = 0;

if(attack % 2 == 0)
atk = 0;
else
atk = 8;
if(defense % 2 == 0)
def = 0;
else
def = 4;
if(speed % 2 == 0)
spd = 0;
else
spd = 2;
if(special % 2 == 0)
spe = 0;
else
spe = 1;


hp = (atk + def + spd + spe);

edited it was the wron way before
 
Last edited by Veund,

DocKlokMan

Plugin Dev
Member
Joined
Apr 20, 2007
Messages
3,009
Trophies
2
Age
36
XP
4,571
Country
United States
oh my bad

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


i have put together a little bit of code to calculate the hp dv if you wanted to implement it in your code

int atk = 0;
int def = 0;
int spd = 0;
int spe = 0;
int hp = 0;

if(attack % 2 == 0)
atk = 0;
else
atk = 8;
if(defense % 2 == 0)
def = 0;
else
def = 4;
if(speed % 2 == 0)
spd = 0;
else
spd = 2;
if(special % 2 == 0)
spe = 0;
else
spe = 1;


hp = (atk + def + spd + spe);

edited it was the wron way before
So the HP DV is just a combo of the other four? I'll look into adding that.
 

Veund

Well-Known Member
Member
Joined
Feb 6, 2017
Messages
140
Trophies
0
Age
32
Location
australia
XP
152
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
 

Attachments

  • hp calc.zip
    514.8 KB · Views: 169

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Veho @ Veho: Many such cases.