Attract-Mode Support Forum

Attract-Mode Support => General => Topic started by: damonxxx on November 22, 2019, 01:38:24 PM

Title: FBneo: Filter all clones and keep hacks like 1942 (C64 Music)
Post by: damonxxx on November 22, 2019, 01:38:24 PM
Hi Everyone,

I am stuck and need some help here...
I want to filter all clones..which works (rule                 CloneOf not_equals .*)...
but also want to keep all hacks...or especially the 1942 (C64 Music) game...

a. Is it possible to add a second rule like Manufacturer not contains Hack simultaneous?
b. Can I exempt a specially named game from all filter rules?
c. ???
For one game it is ok to manually edit the romlist but not very ellegant..haha
Thanx in advance...
 
Title: Re: FBneo: Filter all clones and keep hacks like 1942 (C64 Music)
Post by: progets on November 22, 2019, 03:51:59 PM
a. yes

example
Code: [Select]
rule                 Manufacturer not_contains Hacks
rule                 CloneOf not_equals .*

b. yes

example
Code: [Select]
exception            Name equals 1942
rule                 CloneOf not_equals .*

c. this is not a question
Title: Re: FBneo: Filter all clones and keep hacks like 1942 (C64 Music)
Post by: damonxxx on November 22, 2019, 04:25:44 PM
Many Many Thanx progets!!! -=[HERO MEMBER]=- ;)...this was causing me a headache all week...and have a nice weekend...
Title: Re: FBneo: Filter all clones and keep hacks like 1942 (C64 Music)
Post by: damonxxx on November 22, 2019, 06:14:59 PM
If anyone is interested...end up using this...thank you again for the tip...

exception            Manufacturer contains hack
rule                    CloneOf not_contains .*
Title: Re: FBneo: Filter all clones and keep hacks like 1942 (C64 Music)
Post by: progets on November 22, 2019, 10:40:13 PM
Glad you got it working like you want.

Some other tips to rules include...
- Rules are read in order (from the top down) and once a variable is applied or denied, no following rule will bring it back into the picture. This is why all exception must be applied before any rules that would eliminate them.
- Variables with spaces need to be in quotes (").
- Rules use regex (regular expression) which has its quirks, one of which requires some special characters to be escaped by a backslash (\).
- You can use one rule to define multiple items by using the pipe (|). Example, "exception  Name equals 1942|1943|1944"

If you follow these tips and run into issues, chances are your rule has an issue with regex. A little light reading on regex will go a long way in these cases.
Title: Re: FBneo: Filter all clones and keep hacks like 1942 (C64 Music)
Post by: damonxxx on November 23, 2019, 02:57:21 AM
Dankeschön! Very useful general tips...I have to keep more attention to the order... and "...no following rule will bring it back into the picture"...especially;)