This script works in T2 (TMA) only. In TG and T1 (TDP), which do not support optional objectives, it only writes an error to the monolog.
The standard VictoryCheck
script does not support objectives that are both optional and reverse; it incorrectly marks these as failed instead of completed if they are incomplete at the end of a mission. KDOptionalReverse
works around this behavior to allow optional reverse objectives to exist. For each desired optional reverse objective:
goal_state_X
) are being used, remember that they should be configured to set the opposite of the intended state: for a breach, set to 1
(complete) instead of 3
(failed).goal_negation_X
whose value is the number of the “real” objective. For example, if the “real” objective is #3 and the invisible objective is #6, there should be a goal_negation_6
quest variable whose value is 3
.This script should be placed on a fnord other than the starting point. At Sim
, it will look for each objective with a goal_negation_X
set and begin monitoring its state. Whenever the state of the invisible objective changes, the state of the “real” objective will be updated per the table below. At the end of the mission, this translation will happen again to correct any changes by VictoryCheck
.
Mission stage | Invisible objective | “Real” objective | Notes |
---|---|---|---|
during mission | 0 (incomplete) | 0 (incomplete) | — |
end of mission | 0 (incomplete) | 1 (complete) | The conditions were never met, so the objective is complete. |
any | 1 (complete) | 2 (cancelled) | The conditions were met, so the objective was breached. |
2 (cancelled) | 2 (cancelled) | Something (not VictoryCheck ) has cancelled the objective. | |
3 (failed) | 3 (failed) | Like any optional objective, the invisible objective should never reach a state of 3 (failed), or else the mission will fail. |