Common Filter Functionality

The filters available for certain BIQ sections, such as Techs and Units, have received a significant boost in capabilities in version 1.27, and an additional boost in 1.28. This page documents their powerful new capabilities that are shared across all filters. In this documentation, the term "specifier" will refer to an individual part of a filter query, such as "cost>20".

Documentation for Specific Sections

To learn about filters available for specific sections of the BIQ, view:

Available Operators

There are two specific and one implicit operator available. These are:

The combination of these can allow complex queries, such as "((class=sea or class=air) attack>7) or (class=land hpBonus>0)".

Order of Operations

The order of operations follows the typical order in boolean logic and programming languages. When there is a tie, left-to-right order is used. Operators are evaluated in the following order:

The "and" example is worth clarifying slightly more - because "and" precedes "or", that query searches for units that require iron, or units that require horses and cost more than 30 shields. If you wanted instead to search for units that require both iron and horses, and cost more than 30 shields, you would have to write "(reqGood=Iron or reqGood=Horses) cost>30".

Greater Than/Less Than/Equals

All filters currently allow searching by the equals (=) operator. Some - generally the numeric ones - also allow searching with less than (<) and greater than (>) operators. These are detailed in the filter's specific documentation.

Negation

Starting in version 1.28, you can also use the != operator, which returns the opposite of what the = operator returns. As an example, "reqGood!=None" returns all items which require a good.

Boolean filters, such as the "draft" filter for units, take either "true" or "false" after the equal sign. For example, "draft=false" returns all units that do not have the draft ability. This is equivalent to "draft!=true", but may be more intuitive.