edge-classic / EDGE-classic

Cross-Platform OpenGL Doom Source Port with powerful modding features
https://edge-classic.github.io
GNU General Public License v3.0
73 stars 13 forks source link

priorities for chosen IWAD #190

Closed andwj closed 2 years ago

andwj commented 2 years ago

This is not a major thing, but I think when searching for an IWAD to load, certain ones should be preferred, in particular DOOM2.WAD since most mods tend to use that IWAD as their base and may fail with DOOM.WAD (etc).

So instead of stopping at the first usable IWAD, give each one a score based on their name and pick the highest score. I suggest "DOOM2" should have the highest score, then maybe "FREEDOOM2" since it is highly compatible with it, then "TNT" and "PLUTONIA", etc...

dashodanger commented 2 years ago

That does make sense; I think I can probably massage the iwad_unique_lumps into a map or somesuch that stores a score value in addition to the lumps it's checking for, or maybe make a struct with both the score and lump array within it and then have an array of such structs.

dashodanger commented 2 years ago

I just pushed https://github.com/dashodanger/EDGE-classic/commit/fb692a15df9061fffbd7d520e0ebd592511c5e48 to test the new system. A summary of the scoring preferences (copied from the CHANGELOG):

andwj commented 2 years ago

Worked like a charm, cheers!

dashodanger commented 2 years ago

Awesome, thanks for checking. I'll go ahead and close it out then.