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

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by shadowofdarkness, Feb 5, 2017.

  1. shadowofdarkness
    OP

    shadowofdarkness GBAtemp Fan

    Member
    490
    168
    Apr 17, 2007
    Canada
    Pokemon Generations 1 & 2 DV NTR overlay

    Features include
    DVs of wild and Party Pokemon including seeing if something is shiny or not, in both generations 1 and 2.

    Plus some gen 2 exclusive features include
    If a wild Pokemon is holding a item the overlay has a blue (!) marking at bottom right
    Seeing a egg as it's generated (as second parent is put in daycare) and a "(!)" notification if you can pickup a egg.
    Seeing the roaming legends as soon as they're released (so you can soft reset if you want something different).
    A colored (!) matching the roaming legendary will appear if you are on the same route as it

    For seeing party Pokemon DVs
    In gen 1 look at the stats of the Pokemon and the overlay will be forced open to that specific one

    For gen 2 your just highlight whatever one you want to see in the Pokemon list which auto opens and closes when in that list.
    If you have a full team selecting cancel also shows the first Pokemon. If you don't have a full team it will show ghost data from whatever was last in that spot.
    Having the Party view forced open and scrolling through other menus will also cycle through your Pokemon based on the index count from the top of the list.

    Controls for gen 1 and 2
    Wild Pokemon - This auto opens in a battle or can be toggled with the L trigger
    Party Pokemon - Force toggle with the R trigger

    The rest are gen 2 only
    To toggle the unclaimed egg view use Y and see the next egg even before it's ready to pickup (as soon as parents are both in the daycare)

    For the roaming legends in gen 2 the buttons are not toggles but you use one just to close.
    I recommend starting with the direction then adding in the trigger to not open the party by accident.
    Raikou is R + Left
    Entei is R + Down
    Suicune is R + Right (Gold and Silver only as he is not a roamer in Crystal) ***closes the overlay on Crystal***
    To close the overlay use R + Up

    Note about shiny Pokemon
    Due to Bank using a different algorithm than gen 2 you can see multiple types of shinies and they are listed accordingly
    Universal Shiny is the one and only DV combination that is shiny both in gen 2 and gen 7
    Gen 2 Shiny
    means DO NOT put it into Pokemon Bank since it is only shiny in gen 2 games so far. (may be fixed to be shiny in gen 7 when official gen 2 VC is released)
    Gen 7 Shiny means put it in Bank and transfer to Sun and Moon. It will be shiny (it's not shiny in gen 2 though)

    The release in this post is for official VC releases of gen 1
    For gen 2 use Traivers wireless trading patched versions.
    Supports all languages with auto detection for gen 1 only
    gen 2 is English only
    for now for Gold and Silver but Crystal is English and Spanish
    The compiled plg file is in the zip with the source. You don't have to compile.

    Screenshot
    Please note having multiple views at once can lag the game. (Fun note pertaining to the Unclaimed Egg in the screenshot, breeding with a shiny Ditto gives a 1/64 chance of a shiny!)
    bot_0007.jpg

    Video
    Videos

    UPDATES
    October 9
    Beta 3
    Added toggling on and off for the automatic opening in wild battles (Dpad UP+Left Trigger)
    Fixed bug causing the plugin to not work in Yellow version again

    September 24
    Beta support for official gen 2 VC games added in Attached section

    July 17
    Fixed bug causing the plugin to not work in Yellow version

    Mar 9
    A few things

    Feb 27
    All languages for gen 1
    Fixed gen 2 party view
    Added held item notification in gen 2
     

    Attached Files:

    Last edited by Veund, Oct 9, 2017
  2. Veund

    Veund GBAtemp Regular

    Member
    130
    36
    Feb 6, 2017
    United States
    australia
    i tested this with Pokemon red and it didn't work i got some odd numbers like 00ff when picking my starter and 2000 when looking at my pokemon
     
  3. shadowofdarkness
    OP

    shadowofdarkness GBAtemp Fan

    Member
    490
    168
    Apr 17, 2007
    Canada
    This plugin is only for enemy Pokemon you are fighting, but that output is what it's supposed to look like, if for some reason it does the starter which I never tested or thought of 00ff would be 15 in both attack and defense and 0 in speed and special
     
  4. Veund

    Veund GBAtemp Regular

    Member
    130
    36
    Feb 6, 2017
    United States
    australia
    no it is always 00ff (i reset to double check), in Pokemon blue the 2000 doesn't happen when checking your Pokemon just in red and nothing happens when you battle wild Pokemon it just stays as 0000
     
  5. shadowofdarkness
    OP

    shadowofdarkness GBAtemp Fan

    Member
    490
    168
    Apr 17, 2007
    Canada
    I hoped the offsets would be the same because those roms are so similar but I guess this only works for Blue. I will start saves for Red and Yellow to find the correct offsets and make more versions of the plugin.

    You are using the official VC releases right not any old injects since it may be possible using a different emulator Save state version may affect offsets.
     
    Last edited by shadowofdarkness, Feb 6, 2017
    x65943 likes this.
  6. Veund

    Veund GBAtemp Regular

    Member
    130
    36
    Feb 6, 2017
    United States
    australia
    nope I'm using legit vc releases of the games, I haven't tested yellow but I first tried red and it didn't work then tried blue and it worked, I can record it and show you if you like?
     
  7. RustInPeace

    RustInPeace Samurai Cop

    Member
    3,123
    2,500
    Oct 13, 2014
    United States
    Good luck on that, this is very promising.
     
    Veund likes this.
  8. shadowofdarkness
    OP

    shadowofdarkness GBAtemp Fan

    Member
    490
    168
    Apr 17, 2007
    Canada
    I have added a version that works in Red to the first post. I will get a version for Yellow tomorrow.
     
    Veund and RustInPeace like this.
  9. shadowofdarkness
    OP

    shadowofdarkness GBAtemp Fan

    Member
    490
    168
    Apr 17, 2007
    Canada
    I have added Yellow to the first post.
     
    RustInPeace and xtheman like this.
  10. Alex4U

    Alex4U I ssssssssee you

    Member
    1,149
    981
    Jan 6, 2016
    Mexico
    with Snivy, Mystery Zone (Adress 0x00)
    Cool! This works for JP and USA legit vc?
     
  11. shadowofdarkness
    OP

    shadowofdarkness GBAtemp Fan

    Member
    490
    168
    Apr 17, 2007
    Canada
    They work with the USA for sure but I'm not sure and sort of doubt they would work for the JP versions. I'll write up a quick tutorial on how to find the offset so anyone can find it easy it only takes a few minutes.
     
    Veund likes this.
  12. Zidapi

    Zidapi GBAtemp Psycho!

    Member
    3,038
    1,821
    Dec 1, 2002
    Hello, you should update your plugin to be based off of the new fps overlay example, so no more battery:)

    Great job on this btw, can't wait to see what else comes from the new overlay feature.
     
    Last edited by Zidapi, Feb 8, 2017
  13. shadowofdarkness
    OP

    shadowofdarkness GBAtemp Fan

    Member
    490
    168
    Apr 17, 2007
    Canada
    For anyone that would like to add support for other region games.

    How to find the wild encounters DVs in RAM

    1: Start NTR debugger
    2: Get into a wild encounter
    3: Dump the RAM of the VC game
    4: Catch the Pokemon
    5: Repeat 2-4
    6: Save
    7: Open your save in any save editor to view the caught Pokemon's DVs
    8: Open the first RAM dump in any hex editor
    9: Search for the Pokemon's DVs in hex and list off all matches
    10: Repeat 7-9 using the second RAM dump and Pokemon
    11: Compare lists to find the common match which will be the correct offset
    12: Add 0x8000000 to it since you found the offset from the start of your file not the full 3DS RAM

    Note remember byte order in RAM is reverse but some editors list it in the other order so search for the right order (In RAM which I show it is Speed Spec Atk Def but you may have to search for Atk Def Speed Spec)


    I also have no problem with people using this info to make better more complete plugins if they have more knowledge than me. So here are the USA offsets to help anyone along.

    Red 0x89300a9 / Blue 0x892fd19 / Yellow 0x8930578

    Other fun things that could be done but are to much for me would be to calculate the HP DV and show it. For it basically take the DVs in proper byte order atk and def first then think of it as a binary number where odds are 1 and evens are 0
    Have some knowledge embedded that compares the DVs to the list of 15 and actually warn you with text if you have a shiny match.
     
  14. Veund

    Veund GBAtemp Regular

    Member
    130
    36
    Feb 6, 2017
    United States
    australia
    so i have been looking at my ram dumps of the 3 Pokemon VC games I have and found that on dump_pid29_1.dmp of all 3 games on line 00800140 it states the Pokemon game

    BB B9 33 3E 50 4F 4B 45 4D 4F 4E 20 42 4C 55 45 »¹3>POKEMON BLUE

    BB B9 33 3E 50 4F 4B 45 4D 4F 4E 20 52 45 44 00 »¹3>POKEMON RED

    BB B9 33 3E 50 4F 4B 45 4D 4F 4E 20 59 45 4C 4C »¹3>POKEMON YELL
    4F 57 00 80 30 31 03 1B 05 03 01 33 00 97 04 7C OW.€01.....3.—.|

    couldn't you have a variable that checks that information then use a call statement to then call the offset for each game and make a universal file that would then work on all 3 games?

    Something like

    $Game_var = Hexthing

    call $Game_var

    POKEMON RED
    offset = 0x89300a9
    *OTHER CODE

    POKEMON BLUE
    offset = 0x892fd19
    *OTHER CODE

    POKEMON YELLOW
    offset = 0x8930578
    *OTHER CODE

    END
     
  15. Alex4U

    Alex4U I ssssssssee you

    Member
    1,149
    981
    Jan 6, 2016
    Mexico
    with Snivy, Mystery Zone (Adress 0x00)
    I'll help you with JP version later.
     
  16. shadowofdarkness
    OP

    shadowofdarkness GBAtemp Fan

    Member
    490
    168
    Apr 17, 2007
    Canada
    That sounds promising but I don't know how to do it. I really don't know much about coding and stumbled through what I was able to do with help from Google. Im not stopping anyone from making a better version and releasing it.
     
  17. Veund

    Veund GBAtemp Regular

    Member
    130
    36
    Feb 6, 2017
    United States
    australia
    I can program but i have no idea where to start with this, are you able to upload your sorce code so that i can learn from that? I have been looking at the code for the example plugins
     
  18. shadowofdarkness
    OP

    shadowofdarkness GBAtemp Fan

    Member
    490
    168
    Apr 17, 2007
    Canada
    This is a diff of the clock examples main.c it is the only file I changed with 1 addition and 1 change. It technically still calculates the time just never displays it since I didn't know enough to strip it down.

    12a13
    > #define __dv (*(vu16*)0x0892fd19)
    113c114
    < xsprintf(buf, "%02d:%02d", hour, min);
    ---
    > xsprintf(buf, "%04X", __dv);
     
  19. Veund

    Veund GBAtemp Regular

    Member
    130
    36
    Feb 6, 2017
    United States
    australia
    Alright ill see if i can get it working over the weekend, i might inject the information into the fps plugin as it uses the lower screen and with the VC its not used for much givving far more room
     
  20. Veund

    Veund GBAtemp Regular

    Member
    130
    36
    Feb 6, 2017
    United States
    australia
    OK!!!! it has taken me a while as I'm literally learning c as I go with this, but I finally have a universal plugin for the 3 Us versions of the games attached bellow

    although unlike shadowofdarkness's it's based off the fps plugin not the clock plugin (its a tad easier to cut back, kinda) although it still renders on both screens for some reason
     

    Attached Files:

    shadowofdarkness likes this.