Closed Magentanide closed 2 months ago
Updated with a revised dumper that prints a transposed table (compared to the image above). Should be much easier to make modifications in the future.
Unfortunately, it looks like something is wrong with the revisions. The application now crashes outright when attempting to dump encounter tables.
Problem
When using the Dump function to export Generation 7 encounter tables as text, the resulting text file is modified such that it no longer actually matches the text file. This is because each row has duplicate Pokémon collated together and their encounter rates added together, then sorted by encounter chance. This merging is destructive and useless. Pokémon call their SOS slots at rates independent of their base encounter rate, and by sorting like this it becomes impossible to reproduce the original tables because columns become misaligned.
For example,![image](https://github.com/kwsch/pk3DS/assets/32601565/7c88318f-ff8d-4c22-bb54-515a08601e3f)
In Solt 1, Fletchling could have either Fletchinder or another Fletchling as its 1st SOS slot. The number of unique species that can be in this slot is greater than the number of unique base encounters. In Slot 5, Cubone or Kangaskhan are capable of SOS calling for Kangaskhan. The number of unique species is fewer than the number of unique base encounters. In this example, neither of these slots are reproducible from the output:
Potential Solutions
Strictly write SOS slots to fall in the same column as their respective base encounters. Base encounter chance should not be included in SOS Slots for that encounter; it is irrelevant and misleading. Encounters should not be collated or ordered by their encounter chance.
These changes allow encounter tables and their full SOS slots to be reconstructed perfectly from a text dump.