immortal:creationlaw:items

Creation Law — Items

This page assumes you already built (or are building) an object prototype on Objects. Here we slow down on what the stats fields mean, how maximum caps work, and how to spawn-test without shooting yourself in the foot.

You know oedit's type/wear/value screens. Neo spreads those across @item_stats (and caps/proc on @item). There is still no oedit.

Hub: Creation Law. Item shell scripting: Script Law — Items.

  • Objects — pedagogical build order: descr → stats → link on item → approve.
  • Items (this page) — ItemType, wear/flags/affects, modifiers, values, weight, index, load/create/purge, caps, testing checklist.

Prefer @load so you do not invent a second stats VID by accident:

> @load item_stats 3100
Okay.
> @item_stats type weapon
Okay.
> @item_stats flags wear take
Okay.
> @item_stats flags wear wield
Okay.
> @examine item_stats
> @save item_stats
Okay.
>

If @load says you already have a draft, @examine item_stats then @save or @clear.

@item_stats: attrs, flags, modifiers, type, values, weight.

Why set type early: it decides which values slots matter (weapon dice vs armor AC vs light hours, …).

Types include LIGHT, SCROLL, WAND, STAFF, WEAPON, ARMOR, POTION, RECEPTACLE, NOTE, KEY, FOOD, MONEY, and other coded types.

> @item_stats type weapon
Okay.
>

Why wear flags matter: without take, players (and many tests) cannot pick the object up; without wield, weapon testing lies to you.

Classes: ItemFlags, Affects, Wear (TAKE, WIELD, HOLD, BODY, …). Prefix ! to clear when supported.

> @item_stats flags wear take
Okay.
> @item_stats flags wear wield
Okay.
> @item_stats flags itemflags …
> @item_stats flags affects …
>

Includes SpecItem for hardcoded / compiled item specials (different from free-form @item procScript Law).

modifiers add <index> <apply> <value>Apply enum bonuses (hitroll, damroll, …).

> @item_stats modifiers add 0 hitroll 1
Okay.
>

values <slot> <value> — type-specific. Set type first so the slots mean what you think they mean.

weight <n> — positive integer up to the coded max.

> @item_stats weight 5
Okay.
>
> @find item
> index item sword
> index item_descr sword
> index item_stats
> stat item 3100
>

index proc_item lists SpecProc names when you are ready to script (Script objects).

> load item 3100
You create a tempered shortsword.
> create item 3100
You create a tempered shortsword.
> purge sword
> purge all
>
  • '''load item <vid>''' — immortal spawn without range checks (still interacts with instance maximums via create paths). Handy for implementors testing anything.
  • '''create item <vid>''' — same handler family as load, but also requires the VID in your assigned item range, and refuses prototypes whose maximum is greater than 1 when used as create. New builders should prefer create on their own work so mistakes show up early.
  • '''purge [target|all]''' — remove an item/mobile from the room, or dump room items.
  • expunge — stronger removal (immortal).
  • matrix item … — combat/builder matrix inspection (not SpecProc matrix metadata).

If create fails: check the echo — out-of-range vs maximum-cap are different. Fix range (ask an implementor to assign) or lower @item maximum and @save item, then retry.

Why caps exist: they stop a prototype from flooding the world. Set on the prototype:

> @load item 3100
Okay.
> @item maximum 25
Okay.
> @examine item
> @save item
Okay.
> load item 3100
>

After changing maximum, always @save item before another spawn test. Remember: create is harsher when maximum > 1.

Walk this after every new object:

  • [ ] @examine item shows the intended description + stats VIDs
  • [ ] create item <vid> (or load) prints the expected short name
  • [ ] get / wear / wield behave as flagged
  • [ ] Weight and modifiers look right on stat
  • [ ] Zone item / equip / give / put resets place it (Zones) — and you ran zone reset after @save zone
  • [ ] If scripted, index proc_item shows the name before @item proc

Spawning in your inventory is only a test. Live placement is zone reset commands:

> @load zone 4599
> @zone item 3100 4500
Okay.
> @examine zone
> @save zone
Okay.
> zone reset
Okay.
>

Forgetting zone reset after editing resets is the usual “I saved the zone but nothing appeared” moment — Zones.

  • immortal/creationlaw/items.txt
  • Last modified: 2026/09/23 22:22
  • by 127.0.0.1