<set>
TagThe <set>
tag assigns a permanent key–value pair to the player’s state. This is useful for marking decisions, tracking quest progress, or setting dynamic variables that may influence later logic.
<set flagname [value]>
flagname
— The unique name of the variable or flag to store.value
— The value to associate with that flag. This can include whitespace and does not need to be quoted. The value extends to the closing >
of the tag.value
is omitted entirely, the flag will be stored with a default value of "1"
(a boolean-style marker).<if>
or <mod>
tags.Unlike add_flag
, the <set>
tag stores a named value.
Examples:
<set has_sword yes>
<set dungeon_code 1234>
<set companion_name Marigold the Bold>
<set completed_tutorial>
These can later be retrieved in <if>
comparisons like:
<if flag has_sword eq "yes">...
<if flag dungeon_code eq "1234">...
<if flag completed_tutorial eq "1">...
>
is treated as part of the value.<mod stat flag flagname>
, the stat will be adjusted accordingly.<set>
values.See also: