Table of Contents

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

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 procScript 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
>

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:

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.