Dynamic Descriptions — Variables
Variables fall into three categories based on where they can be used. See the Lookups page for all enumerated values referenced below.
1. Calculation-only variables
These can be used inside [ ] expressions but cannot be printed
with { }.
| Variable | Description |
|---|---|
time.<TIME> |
True when the mud clock is in the given period. See Time of Day for values. |
race.<RACE> |
True when the observer’s race matches.
E.g. race.elf, race.dragon.
See Race List. |
affect.<AFFECT> |
True when the observer is currently affected.
E.g. affect.blind, affect.flying.
See Affects List. |
2. Display-only variables
These can be printed with { } but cannot be used in calculations.
See String Lookups.
| Variable | Description |
|---|---|
result | The last numeric result computed in a [ ] block. |
name | The short description of the observer (the person looking). |
opponent | The short description of whoever the observer is fighting, or “someone”. |
his/her | Gendered pronoun: his, her, or its. |
his/hers | Gendered possessive: his, hers, or its. |
him/her | Objective pronoun: him, her, or it. |
he/she | Subject pronoun: he, she, or it. |
opponent.his/her | As his/her but for the observer’s opponent. |
opponent.his/hers | As his/hers but for the opponent. |
opponent.him/her | As him/her but for the opponent. |
opponent.he/she | As he/she but for the opponent. |
3. Variables usable in both contexts
These can be either printed ({ }) or used in calculations ([ ]).
The string form and numeric form differ — for example, for a hobbit observer,
{race} prints Hobbit while [{race}]{result}
prints 7.
See String or Number Lookups.
| Variable | Description |
|---|---|
class.<CLASS> | Observer’s class. See Class List. |
dir.<DIRECTION> | Direction matching. See Directions List. |
weather.<CONDITION> | Weather condition. See Weather List. |
position.<POSITION> | Observer’s position. See Positions List. |
tposition.<POSITION> | Target’s position. See Positions List. |
hp | Observer’s current hitpoints. |
max.hp | Observer’s maximum hitpoints. |
mana | Current mana. |
max.mana | Maximum mana. |
move | Current moves. |
max.move | Maximum moves. |
stam | Current stamina. |
max.stam | Maximum stamina. |
gender | Gender string: male, female, or neuter. |
gender.male | True or false. |
gender.female | True or false. |
gender.neuter | True or false. |
race | Observer’s race name, e.g. halfelf, dragon. |
class1 | Primary class. |
class2 | Secondary class. |
language | Language the observer is currently speaking. |
level | Observer’s level. |
dir.from | Direction the observer last traveled (how they entered the room). See Directions List. |
gold | Gold carried by the observer. |
position | Observer’s current position (standing, resting, etc.). |
tposition | Target’s current position. |
save.throw | Saving throw value. |
alignment | Alignment value. |
hit.roll | To-hit roll. |
dam.roll | Damage roll. |
metal | Total metal worn. |
wimpy | Wimpy threshold. |
strength | Strength stat. |
intelligence | Intelligence stat. |
wisdom | Wisdom stat. |
dexterity | Dexterity stat. |
constitution | Constitution stat. |
size | Size value (1–15). See Size List. |
time.hour | Current hour in mud time. |
time.day | Current day of the week in mud time. |
time.month | Current month in mud time. |
percent | Calculates a new percentage and returns it. |
percent.store | The last percentage calculated. |
weather.sky | Current sky condition: cloudless, cloudy, raining, or lightning. See Weather List. |
weather.change | Whether weather is getting better or worse. |
weather.sunlight | Sunlight state: dark, rise (dawn), light, or set (dusk). |
wear.<LOCATION> | Item worn at the given location. String form prints the item’s short description; numeric form is true if something is worn there. See Equipment Locations. |