Attract-Mode Support Forum

Attract-Mode Support => General => Topic started by: qqplayer on January 20, 2019, 01:29:36 PM

Title: How to add filter rule [a]
Post by: qqplayer on January 20, 2019, 01:29:36 PM
I have some "duplicated" names containing "[a]" ,  "[a2]" , "" ...

Tried:

Code: [Select]
|[a2]|[a3]|[t]
rule                 Name not_contains "[h CEZ]"
rule                 Name not_contains "[h MSX Games bOX]"
rule                 Name not_contains "[cr King Soft]"

But doesnt work.
How can I filter this names?
Title: Re: How to add filter rule [a]
Post by: progets on January 20, 2019, 01:58:14 PM
[ & ] are special characters and must be escaped by a \.

Code: [Select]
rule                 Name not_contains \[a\]
rule                 Name not_contains \[a2\]
Title: Re: How to add filter rule [a]
Post by: qqplayer on January 21, 2019, 05:18:07 AM
Thanks, now is working.
Title: Re: How to add filter rule [a]
Post by: progets on January 24, 2019, 12:42:10 AM
FWIW - You can also combine these into a single rule like this
Code: [Select]
rule                 Name not_contains \[a\]|\[a2\]
Title: Re: How to add filter rule [a]
Post by: qqplayer on January 26, 2019, 04:19:23 AM
Thanks again.
What about names like this?

Quote
Afteroids (1988)(Zigurat Software)(ES)

I want to include '(ES)' games only on a filter.
Title: Re: How to add filter rule [a]
Post by: progets on January 26, 2019, 08:27:59 AM
The same character escaping is needed do to the ( & ).

Code: [Select]
rule                 Name contains \(ES\)
Title: Re: How to add filter rule [a]
Post by: qqplayer on January 26, 2019, 09:06:22 AM
Ok , final question, can I make a filter like 'rompath contains...'?
Thanks.
Title: Re: How to add filter rule [a]
Post by: progets on January 26, 2019, 12:43:45 PM
Not directly as far as I know. There isn't any filtering file used that contains the rompath information. You can still accomplish this but it will take some creativity and a little more work. If you explained your use of this I might be able to provide a solution. A few possibilities might be...

- populate and use the "Extra" field of the romlist (this could be done manually, with a script or with a spreadsheet app)

- use separate "Emulator" names for each path needed and then use the builtin feature to combine the two romlists into one (now you can directly filter on the "Emulator" field since each will have a unique name for the rompath needed)

- create and use tagging for the roms using the specific path and then create your filter based on the tags
Title: Re: How to add filter rule [a]
Post by: qqplayer on February 02, 2019, 02:18:29 PM
Ill keeptrying, thanks for the suggestions.

Tried this , but failed.

Code: [Select]
filter               NEC
rule                 Name contains NEC
rule                 Name not_equals "NEC PC Engine-CD (Redump)"

Trying to exclude this emulator fom NEC filter.
Title: Re: How to add filter rule [a]
Post by: progets on February 02, 2019, 02:26:12 PM
Name = Name of the game. I think you want "Emulator". So something like this...
Code: [Select]
filter               NEC
rule                 Emulator contains NEC
rule                 Emulator not_equals "NEC PC Engine-CD \(Redump\)"