besteon / Ironmon-Tracker

A Lua script for the Bizhawk/mGBA emulator compatible with Pokemon Fire Red, Leaf Green, Ruby, Sapphire, and Emerald that tracks relevant data for the IronMon challenge.
MIT License
123 stars 44 forks source link

edit log parse pattern strings to be more flexible #356

Closed Aeiiry closed 1 year ago

Aeiiry commented 1 year ago

This was primarily for myself, as I was having issues with the view "view log" fucntion when using the ironmon randomizer https://github.com/something-smart/ironmon-randomizer and/or settings trainers to all be doubles battles for whatever reason. Shouldn't mess up existing logs, but I haven't tested it extensively outside of old logs from the regular randomizer I had lying around.

UTDZac commented 1 year ago

For each pattern you've changed, can you speak to why these changes are necessary and perhaps share examples? When I originally created these patterns, I thoroughly tested them for all the games people typically play for Ironmon.

UTDZac commented 1 year ago

If you have time to test and verify this on a FRLG log and an Emerald log, each from Randomizer 4.6.0 and Randomizer 4.4.0, and verify this works for all four cases, that would be great. I recommend checking through a variety of pokemon with weird names, such as Mr. Mime, Farfetch'd, Nidoran(Male), and checking through the elite four teams.

I have limited time myself and won't be able to verify these changes thoroughly.

Aeiiry commented 1 year ago

I've started doing testing of the games and randomizers above, will update this PR when I'm done.

Aeiiry commented 1 year ago

All changes including my most recent commit tested without encountering any issues. Randomizers tested: PokeRandoZX version 4.6.0 and 4.4.0 [PokeRandoZX ironmon edit version 1.5.0(https://github.com/something-smart/ironmon-randomizer)

Roms tested: Pokemon Emerald Pokemon Firered

Methodology: For each combination of rom and randomizer, and also for "lower case pokemon names" enabled and disabled:

Additionally I tested enabling as many other randomizer settings as I could and doing the same tests above (randomized types, moves, etc)

No issues encountered

UTDZac commented 1 year ago

Thank you for doing some tests. I noticed your change to the PokemonName pattern causes issues with some log files. This change excludes some possibilities. The most important difference I notice is that your pattern excludes the possibility of a ? character, which does show up in some logs for some randomizers and some games. There may exist other differences.

I've attached an example log: RSE Kaizo lower names AutoRandomized.gba.log

PokemonName Pattern change:

Ultimately, your change needs to still include all possible matches the previous pattern included, while also including the adjustments you want to make. The challenge is being careful about assumptions of what the log file looks like, as there exist many other variations of log files that we've stumbled upon that cause issues. Sorry this isn't better documented.

At some point I'll have more time to dig into this more and maybe help find a good solution, but currently out of time to dig into this thoroughly. I've personally not great at patterns, so it often takes me a long time to test all the cases.