immortal:creationlaw:objects

Creation Law — Objects

You know classic Diku oedit. Neo has no oedit and no @object verb. Object prototypes are built with the three-layer item workspace: description strings → stats blob → item prototype that links them.

Hub: Creation Law. Field/spawn reference once built: Items. Scripts: Script Law — Objects.

Neo mirrors the old Diku split (strings / values / index) as three workspace types:

  • '''item_descr''' — what players read (keywords, short, long, room line)
  • '''item_stats''' — what the engine uses (type, wear, flags, modifiers, values, weight)
  • '''item''' — the prototype that points at a descr VID and a stats VID, plus maximum, proc, reset

You save each layer separately. The prototype does not invent strings or numbers by itself — if you @save item without @item description / @item stats links, you have an empty shell. That is the #1 object-building mistake.

Objects vs items (handbook split): this page is the build walkthrough. Items is the type/flag/spawn/testing reference once the object exists. Same commands; different teaching focus.

Why first: you want readable strings in-game even before combat numbers are perfect.

> @find item
> @new item_descr 3100
Okay.
> @item_descr keywords add sword
Okay.
> @item_descr proper
a tempered shortsword
> @item_descr room
A tempered shortsword lies here.
> @item_descr general
Steel catches the light along a plain fuller.
> @examine item_descr
> @save item_descr
Okay.
>

Fields: action, general, keywords, proper, room. If @new item_descr errors, you still have a descr draft open — @examine item_descr, then @save or @clear.

Why second: type and wear flags decide whether wield / get work when you spawn-test.

> @new item_stats 3100
Okay.
> @item_stats type weapon
Okay.
> @item_stats flags wear take
Okay.
> @item_stats flags wear wield
Okay.
> @item_stats weight 5
Okay.
> @item_stats modifiers add 0 hitroll 1
Okay.
> @examine item_stats
> @save item_stats
Okay.
>

Using the same number (3100) for descr and stats is a clarity convention, not a language requirement — they are still separate rows. Full type/flag/value lists: Items.

Why this layer exists: the live world loads item prototypes; descr/stats are pieces the prototype references.

> @new item 3100
Okay.
> @item description 3100
Okay.
> @item stats 3100
Okay.
> @item maximum 25
Okay.
> @examine item
(confirm description and stats VIDs are set)
> @save item
Okay.
>

Before @save: @examine item must show the description and stats links you intend. Saving without those links is the empty-shell mistake.

@item fields: extras, stats, description, maximum, proc, reset.

> approve item 3100
> create item 3100
You create a tempered shortsword.
> purge sword
>

Prefer create while learning your own range (stricter). load skips range checks — see Items for create vs load and maximum rules. If create refuses you, read the echo: wrong range vs maximum > 1 are different failures.

Create the SpecProc first (@proc item new … / script text), verify with index proc_item, then:

> @load item 3100
Okay.
> @item proc my_sword_proc
Okay.
> @examine item
> @save item
Okay.
>

Attaching a name that does not exist yet leaves you confused at runtime — build proc → attach → save. Details: Script objects. Hard-coded compiled specials use SpecItem on @item_stats attrs, not the free-form proc name.

> @load item 3100
Okay.
> @item description 3100
> @item stats 3100
> @examine item
> @save item
Okay.
>

Caveat: @destroy item_descr fails while an item prototype still references that VID — unlink or destroy the prototype path carefully.

> @new item_descr 4502
… keywords / proper / room / general …
> @save item_descr
> @new item_stats 4502
> @item_stats type weapon
> @item_stats flags wear take
> @item_stats flags wear wield
> @item_stats weight 5
> @save item_stats
> @new item 4502
> @item description 4502
> @item stats 4502
> @item maximum 1
> @examine item
> @save item
> approve item 4502
> create item 4502
>

Next: equip via zone (Mobiles, Zones).

You never “enter oedit 3100”. You open typed workspaces (@new item_descr|item_stats|item), edit with @item_* / @item subcommands, @examine, @save. No @object alias.

  • Second @new while a descr/stats/item draft is still open
  • @save item without description / stats links
  • Forgetting take / wield wear flags, then wondering why get/wield fails
  • create vs load surprise (ranges / maximum)
  • @item proc before the SpecProc row exists
  • immortal/creationlaw/objects.txt
  • Last modified: 2026/09/23 22:22
  • by 127.0.0.1