Controls what operation should be used for the condition.
Unknown. Seems to always be 2 in vanilla Elden Ring. 3
seems to make the condition always false.
If the condition is true, the state at this index will be checked next. If this index is -1, the effect will terminate instead.
Controls what type of value the operand to the left of the operator should be.
This does different things depending on the
leftOperandType:
| Operand type | Value description |
|---|---|
| Literal | The value is the operand's value. |
| External | The value refers to an external value to use as the operand's value. |
| UnkMinus2 | The value is ignored and should be null. |
| StateTime | The value is ignored and should be null. |
Controls what type of value the operand to the right of the operator should be.
This does different things depending on the
rightOperandType:
| Operand type | Value description |
|---|---|
| Literal | The value is the operand's value. |
| External | The value refers to an external value to use as the operand's value. |
| UnkMinus2 | The value is ignored and should be null. |
| StateTime | The value is ignored and should be null. |
Controls what type of value the operand to the left of the operator should be.
This does different things depending on the
leftOperandType:
| Operand type | Value description |
|---|---|
| Literal | The value is the operand's value. |
| External | The value refers to an external value to use as the operand's value. |
| UnkMinus2 | The value is ignored and should be null. |
| StateTime | The value is ignored and should be null. |
Controls what operation should be used for the condition.
Controls what type of value the operand to the right of the operator should be.
This does different things depending on the
rightOperandType:
| Operand type | Value description |
|---|---|
| Literal | The value is the operand's value. |
| External | The value refers to an external value to use as the operand's value. |
| UnkMinus2 | The value is ignored and should be null. |
| StateTime | The value is ignored and should be null. |
If the condition is true, the state at this index will be checked next. If this index is -1, the effect will terminate instead.
Unknown. Seems to always be 2 in vanilla Elden Ring. 3
seems to make the condition always false.
The GreaterThanOrEqual and GreaterThan operators are not valid operators in the FXR format. This method returns an equivalent condition that is valid.
Swaps the operands and changes the operator to match if the left operand is a literal value and the right operand is a non-literal value. This makes it a bit easier to read the expression, but doesn't affect functionality.
StaticfromParses a logical expression in a string and creates a StateCondition from it.
A string with a logical expression and optionally a
then statement with a state index.
expression = <operand> <operator> <operand> then <stateIndex>
operand = <number> | External(<integer>) | StateTime | UnkMinus2
operator = == | != | < | <= | > | >=
stateIndex = <positive integer> | -1 | terminate
External, StateTime, and UnkMinus2 are all case-insensitive and have
shorter variations available. Here are some examples:
ext(0)
stateTime
time
minus2
ext(0) >= 1 then -1
time > 5 then 2
1 != External(10000) then terminate
A new StateCondition based on the expression.
A condition for a state. If the condition is true, the state that the condition leads to will activate.