FG Spreadshirt Swag
Page 7 of 23 First ... 5678917 ... Last
  1. #61
    Minty23185Fresh's Avatar
    Join Date
    Dec 2015
    Location
    Goldstone, CA, USA
    Posts
    1,211
    Blog Entries
    29

    Logical Operators for Advanced Filtering

    Announcing a new version of the Field Filters for All Libraries extension (FFAL v0.3.2). The updated extension is available in the first post of this thread.

    Advanced Filtering Mode now supports the "LOGICAL Operators": AND, OR and NOT. The AND operator is not new, it is the default operator in all prior versions of the library editors. For a quick explanation see post 53 of this thread. The two new operators, OR and NOT, can expand or restrict the range of matching records for a given criteria. In the following screenshot each of the logical operators is displayed. (Note the other operators, the "Numeric Operators", are explained in the previous post to this thread.)
    LO1 operators.png

    As with the Equality Operators, to select the desired operation just cycle through them by mouse clicking the logical operator icon. In the screenshot above the AND operator is shown in the left most panel as a white "plus sign". The OR operator is shown in the middle panel, as a white "dot sign" and the NOT operator is shown in the right most panel as a red "minus sign" or "over score". For those familiar with Boolean algebra, the algebra of mathematical logic, one will immediately recognize these symbols. If one compares the AND operation (left panel) to the same operation in Standard Mode one will note the results are the same four records. However, also note the OR operation displays the same results, why? Allow me to mention the NOT operation first and I'll explain. In the right panel, the NOT operation, all records that are NOT of Subtype "Exotic Light Melee" are displayed.

    Now a bit about how the Logical Operators are applied. Each record is individually subjected to all filtering criteria. What this means is, the code steps through each record on its own merit. The first record is subjected to the first criteria, then the second criteria, then the third, etc. If it meets all the criteria, in order, then it is displayed. The second record, then the third, etc. etc. are subjected to the same decision process. This is very different than a "funneling effect" where all records are subject to the first criteria, then the resultant subset of records are subjected to the second criteria, and so on. In the above screenshot, the AND and OR operators operate no differently on the record set since the records haven't been subjected to a prior operation. These logical operators only have real significance when multiple operations are in effect. Here is an example:
    LO2 combined.png

    Working through the panels: In the left most panel, the filter restricts the display of records to those that have an armor class bonus of 4. In the middle panel, I've added a second filter to the armor class bonus field, OR it can be greater than 4. Now there are many more records displayed. A record is displayed if it has an armor class bonus greater than or equal to 4. (An aside: in the prior post to this thread I mentioned that there were no "greater than or equal to" nor "less than or equal to" equality operators. This middle panel show you how to implement the greater than or equal to.) Back to the screenshots. In the right panel, I have added yet another filter. Records are displayed if they have an armor class bonus of 4 OR an armor class bonus greater than 4 AND are of subtype shield.

    The order that the filters are defined is important. Here is an example with very different results for the same filtering criteria, but the filters are in a different order.
    LO3 order.png

    What has happened here is: Records are displayed if they are of subtype shield, and they have and armor class bonus equal to four OR they have and armor class bonus greater than 4. Meaning, anything with an armor class greater than 4. Each application of a criteria stands on its own, then is applied to the previous decisions. ANDs tend to restrict the number of records shown, ORs tend to include more records in the display.

    I'm not sure this is the behavior we really desire. I'd like comments if you don't mind sharing them with me. It's possible, what we really desire is the "funneling effect" mentioned above.

    And now a note about NOT. When the NOT operator (single red minus sign) is used other than in the first filter definition it is ambiguous. In the following screenshot I am attempting to display those weapons with a damage greater than 1d4 but that aren't bludgeoning type weapons. I want piercing, slashing, etc., etc. type weapons.
    LO4 NOTs.png

    In the left most panel, the results displayed are, well, strange. A gallon of ale just doesn't seem like a weapon. This is because the NOT is applied ambiguously. The lua script behind the screen, doing the heavy lifting, needs to know whether to apply the NOT with an AND to the other criteria, or with an OR. Hence two sub operators: the NOT and then AND (red plus sign in the middle panel) and the NOT and then OR operator (red dot in the right panel). When one thinks about what is desired: "a weapon that deals damage greater than 1d4 AND does not do bludgeoning damage" as opposed to "a weapon that deals more than 1d4 damage OR (anything) that doesn't do bludgeoning damage" one sees that the middle panel has the correct filters with the correct operators.

    So why even have the ambiguous, simple NOT operator? It's quick and easy when there is only one operation to be done.
    (BTW, the Type = weapon filter is probably superfluous. Is there anything that does damage besides weapons?)

    In general, I don't expect the Equality Operators and the Logical Operators to see a whole lot of use. But they are there for your enjoyment should you need them.

    Thanks for using the Field Filters for All Libraries extension and please share your thoughts, ideas, criticisms and or problems.
    Last edited by Minty23185Fresh; February 17th, 2018 at 17:33.

  2. #62

    Join Date
    Apr 2008
    Location
    Virginia Beach
    Posts
    3,096
    Minty, I hail your new update, and continue to love this extension. I believe it is worth consideration for merging into the base CoreRPG.

  3. #63
    Erin Righ's Avatar
    Join Date
    May 2016
    Location
    Vernon, BC, Canada
    Posts
    396
    I second, Bidmaron on this. For a guy who doesn't play PF, you sure made a great tool for it

  4. #64
    Hi Minty, looks like the last update is messing with the extension or viceversa
    https://cdn.discordapp.com/attachmen...93/unknown.png

  5. #65
    Minty23185Fresh's Avatar
    Join Date
    Dec 2015
    Location
    Goldstone, CA, USA
    Posts
    1,211
    Blog Entries
    29
    Quote Originally Posted by Salva View Post
    Hi Minty, looks like the last update is messing with the extension or viceversa
    It certainly does look that way. I’ll get to work immediately. Thanks Salva

  6. #66
    Minty23185Fresh's Avatar
    Join Date
    Dec 2015
    Location
    Goldstone, CA, USA
    Posts
    1,211
    Blog Entries
    29
    Quote Originally Posted by Salva View Post
    Hi Minty, looks like the last update is messing with the extension or viceversa
    https://cdn.discordapp.com/attachmen...93/unknown.png
    Salva I can't seem to duplicate the error... Would it be possible for you to tell me what you did to trigger the error(s)? I've opened various libraries: NPCs, Stories, Spells... Navigated to various functions, applying various filters and I can't get it to trigger the error.

    I am using FG v3.5.5 and Filter Filters extension v0.3.2 with no other extensions.
    If you have other extensions loaded, possibly there is an inter-extension conflict. Please let me know what other extensions you're using and I can explore that.


    Untitled.png


    To summarize: please give me a list of extensions you're using plus steps to reproduce the error. Thanks.
    [EDIT] I guess it could be a ruleset thing too. So what ruleset are you using? Your attachment shows 5E. Is that correct?

    [EDIT] I notice, in the console data: "Runtime Notice s'5E'" - that looks like a Debug.console( ) output to me. Again a possible indication another extension involvement.
    Last edited by Minty23185Fresh; July 16th, 2018 at 19:00.

  7. #67
    Im using 3.3.6 in test mode.
    Maybe thats why.
    Do you need more info?
    Thanks

  8. #68
    Minty23185Fresh's Avatar
    Join Date
    Dec 2015
    Location
    Goldstone, CA, USA
    Posts
    1,211
    Blog Entries
    29
    Quote Originally Posted by Salva View Post
    Im using 3.3.6 in test mode.
    Maybe thats why.
    Do you need more info?
    Thanks
    Ahhh. v3.3.6! That’s probably it. Gives me a little lead time. Thanks, I’ll check it out.

    Do I need more? Not yet. Thanks.

  9. #69
    Great extension!

  10. #70
    Minty23185Fresh's Avatar
    Join Date
    Dec 2015
    Location
    Goldstone, CA, USA
    Posts
    1,211
    Blog Entries
    29
    @grisix: Thank you.

    @everybody: Salva reported some errors with the interim test version of v3.3.6. Now that v3.3.6 has been officially released, I'm not seeing those errors. I have a bit more testing to do, and code comparisons, but preliminarily it looks like the current version of this extension (v0.3.2) works fine with FG v3.3.6.

    If you see this to be the contrary, i.e. you're receiving errors with my extension please let me know.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
DICE PACKS BUNDLE

Log in

Log in