Building objects
Objects are anything portable a player can look at, take, wear, use, eat, drink, or wield. You build them with oedit.
Open the editor
oedit 3050 Open object vnum 3050 (or create if new)
Main menu
-- Item number : [3050]
0) Version : 1
1) Keywords : iron sword
2) S-Desc : an iron sword
3) L-Desc :- A serviceable iron sword has been dropped here.
4) A-Desc :- (description shown when worn or used)
5) Type : WEAPON
6) Extra flags : (none)
7) Wear flags : TAKE WIELD
8) Weight : 10
9) Cost : 250
A) Cost/Day : 12
B) Timer : 0
C) Values : 0 3 8 3 0 0
D) Applies menu
E) Extra descriptions menu: Set.
F) Material : iron
H) Adm Level : 0
M) Min Level : 5
N) Max Level : 0
P) Perm Affects: (none)
O) Obj Spells : None
S) Script : Not Set.
T) Spec procs : Not Set.
W) Copy object
X) Delete object
Q) Quit
Keywords / S-Desc / L-Desc / A-Desc
Same conventions as mob descriptions:
- Keywords: space-separated; what players type. Include synonyms.
- Short desc: appears in inventory, in act() text. Article-prefixed and lowercase (“a long sword”). No period.
- Long desc: room line — what the player sees lying on the ground. End with period.
- Action desc: shown when worn (for armor/jewelry) or used (for devices/scrolls). Multi-line OK.
Item types (5)
The single most important field. Type determines what Values mean and what player commands work.
| Type | Player can | val0 | val1 | val2 | val3 | val4 |
|---|---|---|---|---|---|---|
LIGHT | wield / wear | — | — | hours (-1 = perm) | — | — |
SCROLL | quaff / recite | level | spell1 | spell2 | spell3 | — |
WAND | use | level | max_charges | current_charges | spell | — |
STAFF | use | level | max_charges | current_charges | spell | — |
WEAPON | wield | — | dice_count | dice_sides | weapon_type | — |
FIREWEAPON | wield (ranged) | — | dice_count | dice_sides | weapon_type | — |
MISSILE | hurl | — | — | — | — | — |
TREASURE | take | — | — | — | — | — |
ARMOR | wear | ac_apply | — | — | — | — |
POTION | quaff | level | spell1 | spell2 | spell3 | — |
WORN | wear | — | — | — | — | — |
OTHER | take | — | — | — | — | — |
TRASH | take (low value) | — | — | — | — | — |
TRAP | (passive) | spell | hit_chance | charges | trap_type | — |
CONTAINER | open / close / look in / put / get | max_weight | flags | key_vnum | corpse_flag | — |
NOTE | read | language | — | — | — | — |
LIQUID_CONTAINER | drink / fill / pour | max | current | liquid_type | poison | — |
KEY | unlock | — | — | — | — | — |
FOOD | eat | hours_filled | — | — | poison | — |
MONEY | take | coin_amount | — | — | — | — |
PEN | write | — | — | — | — | — |
BOAT | enter water_noswim | — | — | — | — | — |
FOUNTAIN | drink from | max | current | liquid_type | poison | — |
SPELLBOOK | study | — | — | — | — | — |
DEVICE | use (with spec proc) | charges | — | — | — | — |
PORTAL | enter | target_room | — | — | — | — |
When in doubt: look at an existing object of the same type and copy its values structure.
Values (C) — example breakdowns
Weapon
0 3 8 3 0 0
^ ^ ^ ^
│ │ │ └── attack type (3 = TYPE_SLASH)
│ │ └──── dice sides (3d8 base damage)
│ └────── dice count
└──────── unused
Common attack types: 0=hit, 1=sting, 2=whip, 3=slash, 4=bite, 5=bludgeon, 6=crush, 7=pound, 8=claw, 9=maul, 10=thrash, 11=pierce, 12=blast. Match the weapon’s appearance.
Container
20 0 -1 0 0 0
^^ ^ ^^ ^
│ │ │ └── corpse flag (1 = is corpse)
│ │ └──── key vnum (-1 = no key needed)
│ └────── container flags (closeable, closed, locked)
└────────── max weight (kg)
Light
0 0 24 0 0 0
^ ^ ^^
│ │ └── hours of light (-1 = permanent, 0 = burnt out)
│ └──── unused
└────── unused
Liquid container
8 8 14 0 0 0
^ ^ ^^
│ │ └── liquid type (14 = ale, look up the table)
│ └──── current contents (0-max)
└────── max contents
Spellbook page
0 0 0 0 0 0 (then via the Spellbook menu G, add spell entries)
Extra flags (6)
| Flag | Meaning |
|---|---|
GLOW | Player sees a soft glow when carried/worn. |
HUM | Faint humming. |
NORENT | Can’t be left at rent. Force-junked at log out. |
NODONATE | Can’t be donated. |
NOINVIS | Can’t be made invisible. |
INVISIBLE | Default invisible — need detect_invis to see. |
MAGIC | detect magic picks it up. |
NODROP | Can’t be dropped (cursed). |
BLESS | Counter to NODROP curses and other bless-required gates. |
ANTI_GOOD/NEUTRAL/EVIL | Refuses to be worn by chars of that alignment. |
ANTI_MAGE/CLERIC/THIEF/WARRIOR/JEDI/... | Class-restricted wear. |
NOSELL | Shopkeepers refuse to buy it. |
QUEST | Quest item — special handling. |
UNIQUE | Player can only carry one. |
NORENT_VAULT | Can’t be stored in a vault. |
Wear flags (7)
Where the object can be worn. Always include TAKE if players should be able to pick it up.
| Flag | Slot |
|---|---|
TAKE | Can be picked up / put in inventory. |
FINGER | Ring (max 2). |
NECK | Necklace (max 2). |
BODY | Body armor. |
HEAD | Helmet. |
LEGS | Pants. |
FEET | Boots. |
HANDS | Gloves. |
ARMS | Bracers / sleeves. |
SHIELD | Shield. |
ABOUT | Cloak. |
WAIST | Belt. |
WRIST | Bracelet (max 2). |
WIELD | One-hand weapon. |
HOLD | Off-hand item. |
2H_WIELD | Two-handed weapon (occupies wield + hold). |
FACE | Mask. |
EYES | Glasses. |
EAR | Earrings. |
ANKLE | Anklet. |
BACK | Backpack / quiver. |
Don’t combine WIELD with body slots; don’t combine HOLD with NECK; etc. The engine doesn’t always enforce, but the UX assumes one-slot-per-item.
Applies (D)
When worn, these modify the wearer’s stats. Up to 6 applies per object.
1) APPLY_STR +1
2) APPLY_HITROLL +2
3) APPLY_DAMROLL +1
…
Common APPLY_* targets:
| Apply | Effect |
|---|---|
APPLY_STR/DEX/CON/INT/WIS/CHA | Stat modifier |
APPLY_HITROLL | Attack bonus |
APPLY_DAMROLL | Damage bonus |
APPLY_AC | Armor class (negative is better) |
APPLY_HIT / APPLY_MANA / APPLY_MOVE | Max pool bonus |
APPLY_LEVEL | (rare) effective level bonus |
APPLY_AGE | Age modifier |
APPLY_SAVING_PARA/ROD/PETRI/BREATH/SPELL | Saving throw bonus |
Balance discipline: A +1 sword is interesting; a +12 sword is broken. Compare to existing objects of similar level/cost.
Weight / cost / rent / timer / min level
- Weight (kg). Players have weight caps. Heavy = encumbering.
- Cost is what the object sells for in shops. (Shop multipliers apply on top — see Building shops.)
- Cost/Day is the rent per game day. Cheap rent → players will hoard low-rent items.
- Timer in ticks. 0 = no timer. Use for time-limited items (a glowing rune that fades after N ticks).
- Min level = required level to wear/wield.
0= no minimum. - Max level = max level that can wear (anti-twink).
0= no max. - Adm Level = required admin level (most objects 0).
Extra descriptions (E)
Keyword-triggered look at X text on the object. Same as room extras. Useful for inscribed weapons, runed scrolls, monogrammed jewelry.
keywords: runes inscription
text: The runes glow faintly: "Forged in Khazad-dûm."
Permanent affects (P)
Always-on while worn — adds an AFFECTED_BY bit to the wearer. Examples:
DETECT_INVIS— wearer can see invisible.INVISIBLE— wearer is invisible.INFRAVISION— see in the dark.SANCTUARY— half damage.
Sparingly. SANCTUARY rings make low-tier dungeons trivial.
Object spells (O)
Spells the object casts on wear, or on a use / quaff command. Set the spell number + level. Wand/staff/scroll/potion types implicitly use these via their value slots — O menu is for special cases like cast-on-wear armor.
Spec procs (T)
C-side procs attached to the object. Two families:
- Device procs (
SPEC_TRIG_DEVICE) — fire when the player runsuse <object>. Wands, staves, magical trinkets. - Normal procs (
SPEC_TRIG_NORMAL) — fire on commands typed while carrying/wearing the object. Banking objects, portals, boards.
See the Spec procs reference and the full catalog for the underlying mechanism.
Common object procs
| Proc | run_type | Purpose | Key fields |
|---|---|---|---|
Device_cast_spell | DEVICE | use casts a spell | freq 100, term 0, num1 = spell vnum, num2 = caster level |
Device_purge_object | DEVICE | Object self-destructs after use | freq 100, term 1 (last in chain) |
Device_load_mob | DEVICE | use summons a mob | freq 100, term 0, num1 = mob vnum |
Device_load_object | DEVICE | use loads an object | freq 100, term 0, num1 = obj vnum |
Device_purge_mob | DEVICE | use purges a target mob in room | freq 100, term 0, num1 = mob vnum |
Device_kill | DEVICE | use damages the wielder or target | freq 100, term 0, num1 = damage |
Device_echo | DEVICE | use echoes a message | freq 100, term 0, num1 = message id |
Device_unlock_door | DEVICE | use unlocks a specific door | freq 100, term 0, num1 = room vnum, num2 = direction |
Device_toggle_door | DEVICE | use opens/closes a door | freq 100, term 0, num1 = room vnum, num2 = direction |
Device_adjust_align | DEVICE | use shifts the user’s alignment | freq 100, term 0, num1 = delta (-1000 to +1000) |
Device_do_damage | DEVICE | use damages the user (cursed item) | freq 100, term 0, num1 = dam, num2 = type |
Banking | NORMAL | Carry/wear → balance/deposit/withdraw work | freq 100, term 1 |
Send_money | NORMAL | Money-transfer device | freq 100, term 1 |
ATM | NORMAL | Banking ATM variant | freq 100, term 1 |
Gateway | NORMAL | Portal object — enter <obj> teleports | freq 100, term 1, num1 = target room |
Board | NORMAL | Bulletin board — read/write/remove | freq 100, term 1, num1 = board id |
Item_modify_damage | COMBAT | Adjusts damage when wielded | freq 100, term 0, num1 = modifier |
Item_perfect_damage | COMBAT | Flat damage on hit | freq 100, term 0, num1 = fixed dam |
Attach flow
oedit <vnum>
T open spec proc menu
N insert new
<pick proc by number>
<set freq> usually 100
<set run_type> leave 0 to use registry default
<set term> 1 for single-shot or terminator; 0 for stacking
<set num1..num5> per the proc
<set internal> for COMBAT procs: resist_types[] index
Q → y
The Type field (5 in the main menu) should usually be DEVICE (16) when you attach a Device_* proc — that’s what makes use <obj> route to the spec.
Worked examples
Example 1 — Wand of fireball with charges
A wand that casts fireball on each use and disappears when charges hit 0.
oedit 3050
5 → 14 (WAND)
C → values: 1=charges (e.g. 5), 0=level (e.g. 10), other=0
T → N → Device_cast_spell
freq 100, term 0
num1 = SPELL_FIREBALL vnum (look up in `spedit list` or constants)
num2 = 10 (caster level for the cast)
T → N → Device_purge_object
freq 100, term 1
Q → y
Device_cast_spell handles the cast on use. Device_purge_object runs after, and (when its internal logic detects 0 charges remaining) destroys the wand. Most trees use the wand’s val[1]/val[2] charge tracking — the Device_cast_spell decrements automatically.
Example 2 — A portable bank
An abacus that lets the holder bank from anywhere.
oedit 4001 (an oaken abacus)
5 → 21 (OTHER)
7 → TAKE HOLD
T → N → Banking
freq 100, term 1, num1..5 = 0
Q → y
Holding the abacus, players can type balance/deposit 100/withdraw 50 and the proc handles it.
Example 3 — A teleporter portal
A doorway object that players enter to teleport.
oedit 5001 (a shimmering portal)
5 → 26 (PORTAL)
7 → (no TAKE — fixed to the room)
T → N → Gateway
freq 100, term 1
num1 = 3001 (destination room vnum)
Q → y
When a player enters the portal, the Gateway proc moves them to room 3001.
Example 4 — A scroll that summons a guardian mob
A one-shot scroll that summons a guardian when read.
oedit 6001 (a tattered summoning scroll)
5 → 2 (SCROLL)
T → N → Device_load_mob
freq 100, term 0
num1 = 6050 (the guardian's mob vnum)
T → N → Device_purge_object
freq 100, term 1
Q → y
The scroll loads the guardian, then self-destructs.
Example 5 — A cursed amulet
An amulet that damages the wearer on use.
oedit 7001 (a wraithbound amulet)
5 → 9 (ARMOR)
7 → TAKE NECK
6 → NODROP (cursed — can't be removed without remove curse)
T → N → Device_do_damage
freq 100, term 1
num1 = 30 (30 hp per use attempt)
num2 = 4 (resist_types[4] = Electric, for example)
Q → y
Example 6 — A magic key that unlocks a specific door
oedit 4500 (a brass key)
5 → 18 (KEY) — note: also works as ITEM_OTHER if you want use-to-unlock semantics
T → N → Device_unlock_door
freq 100, term 1
num1 = 3045 (the room with the door)
num2 = 0 (direction NORTH = 0)
Q → y
Example 7 — A bulletin board
oedit 3800 (a bulletin board)
5 → 21 (OTHER)
7 → (no TAKE — fixed to the room)
T → N → Board
freq 100, term 1
num1 = 1 (board id — pairs with the boards table)
Q → y
Players can read 1, read note, write, remove <n> to interact.
Example 8 — A weapon with combat damage modifier
A flaming sword that adds fire damage on hit.
oedit 8500 (a flaming sword)
5 → 5 (WEAPON)
C → values: dice 2d8, type slash, etc.
7 → TAKE WIELD
6 → GLOW (so the player sees it's magical)
T → N → Item_modify_damage
freq 100, term 0
num1 = 8 (+8 damage per hit)
internal = 2 (resist_types[2] = Fire — routed through fire resist)
Q → y
Combat procs on weapons fire per hit. Set internal to the resist type so the bonus damage routes through the correct resistance check (a fire-resistant mob takes less of the bonus).
Device proc semantics
When use <obj> is typed:
- Engine walks the player’s inventory + equipment for objects with DEVICE-type procs.
- For each matching object, runs the proc (with the typed argument as the target).
- Procs run in order until one terminates the chain (
term=1) or returns success.
A typical wand layout — Device_cast_spell (term=0) followed by Device_purge_object (term=1) — means: cast the spell, then check destruction. The destruction proc only runs after the spell proc, because they’re in order.
When to use a trigger instead
For object behavior that needs custom logic, dialogue, or quest checks — use an object trigger. Spec procs are right for:
- Standard device patterns (use → cast/load/unlock/damage) where the proc already exists.
- Banking, portal, board patterns where the named proc handles the full interaction.
- Combat damage modifiers that need to participate in the resist pipeline natively.
Triggers are right for:
- “On wear, check player class and refuse if wrong class” — OTRIG_WEAR.
- “On get, fire a flavor message and grant a temporary affect” — OTRIG_GET.
- “When the player types X while holding this, respond Y” — OTRIG_COMMAND.
Reading existing procs
To copy a working setup from another object:
stat obj <known-good-vnum>
oedit <known-good-vnum> → T → E (examine each line)
Q (exit without saving)
Then replicate the values on your new object.
Scripts (S)
DG triggers attached by vnum. Object triggers fire on get/drop/give/wear/remove/use/cast/etc. See Triggers.
Save + test
Q → y saves.
load obj 3050 Spawn the object next to you
stat obj 3050 View its prototype
wear sword Test wearing it
remove sword
oset 3050 weight 5 Tweak the live instance
Test that:
- Wear/remove works on the right slot
- Applies fire on wear (check your stats before/after)
- Permanent affects apply
- Min level + alignment + class restrictions actually block
- Scripts fire (if attached)
- Spell-cast objects do what their values say
- Timer ticks down (if set)
Balance reminders
- Match level. A level-5 item with +3 hitroll is broken for a level-5 player.
- Don’t stack applies. One stat + one save is plenty per item.
- Watch min level. Wishy-washy min levels create gear churn problems.
- Cost approximates value. A +5 sword at 100 gold is auto-buy bait.
See also
- Building rooms — place your objects via zone reset commands.
- Building zones — equip mobs with your objects.
- Building triggers — scripted item behavior.
- Building assemblies — crafting recipes that produce your object.