Skip to content

Add gen IV special encounters in trophy garden#1528

Open
Machine-Maker wants to merge 2 commits into
PokeAPI:masterfrom
Machine-Maker:feature/gen-iv-trophy-garden
Open

Add gen IV special encounters in trophy garden#1528
Machine-Maker wants to merge 2 commits into
PokeAPI:masterfrom
Machine-Maker:feature/gen-iv-trophy-garden

Conversation

@Machine-Maker
Copy link
Copy Markdown
Contributor

Change description

Closes #696

AI coding assistance disclosure

Claude Code helped analyze the pret decompiles to figure out exactly how it worked and helped generate scripts to generate the csv changes.

Contributor check list

  • I have written a description of the contribution and explained its motivation.
  • I have written tests for my code changes (if applicable).
  • I have read and understood the AI Assisted Contribution guidelines.
  • I will own this change in production, and I am prepared to fix any bugs caused by my code change.

@Machine-Maker Machine-Maker force-pushed the feature/gen-iv-trophy-garden branch from 143ab94 to 654eee5 Compare May 20, 2026 20:52
@jemarq04
Copy link
Copy Markdown
Member

Last time you had mentioned that the entries I thought were duplicate were just split up into different slots (as the source code had been laid out) to add up to the expected encounter rate. But there seem to be genuine duplicates here - in Pokemon Platinum, Eevee is listed twice at level 22 at a 5% rate. In Diamond/Pearl, it is a 5% rate to see it at level 16 and a 5% rate at level 18, meaning 10% in those games as well. Both Serebii and Bulbapedia only list these as a 5% chance total.

I think you should go through the encounters and consolidate these so that they're listed at the appropriate 5% (i.e. in D/P list Eevee at 5% with level range 16-18 and in Pt at 5% with level range 22-22). If there's something I missed, though, please let me know.

@Machine-Maker
Copy link
Copy Markdown
Contributor Author

Machine-Maker commented May 23, 2026

@jemarq04
The reason there are 2 slots for eevee in platinum, is that there are technically 2 encounter slots. See https://github.com/pret/pokeplatinum/blob/main/src/special_encounter.c and https://github.com/pret/pokeplatinum/blob/main/res/field/encounters/encounters_trophy_garden.json

There can be 2 pokemon from the list present, the pokemon he mentioned yesterday, and the one he mentioned "today". Each have 5% chance. So you need 2 slots to replicate that behavior. In platinum, it's not as obvious cause every pokemon can only be found at a single level. But in D/P, each slot also has a different level, 16 or 18.

But there are 2 slots based on the game's code (or at least the decompilation of the game).

tl;dr, you need 2 slots cause 2 out of the special list can be found at the same time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Trophy Garden entries missing from Generation IV

2 participants