Workshop.codes
Create

Comparisons and truth Last updated January 24, 2026

Truth-tables

The tables below detail the interactions between several values of varying datatypes when comparing using the available operators in Workshop (==, >, <=, etc.).
Each cell is the result of running the comparison (row) (operator) (column) (e.g. True == Positive Number, row on the left-hand and column on the right-hand of the comparison). A ✅ means the comparison returns true, whereas a ❌ means the comparison returns false.

[See tables](https://workshop.codes/wiki/articles/comparisons-and-truth)
Equals
==TrueFalseNullZeroPositive numberNegative numberNull EntityUninitialized VariableHero of unspawned playerZero length Custom StringWhitespace CustomStringFilled CustomStringEmpty ArrayFilled ArrayFirst element of Empty ArrayNon-null EntityZeroes VectorFilled Vector
True
False
Null
Zero
Positive number
Negative number
Null Entity
Uninitialized Variable
Hero of unspawned player
Zero length Custom String
Whitespace CustomString
Filled CustomString
Empty Array
Filled Array
First element of Empty Array
Non-null Entity
Zeroes Vector
Filled Vector
Greater than
>TrueFalseNullZeroPositive numberNegative numberNull EntityUninitialized VariableHero of unspawned playerZero length Custom StringWhitespace CustomStringFilled CustomStringEmpty ArrayFilled ArrayFirst element of Empty ArrayNon-null EntityZeroes VectorFilled Vector
True
False
Null
Zero
Positive number
Negative number
Null Entity
Uninitialized Variable
Hero of unspawned player
Zero length Custom String
Whitespace CustomString
Filled CustomString
Empty Array
Filled Array
First element of Empty Array
Non-null Entity
Zeroes Vector
Filled Vector
Less than
<TrueFalseNullZeroPositive numberNegative numberNull EntityUninitialized VariableHero of unspawned playerZero length Custom StringWhitespace CustomStringFilled CustomStringEmpty ArrayFilled ArrayFirst element of Empty ArrayNon-null EntityZeroes VectorFilled Vector
True
False
Null
Zero
Positive number
Negative number
Null Entity
Uninitialized Variable
Hero of unspawned player
Zero length Custom String
Whitespace CustomString
Filled CustomString
Empty Array
Filled Array
First element of Empty Array
Non-null Entity
Zeroes Vector
Filled Vector
Greater than or equal
>=TrueFalseNullZeroPositive numberNegative numberNull EntityUninitialized VariableHero of unspawned playerZero length Custom StringWhitespace CustomStringFilled CustomStringEmpty ArrayFilled ArrayFirst element of Empty ArrayNon-null EntityZeroes VectorFilled Vector
True
False
Null
Zero
Positive number
Negative number
Null Entity
Uninitialized Variable
Hero of unspawned player
Zero length Custom String
Whitespace CustomString
Filled CustomString
Empty Array
Filled Array
First element of Empty Array
Non-null Entity
Zeroes Vector
Filled Vector
Less than or equal
<=TrueFalseNullZeroPositive numberNegative numberNull EntityUninitialized VariableHero of unspawned playerZero length Custom StringWhitespace CustomStringFilled CustomStringEmpty ArrayFilled ArrayFirst element of Empty ArrayNon-null EntityZeroes VectorFilled Vector
True
False
Null
Zero
Positive number
Negative number
Null Entity
Uninitialized Variable
Hero of unspawned player
Zero length Custom String
Whitespace CustomString
Filled CustomString
Empty Array
Filled Array
First element of Empty Array
Non-null Entity
Zeroes Vector
Filled Vector

Last updated: April 22th 2024 (Patch 2.10.0.0.124591)

How to update the tables above Note: This is currently PC-only.
  1. In Overwatch, go to the Options menu ➡️ Gameplay ➡️ Custom Games - Workshop, and toggle on the option "Enable Workshop Inspector Log File"
    • You can turn it back off after you are done
  2. In Overwatch, create a new lobby and import the code C89J3
    • As a backup, you can compile and import the code from this project in the Workshop.codes Editor
    • By default, this mode generates the truth table for all operations. To disable some operations and make the output easier to navigate, go to Lobby Settings ➡️ Workshop Settings, and toggle the operations you want to generate under Comparisons
  3. Start the game mode and make sure you spawn in
    • If the lobby crashes, try reducing "Comparisons per tick" and/or increasing "Ticks between comparison batches" under Lobby Settings ➡️ Workshop Settings ➡️ Other
  4. Wait for the progress bar to complete, and for any lag spikes to subside
  5. On Windows, navigate to C:\Users\YOUR_USER\Documents\Overwatch\Workshop (where YOUR_USER is your Window's user name), sort files by name in descending order, and open the last log file in a text editor
  6. Remove the beginning "[00:00:nn] " from each line
  7. For each truth table you want to update, search for the delimiters "Start of Results for OPERATION comparisons as an HTML table:", and "End of Results for OPERATION comparisons as an HTML table" (where OPERATION can be Equals, GreaterThan, LessThanOrEqual, etc.), and copy all the HTML text in-between
    1. Optionally, pass the HTML text through a minifier. You can use an online tool like this one
  8. On this page, click on the Edit Article button on the right side
  9. For each truth table you want to update, replace the text in-between the "<!-- Start of generated table -->" and "<!-- End of generated table -->" delimiters of the relevant operator with the HTML text you copied before
  10. Change the "Last updated" text below with the current date and version of the game (found in the Battle.net launcher below the Play button)
  11. Submit your changes and you are done! Thanks for keeping things up to date 🙂

Uses

You might be able to abbreviate your actions by comparing between data types, especially regarding whether a variable is true or false. For example, if you want to check whether or not A is the zero vector, you could write A == TRUE or simply A instead of A != (0, 0, 0).

Workshop.codes