IMM_OCOPY
Keywords: IMM_OCOPY, WIZ_OCOPY
=== STAFF MANUAL ===
Usage: ocopy <source vid> <destination vid>
Description:
Duplicate an object prototype to a fresh virtual ID. The
new prototype is a deep copy of the source's ObjData plus
the side-car metadata needed for the item to behave correctly
once it is loaded:
ObjData ......... Every field on the prototype: name,
descriptions, type, values, flags,
weight, cost, affects, and so on.
Triggers ........ The source's m_Triggers list is copied,
so every attached script comes along.
Behaviors ....... m_BehaviorSets is copied, preserving
any attached behavior sets.
Initial Globals . m_InitialGlobals is cloned so the
copy starts with the same trigger
globals as the original.
The new prototype is installed into obj_index immediately,
and the destination zone is marked dirty so its .obj file is
rewritten on the next OLC save pass.
Arguments:
<source vid> ..... Virtual ID of the source object.
Short form :<number> inherits the zone
from the current room; full
<zone>:<number> targets any zone.
<destination vid> Virtual ID the new prototype will
occupy. Short form inherits the source
VID's zone rather than the current
room's.
Output:
On success the invoker sees:
Copied object <src> to <dst>.
And the staff wiznet records:
OLC: <name> copies obj <src> to <dst>
Restrictions:
- Requires the OLC staff permission and build access
to the destination zone.
- Both arguments are required. Omitting one prints
the shared usage line for the whole copy family:
"Usage: [rcopy|ocopy|mcopy|scriptcopy] <source>
<destination>".
- The destination VID must be well-formed and its
zone must already exist; otherwise the command reports
"Invalid destination VirtualID." or "The destination
zone does not exist.".
- The source object must already exist
("Source object not found.").
- The destination must be empty -- ocopy refuses to
overwrite:
"You cannot copy over an existing object."
Notes:
- The zone save is deferred. Your edit is live
immediately, but the new prototype only hits disk on
the next OLC save for the destination zone -- usually
as soon as you quit out of an editor or run
massolcsave.
- Unlike omove, ocopy does not chase world-wide
references to the source VID. Mob equipment lists,
room keys, zone resets, and vehicle slots continue to
point at the original object -- the copy is a clean
new prototype, not a share.
- The m_Function and m_SharedVariables fields on the
prototype are not copied by ocopy. Items that rely on
these (for example, items with special procedures or
shared variable state) may need manual re-wiring on
the copy.
Related Helpfiles: WIZ_MCOPY, WIZ_RCOPY, WIZ_SCRIPTCOPY
=== END MANUAL ===