Maruno
Lead Dev of Pokémon Essentials
- 5,286
- Posts
- 17
- Years
- Seen May 3, 2024
First you need a list of possible swarms. Species, level range, maps to be found on, encounter types to be found via. It's up to you if you want to make it more complicated (e.g. multiple maps/species/encounter types in a single swarm event). You can (should) put all this information in an array in some script section.Anyone have an idea on getting swarms to work? Some examples of this include people calling you in GSC about a rare pokemon in an area or in D/P where Lucas/Dawn's sister will tell you that a swarm of Pokemon have appeared on a route. It changes daily.
I imagine this could be worked out in events but there may be a cleaner way to pull this off.
Next you want a way to decide which swarm to use on a particular day. It should be random yet always the same for a given day. The Lottery mini-game's winning number works like this, so copy it and use it to choose the swarm.
Then you want to change the appropriate wild encounters depending on the swarm's details. I understand there's a flat 40% rate of an encounter being a swarm's encounter (if possible), and 60% chance of a regular encounter, so that's a nice and simple number to work with. Go to the script which decides which species to encounter, get the day's swarm's details, and if the map/encounter method matches and rand(100)<40, set the species and level according to the swarm's details; otherwise pick the encountered species normally.
That's it.
You can enhance this feature by only making it work if a particular switch is on (e.g. the "Got National Dex" one).
Getting someone to tell you about the swarm is a bit of extra work. It's easiest to make an event tell you, because phone calls are a bit trickier to modify (although it is possible). Here, just get the day's swarm's details again, shove the name of the species and the name of the map it's on into variables, and insert those variables into the event's speech. You can get all fancy with this, of course.