Skip to content

OLC Mobiles

Kit Oliynyk edited this page Nov 2, 2026 · 2 revisions

TL;DR: medit edits a mob prototype. Hit points, damage, mana, armor, hitroll and wealth are not set by hand: the engine derives them at boot from level, tier, race and form, and any value you type is overwritten. What you choose is level, tier, race, flags, descriptions, behaviors and scripts. Shops are edited with shopedit. Use when: you create or change a mob, pick its tier or race, give it a trainer or shop role, or wonder why hitdice and armor have no effect. Source of truth: plug-ins/olc/medit.cpp, src/core/mobindexbody.cpp (deriveNumbers, resolveBody), src/core/mobtiers.cpp, dreamland_world/fight/mob_tiers.json, dreamland_world/commands/fenia/shopedit.xml. Verified: 2026-11-02 against dreamland_code 88da8302, dreamland_world 43880467, dreamland_fenia_public c28874b

Entering the editor

medit <vnum>
medit create <vnum>
medit create next
medit show <vnum>
medit load <vnum>
medit delete <vnum>
edit mobile [...]
Form What it does
medit <vnum> Opens the mob prototype. You need rights on that vnum.
medit create <vnum or next> Opens an empty prototype. It exists only after done. next is the first free mob vnum of the area you stand in.
medit show <vnum> Prints a prototype without opening the editor.
medit load <vnum> Puts a live copy of the mob into your room.
medit delete <vnum> Marks the prototype as deleted (act flag deleted) and the area as changed. It stays in memory until the next boot. asave then leaves it out of the file.

medit works on a copy of the prototype. done copies the edit back, rebuilds the body and numbers (see below), and updates the mobs that already stand in the world: a field is changed on a live mob only if it still has the prototype's old value. cancel drops the edit. See OLC for the general rules.

What is derived and what you set

At boot, and at every done, the engine runs deriveNumbers over the prototype. While fight/mob_tiers.json is loaded (always, in the game) it replaces the authored hit dice, mana dice, damage dice, hitroll, armor and wealth with values computed from:

  • the mob's level,
  • its tier (a row of mob_tiers.json) and optional tier style,
  • the race (hit point and damage multipliers),
  • the form (an armor factor, see Mob-Forms-and-Parts),
  • the mob's class acts (mage, cleric, warrior and others change the multipliers and the set of combat tricks).

So hitdice, manadice, damdice, armor, hitroll and wealth accept your input and show prints it, but the next done or boot discards it. The show screen says so when the numbers are derived. Prototype numbers are rebuilt only at done and at boot. A live mob instance can be patched by a script when you need a one-off value.

Tier also adds the affect sanctuary from elite up and the act warrior from champion up (not for casters), and decides how many combat tricks (off flags) the mob may use. The signature tricks of the race body always stay on.

Tiers

Tier Number Meaning
dummy 10 Training dummy for the onboarding area: almost no hit points, almost no damage, no tricks.
trash 9 Weak filler.
normal 7 Default. A mob with no <tier> is normal.
elite 5 Veteran.
champion 3 Strong solo target.
boss 2 Group-level fight.
legend 1 The strongest, super boss.

tier <name> sets it, tier default clears it. A tier number from 1 to 10 is also accepted, but only the seven above are named. Tiers 4, 6 and 8 are interpolated between their neighbours and are valid, they are not the default. The multipliers (hit points, damage, armor, experience, gold, drops) live in fight/mob_tiers.json and change with balance work, read the file for current values.

tierstyle <style> bends one tier. The styles in the file are fortress (more hit points, less damage), brute (fewer hit points, full damage) and glass (almost no hit points, for a boss that only special damage can hurt). tierstyle none clears it.

Commands

show (or an empty line) prints everything. ? <table> prints a flag table, for example ? act_flags.

