Skip to main content

DefaultIfNull

This formula allows you to conditionally return a default value if another one is null.

Returns

T | S

JSON Format

{
"type": "defaultIfNull",
"components": ...,
"default_components": ...
}

RPG Script

This component can be written in RPG Script as:

a ?? b

Fields

FieldTypeRequiredDescription
componentsStatFormulaComponentThe formula for the main value. If this formula returns a non-null value, the DefaultIfNull formula will return that value.
@type T
default_componentsStatFormulaComponentThe formula for the default value to return in case the one in components returns a null value.
@type S