Git Product home page Git Product logo

Comments (3)

Admiral-Fish avatar Admiral-Fish commented on July 24, 2024

https://github.com/Admiral-Fish/PokeFinder/blob/master/Source/Core/Parents/EncounterArea.cpp#L58-L92
https://github.com/pret/pokeemerald/blob/master/src/wild_encounter.c#L915-L934

My implementation matches what the game does. Please provide a specific example with how a pokemon you caught in game does not match what pokefinder generated

from pokefinder.

c-poole avatar c-poole commented on July 24, 2024

Here is an explicit example: I caught a wild voltorb with Sweet Scent using a static lead in the inner-area of New Mauville.

Level 24
PID 0x789195C8
IVs: 11/2/16/14/9/1

This is a wild H1 encounter which pokefinder says with a static lead can should be either a magnemite or a magneton.

The issue in the implementation is not in the Pokefinder function you highlighted, although technically yours does lack the invalid memory access that Emerald has. Emerald always checks the types of 12 "Encounter slots" even though for Surfing encounters there are only 5. This leads to Emerald also checking the Old Rod and Good Rod encounter slots as well as the types of two glitch species (0x0 and 0x0855). Luckily, none of the Old/Good Rod encounter slots are electric types and neither are either of the glitch species, so this ended up being buggy code that didn't produce bad encounters.

The issue for the difference in behavior between Emerald and Pokefinder is in this line in Pokefinder:
https://github.com/Admiral-Fish/PokeFinder/blob/master/Source/Core/Gen3/Generators/WildGenerator3.cpp#L92
which does not capture both of the cases of the if statement in Emerald:
https://github.com/pret/pokeemerald/blob/master/src/wild_encounter.c#L929

If 12 encounter slots all match the type to be forced, the game recognizes there is no need to change anything about how its generation works and you get the standard encounter table encounter rates instead of every slot getting an equal shake. The only location this is possible to happen is New Mauville, since no other encounter table has 12 steel types or 12 electric types.

from pokefinder.

Real96 avatar Real96 commented on July 24, 2024

Yeah the issue is correct:
image

from pokefinder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.