Command Meaning
name, uaname, runame Keywords the player types (kill guard). One list of words per language.
short, uashort, rushort Short description, "the city guard". Russian and Ukrainian use the Flexer case form, see Area-Format.
long, ualong, rulong Line shown in the room.
desc, uadesc, rudesc Text shown by look <mob>.
smell, uasmell, rusmell Text shown by smell <mob>.
level <1-120> Level.
tier, tierstyle See above.
race <name> Race. The race decides the body, see Mob-Forms-and-Parts. race with no argument lists them.
sex <value> ? sex_table.
number s|p Grammatical number, singular or plural.
align <-1000..1000> Alignment.
group <number> Group number.
act <flags> Act flags, toggled. ? act_flags.
oaff <flags> Affect bits, toggled (? affect_flags).
affects <skills> Permanent affects by skill name.
noaffects <skills> Affects of the race to drop.
detection <flags> Detection bits (? detect_flags).
imm, res, vuln <flags> Immunities, resistances, vulnerabilities.
off <flags> Combat tricks (? off_flags).
form <flags>, part <flags> Body forms and parts, toggled.
size <size> Size, overriding the race size.
material <name> Material the body is made of (? material).
damtype <type> Type of the mob's blows (? weapon_flags).
position start|default <position> Starting and normal position.
spec <name> Legacy special function (? spec). spec clear removes it.
professions <classes> Professions (classes) of the mob.
practicer <groups> Skill groups the mob teaches. ? practicer.
religion <gods> Religion of the mob (reledit list).
clan <name> Clan of the mob.
behaviors <names>, props <behavior> <prop> <value> Attach behaviors and set their properties.
fenia <trigger> Opens the trigger editor, see Fenia-Triggers.
oldbehavior pet|leveladaptivepet|trainer|savedcreature, oldbehavior clear, oldbehavior web Legacy engine behaviors.
reviewed <aff det imm res vuln> Removals (del) on the affect, detection, immunity, resistance and vulnerability sets are ignored until the set is named here.
copy param|desc|behavior <vnum> Copies one group of fields from another mob.
list Rooms where this mob has a reset.
where Rooms where a live copy stands now.
delete <vnum> Marks a prototype as deleted.
hitdice, manadice, damdice, armor, hitroll, wealth Accepted and then overwritten, see above.
shop Prints a pointer to shopedit.
commands, done, cancel, dump Editor housekeeping.

Flag commands toggle: type a flag that is set to remove it. Race flags are not repeated on the mob. act, oaff, imm, form, part and the other flag sets store only the difference from the race body (the XML elements are <act add="..." del="..."/>). See Area-Format.

pr means practicer. Type at least profe for professions.

Roles that need extra settings

  • Talking, teaching, selling or serving. The helper .tmp.mob.canSpeak (public Fenia utilities, utils/mob) lets an NPC speak only if its form has sentient or magical. A teacher, shopkeeper, service mob or quest giver of a non-sentient race (a golem, most animals) silently does nothing until you add <form add="sentient"/>, that is form sentient in the editor.
  • Shops. A keeper's whole shop (what it buys, markups, hours, stock) lives in the props of the mob prototype and is edited with shopedit, not medit. See help shopedit in game. Do not keep medit open on the same keeper: its done writes its own copy of the props back over yours.
  • Flying races. A mob whose race or form has wings (the wings part gives the flying affect) cannot be grounded by oaff or affects. Design around it.
  • Training dummies. Tier dummy is for onboarding mobs only.

Mobs that persist

The server saves the mobs standing in each room (all non-charmed NPCs) to a file per room when the room changes, and reloads that file at boot. A mob that is reloaded from its saved copy keeps its saved inventory and can keep other saved state. So:

  • A new give reset for a shopkeeper that was already saved does not reach the saved copy, because resets do not run again for a mob restored from the file.
  • Removing the mob reset of such a mob does not remove it from the world.
  • A prototype change (for example the sex) may not reach the saved instance.

For the first and third case, purge the live mob and load a fresh one (purge, then medit load) or patch the instance by script. To remove such a mob for good, an administrator must also take it out of the saved room file.

See also: OLC, OLC-Resets, Mob-Forms-and-Parts, Area-Format, Fenia-Behaviors.

Clone this wiki locally