BazValueCompareCondition
A custom condition that compares any two values in your game using > >= = <= < !=. A value can be a database cell, an object or project variable, an object or project switch, or a typed constant. Think of it as AGMaker’s native Switch/Variable Changed condition plus the one source it never had: your User Database.
It came out of a community request: checking an item or equipment quantity in real time across a lot of objects, without faking it with one project variable per item. Now a single condition reads the database directly.
To help support my work, consider becoming a patron. ![]()
DOWNLOAD:
BazValueCompareCondition.gd (13.1 KB)
Requirements
AGMaker 1.3.0+
Installation
- Download
BazValueCompareCondition.gd(attached below). - Drop it into your project’s
custom_conditions/folder. If that folder doesn’t exist yet, create it at the project root. A subfolder likecustom_conditions/compare/is fine. - That’s it. It’ll show up in the Add Condition dialog under the Variable / 変数 group. Nothing to enable.
What it does
Takes AGMaker’s Switch/Variable Changed condition and lets it compare any source against any other, including the User Database.
- Compares anything to anything. Both the Left and Right side can be any of: Constant, Object Variable, Project Variable, Object Switch, Project Switch, or Database.
- Reads the User Database. This is the piece the native condition never had. Pick a Database, Record, and Column from dropdowns. No typing IDs.
- Adapts to the value type. Numbers use all six operators with safe float comparison. Text and select values use
=and!=. Switches and bools read as true/false. You never pick a “type.” - Dropdowns everywhere. Databases, records, columns, project variables and switches, and the current object’s own variables and switches are all listed for you, with a free text fallback.
- Self contained and shareable. One file, zero dependencies, safe to hand to anyone.
How to use
Add the condition to a state or transition, then fill in three things: Left → Operator → Right.
Left Source is what to read:
- Database → Database → Record → Column (e.g. database_001 → record1 → column0)
- Project Variable / Project Switch → pick the name
- Object Variable / Object Switch → reads this object’s own value
- Constant → type a number (10) or text (Sword)
Operator is one of > >= = <= < !=.
Right Source is the same set of choices as Left.
Example, a potion count check: Left = Database / database_001 / potions / count, Operator = >=, Right = Constant 3. That’s true whenever the player holds 3 or more potions, across every object that checks it, with no per item variables.
Tips
- Numbers stored as text still work. Database number cells come back as strings, so the condition parses them for you.
"5" >= 3is true. - Constant works for text or numbers.
=against Sword compares text.>= 3compares numbers. Same field. - Object Variable and Object Switch read this object only (the owner). For global values use a Project Variable or the Database.
>and<on text don’t do anything useful. For text and select values, stick to=and!=.
