kwsch / pkNX

Pokémon (Nintendo Switch) ROM Editor & Randomizer
https://projectpokemon.org/home/forums/topic/48647-pknx-nintendo-switch-rom-editor-randomizer/
GNU General Public License v3.0
339 stars 106 forks source link

Add wander tolerance to encounter slot pkl creation #301

Closed kwsch closed 1 year ago

kwsch commented 1 year ago

Encounters are not bound to the point spawners they are created by, and can naturally wander/projectile themselves a little.

Adds a tolerance of 30f to each xyz direction to indicate if a spawn can be inside a given Map Location ID. Also exports the time of day an encounter is allowed (bitflags to blacklist time, so that it sorts an 'all day' slot before a 'time restricted' slot).

Higher values of tolerance are possible, but aren't great to permit everything to wander everywhere. Aggressive Pokémon can be lured a large distance, so we need a decent amount. I lured a Dragonite from where it spawned, multiple eyecatch cycles, and 27f did not recognize it as legal. Anything higher requires excessive abuse, similar to pushing encounters in PLA.

Also swaps Crabrawler's evolution order, to prefer the more permissive evolution type. Classes have been split out into separate files.