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 — 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: [[creationlaw|Creation Law]]. Field/spawn reference once built: [[creationitems|Items]]. Scripts: [[scriptobjects|Script Law — Objects]]. ===== Why three layers? ===== 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**. [[creationitems|Items]] is the type/flag/spawn/testing reference once the object exists. Same commands; different teaching focus. ===== Step-by-step: first object (a wieldable sword) ===== ==== 1. Description draft ==== Why first: you want readable strings in-game even before combat numbers are perfect. <code mud> > @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. > </code> 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''. ==== 2. Stats draft ==== Why second: type and wear flags decide whether ''wield'' / ''get'' work when you spawn-test. <code mud> > @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. > </code> 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: [[creationitems|Items]]. ==== 3. Prototype draft — link, cap, optional proc ==== Why this layer exists: the live world loads **item** prototypes; descr/stats are pieces the prototype references. <code mud> > @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. > </code> **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''. ==== 4. Approve and spawn-test ==== <code mud> > approve item 3100 > create item 3100 You create a tempered shortsword. > purge sword > </code> Prefer ''create'' while learning your own range (stricter). ''load'' skips range checks — see [[creationitems|Items]] for ''create'' vs ''load'' and ''maximum'' rules. If create refuses you, read the echo: wrong range vs ''maximum > 1'' are different failures. ===== Attaching a script (later) ===== Create the SpecProc **first** (''@proc item new …'' / script text), verify with ''index proc_item'', **then**: <code mud> > @load item 3100 Okay. > @item proc my_sword_proc Okay. > @examine item > @save item Okay. > </code> Attaching a name that does not exist yet leaves you confused at runtime — build proc → attach → save. Details: [[scriptobjects|Script objects]]. Hard-coded compiled specials use ''SpecItem'' on ''@item_stats attrs'', not the free-form ''proc'' name. ===== Relinking an existing prototype ===== <code mud> > @load item 3100 Okay. > @item description 3100 > @item stats 3100 > @examine item > @save item Okay. > </code> **Caveat:** ''@destroy item_descr'' fails while an item prototype still references that VID — unlink or destroy the prototype path carefully. ===== End-to-end (compact) ===== <code mud> > @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 > </code> Next: equip via zone ([[creationmobiles|Mobiles]], [[creationzones|Zones]]). ===== Vs classic ''oedit'' ===== 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. ===== Common mistakes ===== * 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 ===== Related ===== * [[creationitems|Items]] — types, flags, spawn, caps * [[creationmobiles|Mobiles]] — weapon + mob workflow * [[scriptobjects|Script Law — Objects]] — ''@item proc'' / ''@proc item'' * [[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 creationobjects.1790178402.txt.gz Last modified: 2026/09/23 15:46(external edit)