unexpectedpanda / retool

Retool: a better filter tool for Redump and No-Intro DAT files.
BSD 3-Clause "New" or "Revised" License
343 stars 22 forks source link

[Feature Request] Specifying regex pattern with priority mapping for a title, then calculate a sum of priorities #315

Closed garygan89 closed 4 months ago

garygan89 commented 4 months ago

Thanks for the v2.02 updates!

I'm currently having an idea to enhance Retool GUI to allow user to specify priority mapping for any regex pattern. A group that has elements matches any of the regex pattern would then be assign a sum of that priorities. See the following examples.

Motivation and Use Case: Due to the naming convension used in the Pinball collection, a Pinball Table might have different variations. In my case, I prefer to choose a table that is from a specific author, has physics enhancement, and on the latest VPX emulator instead of the old VP ones. The way to do this is to determine how many elements of the title matches my criteria, then calculate a sum.

For example: Given a user defined priority mapping of Regex Pattern Priority
\bBAM\b -1
VP5 -10
VPX08 -27
\bUltra\b -10
\bUltimate\b -11

Example group: Aladdin

Example title: Aladdin [VP5] [Ultra] Final priority = -10 + (-10) = -20

Example title: Aladdin [VP5] [Ultimate] [BAM] Final priority = -10 + (-11) + (-1) = -22

Verdict: Aladdin [VP5] [Ultimate] [BAM] would be chosen for the group Aladdin instead of Aladdin [VP5] [Ultra] because it has highest priority.

Current Workaround Currently I wrote a nifty python script that automatically scan a pinball collection set, group and calculate these sums and handle groupings manually. See line 39-70. in https://github.com/dsync89/retool-clonelists-metadata/blob/main/clonelists-generator/gen.py

unexpectedpanda commented 4 months ago

Neat workaround :)

I can see how user-definable promotion/demotion would be useful to expand Retool to a point where it doesn't have to officially support a DAT file, or to encompass deeper user preferences. It might even be useful should I stop supporting Retool and people need a way to update it to handle new No-Intro and Redump DAT files properly.

I am however reluctant to add this level of complexity, and to invite the extra support burden that would come with it.

I can't see this happening in the near future, if at all at this stage, so I'll close this for now.