Show pageOld revisionsBacklinksBack to top You've loaded an old revision of the document! If you save it, you will create a new version with this data. Media Files ====== Creation Law — Items ====== This page assumes you already built (or are building) an object prototype on [[creationobjects|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: [[creationlaw|Creation Law]]. Item shell scripting: [[scriptitems|Script Law — Items]]. ===== Objects vs items ===== * **[[creationobjects|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: <code mud> > @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. > </code> 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. <code mud> > @item_stats type weapon Okay. > </code> ==== 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. <code mud> > @item_stats flags wear take Okay. > @item_stats flags wear wield Okay. > @item_stats flags itemflags … > @item_stats flags affects … > </code> ==== Attrs ==== Includes ''SpecItem'' for hardcoded / compiled item specials (different from free-form ''@item proc'' — [[scriptlaw|Script Law]]). ==== Modifiers ==== ''modifiers add <index> <apply> <value>'' — ''Apply'' enum bonuses (hitroll, damroll, …). <code mud> > @item_stats modifiers add 0 hitroll 1 Okay. > </code> ==== 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. <code mud> > @item_stats weight 5 Okay. > </code> ===== Index and find ===== <code mud> > @find item > index item sword > index item_descr sword > index item_stats > stat item 3100 > </code> ''index proc_item'' lists SpecProc names when you are ready to script ([[scriptobjects|Script objects]]). ===== Load vs create vs purge (read this twice) ===== <code mud> > load item 3100 You create a tempered shortsword. > create item 3100 You create a tempered shortsword. > purge sword > purge all > </code> * '''''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. ===== Maximum caps ===== Why caps exist: they stop a prototype from flooding the world. Set on the prototype: <code mud> > @load item 3100 Okay. > @item maximum 25 Okay. > @examine item > @save item Okay. > load item 3100 > </code> 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 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 ([[creationzones|Zones]]) — and you ran ''zone reset'' after ''@save zone'' - [ ] If scripted, ''index proc_item'' shows the name before ''@item proc'' ===== Placing the item for players ===== Spawning in your inventory is only a test. Live placement is zone reset commands: <code mud> > @load zone 4599 > @zone item 3100 4500 Okay. > @examine zone > @save zone Okay. > zone reset Okay. > </code> Forgetting ''zone reset'' after editing resets is the usual "I saved the zone but nothing appeared" moment — [[creationzones|Zones]]. ===== Related ===== * [[creationobjects|Objects]] — build the prototype * [[creationmobiles|Mobiles]] — wield / give via zone * [[creationzones|Zones]] — item reset commands * [[scriptitems|Script Law — Items]] — item shell APIs * [[creationlaw|Creation Law]] — hub SavePreviewCancel Edit summary Note: By editing this page you agree to license your content under the following license: CC Attribution-Share Alike 4.0 International creationitems.1790178404.txt.gz Last modified: 2026/09/23 15:46(external edit)