Skip to content

Begin adding Sword/Shield encounters#1550

Merged
Naramsim merged 52 commits into
PokeAPI:masterfrom
jemarq04:feat/add-part-sword-shield-encounters
Jun 17, 2026
Merged

Begin adding Sword/Shield encounters#1550
Naramsim merged 52 commits into
PokeAPI:masterfrom
jemarq04:feat/add-part-sword-shield-encounters

Conversation

@jemarq04

@jemarq04 jemarq04 commented Jun 9, 2026

Copy link
Copy Markdown
Member

Change description

This is the first in a series of PRs adding encounters for the sword-shield version group as a follow-up to #1459. I'm trying to chunk them up into pieces that are easier to review, and this felt like a good break in my current progress. I'll make more PRs as I make more progress later on. I'm skipping Wild Areas and gift/trades until later PRs.

This PR contains encounters for Route 1-5, Wedgehurst, Motostoke, Turffield, Hulbury, Galar Mine, Galar Mine No. 2, and Motostoke Outskirts. New location areas (and their prose) were added as well.

I did rename the berry-piles encounter method to berry-trees, since the piles were always at trees in Alola and Galar only has trees. This was just so that this one method could be used for both games without adding a new one.

As was done for encounters for black and white, I've added each unique set of encounter slots used in the game for use in the location areas' encounters. For instance, if multiple location areas had a 50%/40%/10% split, then only one set of slots are created with those rarities and are used by both location areas.

All of this was done with a custom interactive helper script, no AI used. Some human error may have been introduced then, but I tried to double-check each location area as I added them. If we need to hold off to merge other encounter PRs, I have some code to increment my encounter IDs.

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.

jemarq04 added 30 commits June 8, 2026 10:11
@jemarq04 jemarq04 marked this pull request as draft June 9, 2026 23:19
@jemarq04

jemarq04 commented Jun 9, 2026

Copy link
Copy Markdown
Member Author

I just encountered a location area (glimwood-tangle) that can't use the encounter slots I set up... I need to re-distribute the encounter slots and re-do these encounters. :(

@Naramsim

Copy link
Copy Markdown
Member

Great additions @jemarq04 . Did you scrape the data from the internet or by looking into some game files?

@Naramsim

Copy link
Copy Markdown
Member

I just encountered a location area (glimwood-tangle) that can't use the encounter slots I set up... I need to re-distribute the encounter slots and re-do these encounters. :(

Ouch, I'm sorry!

@jemarq04

Copy link
Copy Markdown
Member Author

Great additions @jemarq04 . Did you scrape the data from the internet or by looking into some game files?

I just looked through Serebii/Bulbapedia pages and inputted values into my script which translated them into entries into encounters.csv. The hardest part was determining the shared encounter slots for the game, which I've found to be incorrect twice now lol

I did notice though that in the API, we have multiple sets of encounter slots for black and white with varying encounter rates instead of one set of slots used by each area. It wouldn't be accurate to the in-game encounter slots, but functionally it would give us accurate encounters in each location area.
If organizing the slots that way is good with you @Naramsim, then I can easily edit my script and get these encounters in. Otherwise I'll need to take more time to design the slots to work with every location area encounter in the game before making any PRs.

(I'll also ping @notblisy, since they've done a lot of Pokemon RNG stuff and may know about the specifics of sword/shield encounter slots.)

@jemarq04 jemarq04 marked this pull request as ready for review June 13, 2026 01:30
@jemarq04

jemarq04 commented Jun 13, 2026

Copy link
Copy Markdown
Member Author

I've gone ahead with the same structure as those for black and white and added each unique set of encounter slots as needed for the location areas in sword/shield. I'll update the description of this PR. I figured if we wanted to change that, we'd also want to change it for some past encounters, and I'd be willing to do that as a big project. For now, this was the quickest way to get SWSH encounters into the API.

This PR is now ready for review!

@Naramsim

Naramsim commented Jun 17, 2026

Copy link
Copy Markdown
Member

Hey @jemarq04 , thanks for the data. I really cannot review this data but I trust you did a thorough job. I'm merging, if you/(some one else) spot some errors in the coming days feel free to open another PR.

@Naramsim Naramsim merged commit c6a381a into PokeAPI:master Jun 17, 2026
9 checks passed
@pokeapi-machine-user

Copy link
Copy Markdown

A PokeAPI/api-data refresh has started. In ~45 minutes the staging branch of PokeAPI/api-data will be pushed with the new generated data.

The staging branch will be deployed in our staging environment and the entire API will be ready to review.

A Pull Request (master<-staging) will be also created at PokeAPI/api-data and assigned to the PokeAPI Core team to be reviewed. If approved and merged new data will soon be available worldwide at pokeapi.co.

@pokeapi-machine-user

Copy link
Copy Markdown

The updater script has finished its job and has now opened a Pull Request towards PokeAPI/api-data with the updated data.

The Pull Request can be seen deployed in our staging environment when CircleCI deploy will be finished (check the start time of the last build).

@jemarq04

Copy link
Copy Markdown
Member Author

Hey @jemarq04 , thanks for the data. I really cannot review this data but I trust you did a thorough job. I'm merging, if you/(some one else) spot some errors in the coming days feel free to open another PR.

@Naramsim If there’s something I can do to make it easier, let me know. Though, if you’re satisfied with me reviewing each location area like I’d usually do for encounter PRs, I can continue doing that and submit larger chunks. I have all SWSH and gifts/trade available aside from the wild areas. I can get that up later today if you’d like.

The wild areas will take a bit longer, since each area has 9-10 sets of encounters for the weather conditions for each method, plus a duplicate of all of those for post-game when the wild level is 60. So each area would be larger than this PR for example. I have a helper script that makes it straightforward to enter, but it takes some time to check.

@jemarq04 jemarq04 deleted the feat/add-part-sword-shield-encounters branch June 17, 2026 15:32
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.

3 participants