Closes#3133
not an ideal solution, but the encounter matching API is kinda limited in deferred-invalid vs deferred-notIdeal.
probably need to unify the match logic and generators so they can cache one secondary-check invalid
See the EncounterSlotDumper with the memoization logic & json tree listing.
Simplifies things a lot, and improves checking speed. Unreachable trees are now treated the same as no-trees maps.
ez 1.5KB reduction in file size :P
Remove gen3 egg location hashset; only paths that reach it are for hatched eggs or current breed-eggs. Check breed eggs with the singular met location.
Simplify some logic flow
This only matches the weather table with the Pokemon and does not fully
account for whether a location can spawn a particular weather.
Additional minor changes:
- Adds ScriptedNoMarks to Regis and Glimwood Tangle static encounters
- Corrects a few version-specific Pokemon such as Ludicolo/Shiftry
- Removes erroneous encounters such as Milotic in East/West Lake Axewell
- Removes an unused Motostoke Stadium encounter
Retain a stringbuilder to mutate the string rather than finalizing temporary strings
yields some speed improvements (less gen0 string objects allocated)
Closes#2954 ; can set directly from propertygrid already, but might as well clean things up a little bit to match the disassembly logic.
Open the simple editor center parent rather than next-form-position
Strip out unused lines [~ XX]; behaviorially equivalent to empty strings.
Mutate original met list rather than making a copy and moving any changes into it (saves extra allocations)
Change initial loop start to pre-skip iterations not meeting criteria
Manually mark duplicate lines (only 2 exist); no more linq/searching.
Wipe merged location sub-names prior to merging (bounds check optimization, maybe? already accessed, setting should be fine).
Tests still pass :)
Check for negative met location IDs to return empty (fuzzing?)
Change "FRLG" -> "Kanto" as strings are reused
Used lines:
39c3968e5e/Gen1/DumpUtil.cs (L5)
table.Where(z => z != 0).Select(z => lines[z]).Distinct()
The only two that had FRLG are now showing "Kanto"
don't use FIPS compliant hashing methods explicitly, no real reason to. hash.Create() will select managed vs csp depending on the framework/core and reg flags.
add >net46 incremental hash logic for swsh
remove static sha256 instance (single threaded overkill)
Further improvements can be made if there's a way to have a union struct (4 u16s, lumped u64) that has a simple 4bit diagonal mirror operation on it. Can be at least twice as fast.
Benchmarking with optimizations shows about 80-90% of the prior time taken, so at least a 10% speed optimization
Rarely used, was fun to try and optimize a little more.
Eliminate bounds checks by accessing/setting the highest element, and only index twice instead of 6x.
Eliminate u16 casts by leaving as int type (same result)
Eliminate temp value caching and instead directly write to storage. (no more _0123).
End result looks neat too, since the >> 0's removed looks like a diagonal, like the nibble rotation :D
Add xmldoc
Remove linq from memecrypto code (speed lmao)
Hide some methods that shouldn't be called directly
Name variables better for accessor const's