• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Script] How to check if a Pokémon species has already been "caught" (or "seen") in the Pokédex?

  • 119
    Posts
    15
    Years
    I'm trying to write a script in which the player receives a Pokémon if it has not been caught before. I.e. the event semi-randomly chooses a Pokémon species, checks if it's already "caught" in the Pokédex, and if it's not, gives that Pokémon to the player (if yes, repeats the script). For this, I need to check the caught/seen status of specific species in the Pokédex.

    Could anyone help me how to best check for this? I would guess there are flags that can be read. This old post (also pasted below) however indicates it's more complicated. I cannot imagine I am the first one trying to do this, so perhaps there is a relatively simple way? Extensive scouring of the interwebs has not really resulted in anything so far, sadly. Thanks in advance for any help!

    So far, I've gotten this far:

    Jambo51 identifies a routine that does seen/caught checks. Plus some registries. But as I'm not well versed in ASM, I am not sure how to translate this to a workable (preferably XSE) script, if at all possible.
    Spoiler:
    As for the Seen/Caught flags being DMA encrypted, the following DMA negation modification allows for static addresses of the Seen/Caught flags. (I have not tested it myself.)
    Spoiler:
    Once DMA encryption is negated, with help from the CrystalWiki's RAM map, it theoretically allows us to find the now-static addresses of the Seen/Caught flags (I haven't calculated it yet but it should be simple):
    Spoiler:
    However, with the flags being a 52-byte long index/table/something, I am not sure how to read this for ca. 400+ species.

    Then there is the added difficulty that the ROM base I am using (Leon & UltimaSoul's) has the JPAN Save Block expansion installed and an expanded Pokédex, so all of the above information is probably already useless.

    (I guess this is why people move to Decomp.)
     
    Last edited:
    Back
    Top