Selectors - osirisOfGit/BG3_Absolutes_Laboratory GitHub Wiki

General Rules

  • If a selector option has multiple checkboxes, like Race, and none of those checkboxes are selected, Lab will check if the entity is that parent value or is a child of that parent (for example, setting a Humanoid Race Selector will find all Humanoids and all subraces of Humanoid)
  • Selectors are processed in the order defined - groups are formed at each AND/OR Boundary

Walkthrough

The Dry Run button will preview the results of your selectors based on what was indexed by the Entity Scanner in the Inspector.

Let's start with the below:

Myconid Selector - Half

This shows using a Nested query - in DB Query Terms, this might look like:

SELECT *
FROM ENTITIES
WHERE
(
	RACE IS IN ('Blight', 'Myconid', 'Shambling Mound')
	AND (FACTION = 'ACT1_UND_Myconids')
)

if we were to uncheck the Inclusive checkbox from the Race selector (making it Exclusive), this would turn into

...
WHERE
(
	RACE IS NOT IN ('Blight', 'Myconid', 'Shambling Mound')
	AND (FACTION = 'ACT1_UND_Myconids')
)

That checkbox you see next to the Faction is available for any resources that have children inheriting from them. Shift-click on the checkbox to see the hierarchy:

Children of Myconid Faction

For this faction, you can see BroodingMyconid is the only child, so if the checkbox was checked that faction would also be included in the query, turning it into

WHERE
(
	RACE IS NOT IN ('Blight', 'Myconid', 'Shambling Mound')
	AND (FACTION IS IN ('ACT1_UND_Myconids', 'ACT1_UND_Myconids_BroodingMyconid'))
)

Finally, we can add another selector at the same level as the first:

Myconid Full Selector

This adds an AND clause, specifying that entities much match the above criteria AND also have Myconid_Adult_WhiteSpores as a CharacterStat, turning the query into

SELECT *
FROM ENTITIES
WHERE
(
	RACE IS IN ('Blight', 'Myconid', 'Shambling Mound')
	AND (FACTION = 'ACT1_UND_Myconids')
)
AND STAT = 'Myconid_Adult_WhiteSpores`

Choosing OR instead would have the expected effect - either the first or second 'clause' must match for the entity to be selected.

Demo:

bg3_dx11_xzMnI0gxDB.mp4
⚠️ **GitHub.com Fallback** ⚠️