GuidanceOfGrace / CLASSIC-Fallout4

Crash Log Auto-Scanner & Setup Integrity Checker for Fallout 4 / Buffout 4. Tool that extensively scans Fallout 4 game & mod files and Buffout 4 crash logs, then provides troubleshooting advice depending on what it finds.
8 stars 4 forks source link

loadorder.txt processing inconsistency #14

Closed evildarkarchon closed 1 year ago

evildarkarchon commented 1 year ago

I've noticed an inconsistency with loadorder.txt processing that I can't seem to track down. The most notable differences are that one was from MO2 and the other was from Vortex and also, the working log just had an incomplete plugin section and the non-working one had an empty plugin list. I've attached the logs and load orders I was working with to this report. loadorder working.txt loadorder not working.txt crash-2022-11-25-02-43-50 Grimm.log (not working) crash-2022-11-25-02-09-59 94 Green Men in a trenchcoat.log (working, plugin section was there but incomplete)

GuidanceOfGrace commented 1 year ago

I think I know what the issue is. The script checks: if "[00]" in logtext: And logtext is the entire text in the crash log. But the script should be checking the plugin_list variable.

So to keep it consistent and working as intended, it should be if "[00]" in plugin_list: instead. Since plugin_list is the actual list that the script appends plugins to whether or not loadorder.txt is found.

GuidanceOfGrace commented 1 year ago

Actually, now we have to use if any("[00]" in elem for elem in plugin_list): instead of just if "[00]" in plugin_list: Don't know if there's a better way of finding any specific string in a list besides doing this or converting the whole list to something else and converting it back afterwards. I'll implement this in a hotfix before the Version 6.xx release.

evildarkarchon commented 1 year ago

I couldn't find a better alternative to any(), so that's what I'd go with.