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 vs 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.
Editing stats on an existing object
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.
Stats fields in detail
@item_stats: attrs, flags, modifiers, type, values, weight.
Type (''ItemType'')
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. >
Flags — wear, item flags, affects
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 … >
Attrs
Includes SpecItem for hardcoded / compiled item specials (different from free-form @item proc — Script Law).
Modifiers
modifiers add <index> <apply> <value> — Apply enum bonuses (hitroll, damroll, …).
> @item_stats modifiers add 0 hitroll 1 Okay. >
Values
values <slot> <value> — type-specific. Set type first so the slots mean what you think they mean.
Weight
weight <n> — positive integer up to the coded max.
> @item_stats weight 5 Okay. >
Index and find
> @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 vs create vs purge (read this twice)
> 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 asload, but also requires the VID in your assigned item range, and refuses prototypes whosemaximumis greater than 1 when used ascreate. New builders should prefercreateon 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.
Maximum caps
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.
Spawn-testing checklist
Walk this after every new object:
- [ ]
@examine itemshows the intended description + stats VIDs - [ ]
create item <vid>(orload) prints the expected short name - [ ]
get/ wear /wieldbehave as flagged - [ ] Weight and modifiers look right on
stat - [ ] Zone
item/equip/give/putresets place it (Zones) — and you ranzone resetafter@save zone - [ ] If scripted,
index proc_itemshows the name before@item proc
Placing the item for players
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.
Related
- Objects — build the prototype
- Mobiles — wield / give via zone
- Zones — item reset commands
- Script Law — Items — item shell APIs
- Creation Law — hub