Repository navigation
OLC Resets
TL;DR: A room has an ordered list of resets.
resetsedits the list of the room you stand in. Order matters: a mob reset must come before thegiveandequiplines that belong to it, and a container must come before the items that go inside it. Use when: you place mobs and items in a room, give a mob its gear, fill a chest, mark an item as random loot, or need to know why a reset did nothing. Source of truth:plug-ins/olc/resets.cpp(the command),plug-ins/updates/update_areas.cpp(reset_room, reset chances),plug-ins/areas/xmlroom.cpp(XML forms). Verified: 2026-11-02 against dreamland_code a7c4fd10, dreamland_world a35c62ce, dreamland_areas 6a04168
Resets are edited for the room you stand in. You need rights on that room's vnum.
resets
resets <index> mob <vnum> [max in world] [max in room]
resets <index> obj <vnum> <wear location>
resets <index> obj <vnum> inside <container vnum> [limit] [count]
resets <index> obj <vnum> room
resets <number> delete
resets <number> flag <flags>
resets <number> rand normal|rand_stat|rand_all
resets <number> tier <1-5>
resets <number> wear <wear location>
resets search <vnum> [normal|rand_stat|rand_all]
resets search rand_stat|rand_all
resets void
resets with no argument prints the list. Each line starts with its number. Lines for mobs and floor items (M, O) have bright numbers, lines that depend on an earlier line (G, E, P) have dim ones.
| Form | Result |
|---|---|
mob <vnum> [world] [room] |
Adds a mob reset. world is the most copies of this mob that may exist in the world, room the most in this room. Both default to 1. The mob must exist. |
obj <vnum> <wear location> |
Gives the item to the mob of the nearest mob line above. With the wear location none the mob carries it in the inventory (a give line). With any other location the mob wears or wields it (an equip line). ? wearloc lists the locations. |
obj <vnum> inside <container> |
Puts the item into a container. The container must be of type container. limit is the world count above which the chance to create it drops, count is how many of this item the container is filled up to. Default 1 and 1. |
obj <vnum> room |
Puts the item on the floor of the room (a drop line). |
<number> delete |
Removes the line. |
<number> flag <flags> |
Toggles reset flags: always, never (? reset_flags). |
<number> rand <kind> |
Marks a weapon line as random loot, see Random weapons. |
<number> tier <1-5> |
Best weapon tier of a random line. |
<number> wear <location> |
Changes the wear location of a give or equip line. Switching between none and a real slot turns a give into an equip and back. |
search <vnum> |
Finds every room that places that item. Add normal, rand_stat or rand_all to filter. |
void |
Adds a random line, which shuffles the exits of the room at every reset. Only one per room. It shuffles all six exits (minDoor 0, maxDoor 6). |
The <index> of an adding command is the position the new line is inserted at, counted from 0. resets 0 mob 3001 puts the line first. A number larger than the list appends it. The <number> of the other commands is the position shown in the list, counted from 1.
Examples:
resets 99 mob 3010 1 1
resets 99 obj 3011 wield
resets 99 obj 3012 none
resets 99 obj 3013 room
resets 99 obj 3014 inside 3013 5 2
The first line creates the guard. The second puts a sword in its hands, the third a purse in its pack. The fourth puts a chest on the floor, and the fifth fills the chest with items 3014.
When an area resets, every room of the area runs its list from top to bottom.
| Line | Rule |
|---|---|
mob |
Creates the mob unless the world already holds world copies of it (a world value of -1 means no check) or this room already holds room copies. |
give, equip
|
Applies to the mob created by the nearest mob line above. If that line created nothing in this pass (the limits were reached) these lines are skipped. A mob that stands there already gets its missing gear back through a separate check. |
drop |
Creates the item on the floor, unless a copy is already on the floor of this room or the item's global limit is reached. |
put |
Needs the container to be in the room: on the floor, inside another floor container, or carried by a mob in the room. Creates items until the container holds count of the listed vnums. |
random |
Shuffles the exits with door numbers from minDoor up to, but not including, maxDoor. Doors are numbered 0 north, 1 east, 2 south, 3 west, 4 up, 5 down. |
Conditions that apply to a whole room:
- A line with the flag
neveris skipped by the periodic reset. It still runs on a forced reset:aeditreset,redit resetand the first reset at every boot. A line with the flagalwaysis created even while a player is in the area, like every line of adungeonarea. - While a player is in the area, floor items (
drop) and the contents of containers lying on the floor are not created, and lock states of containers are not restored. Areas with thepopularordungeonflag ignore this rule. Mobs are created either way. - A forced reset ignores the player check.
Rules for items that have a global limit (see OLC-Objects):
- Nothing is created when the world already holds that many copies.
- An item carried by a mob or placed in a container is created only while no player is in the area, and then with a 10 percent chance per reset. A forced reset into a container skips the chance.
- Items inside a container whose world count is already at the line's
limitare created with a 25 percent chance.
Every other item is created every time. Goods that a shopkeeper receives through give lines are marked as shop stock.
An area is reset by the periodic area update, every 110 seconds, once the area has aged. A busy area (players present recently) resets when it is empty of players or old enough. An idle area resets after a longer time. Areas with the popular flag come back sooner. The first reset of every area happens at boot. aedit has a reset command, redit reset resets one room (and creates items without chance rolls).
Resets do not move or remove a mob that already stands in the world. A mob that is not in the room any more is not "replaced": the next reset creates a new one if the limits allow.
A weapon line can ask for a generated weapon.
rand value |
Meaning |
|---|---|
normal |
The prototype as written. |
rand_stat |
The weapon keeps its names. Its stats are generated. |
rand_all |
Names and stats are generated. |
tier is the best quality tier the roll may give: 1 is the best, 5 the worst, 3 the default. Setting rand on a line that has no tier sets it to 3. For a mob's wielded weapon, rand also moves the wear location from wield to sheath (and back when you set normal). The page Item-Power explains the tiers.
Each room carries its list in a <resets> element, in order. The line kinds are leaf elements:
| OLC kind | Element | Attributes |
|---|---|---|
| mob | <mob> |
vnum, limit (world), maxHere (room) |
| give | <give> |
vnum |
| equip | <equip> |
vnum, to (wear location name) |
| drop | <drop> |
vnum |
| put | <put> |
vnum (one or several vnums, the item is picked at random), in (container vnum), limit, maxHere
|
| void | <random> |
minDoor, maxDoor
|
Every element may also carry flags, rand and bestTier. See Area-Format.
- A
<put>with several vnums keeps its whole list throughasaveand autosave. Theresetslisting shows the lowest vnum and the others on anor:line.resets search,oedit listand the item search find the line by any of its vnums. - A mob that is saved with its room is restored at boot from the saved copy. A new
giveorequipline will not reach it, and deleting itsmobline will not remove it: OLC-Mobiles. -
givelines of a mob that is not in the list above them do nothing and print "No Previous Mobile" in the list. -
resets <index> obj ... insidefails if the container prototype is not of typecontainer. -
resets voidshuffles all six exits. To shuffle only the four compass exits, setmaxDoor="4"in the area file. - Door state resets (
D) exist in the list format but the XML does not store them, andresetscannot create them.
See also: OLC-Rooms, OLC-Mobiles, OLC-Objects, Item-Power, Area-Format.
Start here
Get running
Contribute
- Contribute
- Contributing Workflow
- Code Style
- Accessibility
- Writing Player Text
- Game Design Principles
Build areas
- Building
- OLC
- OLC Rooms
- OLC Mobiles
- OLC Objects
- OLC Resets
- OLC Line Editor
- OLC Other Editors
- Area Format
- Area Quests
- Mob Forms and Parts
Fenia
- Fenia
- Fenia Language
- Fenia Triggers
- Fenia Gotchas
- Fenia API
- Fenia Scripts
- Fenia Behaviors
- Fenia Skills and Spells
- Fenia Cookbook
- Fenia Grammar
Engine
- Engine Architecture
- Engine Time and Pulses
- Output Format
- Mechanics Combat
- Mechanics World
- Data Configs
- Item Power
Localization
Clients
More