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.
Know which actor is evaluated
Section titled “Know which actor is evaluated”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.
Condition reference
Section titled “Condition reference”archetype
Section titled “archetype”Syntax: archetype <archetype>
Returns true when the actor has the specified archetype.
archetype magecore_faction
Section titled “core_faction”Syntax: core_faction <faction_code>
Returns true when the actor’s core faction has the specified code.
core_faction orccurrency
Section titled “currency”Syntax: currency <code> <amount>
Returns true when the actor has at least the specified amount of a custom currency.
currency platinum 100fact_check
Section titled “fact_check”Syntax: fact_check <fact> <value>
Returns true when the specified world fact is set to the specified value.
fact_above
Section titled “fact_above”Syntax: fact_above <fact> <value>
Returns true when the specified world fact is greater than the given value.
gender
Section titled “gender”Syntax: gender <gender>
Returns true when the actor has the designated gender.
gender maleSyntax: gold <amount>
Returns true when the actor has at least the specified amount of gold.
gold 100has_shield
Section titled “has_shield”Syntax: has_shield
Returns true when the actor has a shield equipped.
has_weapon
Section titled “has_weapon”Syntax: has_weapon
Returns true when the actor has any weapon equipped.
health
Section titled “health”Syntax: health <percentage>
Returns true when the actor’s current health is at least the specified percentage of their maximum health.
health 50in_combat
Section titled “in_combat”Syntax: in_combat [target]
Returns true when the actor is in combat. Supply a target to require combat against a specific character.
in_combatin_combat tigeris_following
Section titled “is_following”Syntax: is_following
Returns true when the actor is currently following another character for movement.
is_followingis_mob
Section titled “is_mob”Syntax: is_mob
Returns true when the actor is a mob.
item_in_eq
Section titled “item_in_eq”Syntax: item_in_eq <template_id>
Returns true when the actor has an item from the specified template equipped.
item_in_eq 1item_in_inv
Section titled “item_in_inv”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 1item_in_inv 1 2These examples require one or two items from template 1, respectively.
item_in_room
Section titled “item_in_room”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 1item_in_room 1 2These 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.
marked
Section titled “marked”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 betarequires thebetamark with any value.marked beta onrequires thebetamark to be set toon.not marked betarequires the mark to be absent.not marked beta onis true when the mark is absent or is set to another value.
mark_above
Section titled “mark_above”Syntax: mark_above <mark> <value>
Returns true when the actor has a mark whose value is greater than the given value.
mark_above access_level 2Syntax: name <name>
Returns true when the actor has the given name.
name joemedals
Section titled “medals”Syntax: medals <amount>
Returns true when the actor has at least the specified number of medals.
medals 3mob_in_room
Section titled “mob_in_room”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 1mob_in_room 1 2These examples require one or two mobs from template 1 in the room, respectively.
player_in_room
Section titled “player_in_room”Syntax: player_in_room
Returns true when a player is in the room.
quest_complete
Section titled “quest_complete”Syntax: quest_complete <quest_id>
Returns true when the actor has completed the specified quest.
quest_complete 1standing
Section titled “standing”Syntax: standing <faction_code> <standing>
Returns true when the actor’s standing with the specified faction is at least the given value.
standing templar 100wields_weapon_type
Section titled “wields_weapon_type”Syntax: wields_weapon_type <weapon_type>
Returns true when the actor is wielding the designated weapon type.
wields_weapon_type daggerCombining conditions
Section titled “Combining conditions”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)