Skip to content

Conditions

Conditions are logical expressions that can be applied to quests, mob reactions, room actions, and room checks. Each condition consists of a condition name followed by zero or more arguments.

A condition evaluates the actor that triggered the gated behavior. For a room action, for example, the actor is the player who executed the action.

The same text can mean something different in each system because the actor changes:

Condition field Actor evaluated
Room or item action The player who entered the custom action
Room check The character attempting to enter or leave
Quest availability, completion, or learning requirement The player whose progress is being checked
Custom-skill Requires The character casting the skill
Mob reaction Usually the character that caused the event; mob-state events evaluate the reacting mob. See Mob reactions.
Loader The world itself; use world-fact conditions here

Conditions that need character state—such as level, item_in_inv, or marked—do not belong on a loader because there is no player actor. fact_check and fact_above work across player-facing contexts as well as loaders because the actor can resolve its world’s facts.

When a field has no actor that supports a particular condition, it does not become a global search for a matching character. Choose a condition that fits that field’s context.

Syntax: archetype <archetype>

Returns true when the actor has the specified archetype.

Require a Mage
archetype mage

Syntax: core_faction <faction_code>

Returns true when the actor’s core faction has the specified code.

Require an Orc
core_faction orc

Syntax: currency <code> <amount>

Returns true when the actor has at least the specified amount of a custom currency.

Require 100 platinum
currency platinum 100

Syntax: fact_check <fact> <value>

Returns true when the specified world fact is set to the specified value.

Syntax: fact_above <fact> <value>

Returns true when the specified world fact is greater than the given value.

Syntax: gender <gender>

Returns true when the actor has the designated gender.

Require a male actor
gender male

Syntax: gold <amount>

Returns true when the actor has at least the specified amount of gold.

Require 100 gold
gold 100

Syntax: has_shield

Returns true when the actor has a shield equipped.

Syntax: has_weapon

Returns true when the actor has any weapon equipped.

Syntax: health <percentage>

Returns true when the actor’s current health is at least the specified percentage of their maximum health.

Require at least 50% health
health 50

Syntax: in_combat [target]

Returns true when the actor is in combat. Supply a target to require combat against a specific character.

in_combat
in_combat tiger

Syntax: is_following

Returns true when the actor is currently following another character for movement.

Allow only a character who is following someone
is_following

Syntax: is_mob

Returns true when the actor is a mob.

Syntax: item_in_eq <template_id>

Returns true when the actor has an item from the specified template equipped.

Require an equipped item from template 1
item_in_eq 1

Syntax: item_in_inv <template_id> [quantity]

Returns true when the actor has an item from the specified template in their inventory. Supply a quantity to require multiple copies.

item_in_inv 1
item_in_inv 1 2

These examples require one or two items from template 1, respectively.

Syntax: item_in_room <template_id> [quantity]

Returns true when the actor’s room contains an item from the specified template. Supply a quantity to require multiple copies.

item_in_room 1
item_in_room 1 2

These examples require one or two items from template 1 in the room, respectively.

Syntax: level <level>

Returns true when the actor is at or above the specified level.

Syntax: marked <mark> [value]

Returns true when the actor has the named mark. If a value is supplied, the stored mark value must also match.

  • marked beta requires the beta mark with any value.
  • marked beta on requires the beta mark to be set to on.
  • not marked beta requires the mark to be absent.
  • not marked beta on is true when the mark is absent or is set to another value.

Syntax: mark_above <mark> <value>

Returns true when the actor has a mark whose value is greater than the given value.

Require access level greater than 2
mark_above access_level 2

Syntax: name <name>

Returns true when the actor has the given name.

Require an actor named Joe
name joe

Syntax: medals <amount>

Returns true when the actor has at least the specified number of medals.

Require three medals
medals 3

Syntax: mob_in_room <template_id> [quantity]

Returns true when the actor’s room contains a mob from the specified template. Supply a quantity to require multiple mobs.

mob_in_room 1
mob_in_room 1 2

These examples require one or two mobs from template 1 in the room, respectively.

Syntax: player_in_room

Returns true when a player is in the room.

Syntax: quest_complete <quest_id>

Returns true when the actor has completed the specified quest.

Require completion of quest 1
quest_complete 1

Syntax: standing <faction_code> <standing>

Returns true when the actor’s standing with the specified faction is at least the given value.

Require 100 Templar standing
standing templar 100

Syntax: wields_weapon_type <weapon_type>

Returns true when the actor is wielding the designated weapon type.

Require a dagger
wields_weapon_type dagger

Combine conditions into logical expressions with and, or, not, and parentheses.

For example, the following expression limits a room action to Mages and Clerics who are at least level 10:

level 10 and (archetype mage or archetype cleric)