IMM_SCRIPTMOVE
Keywords: IMM_SCRIPTMOVE, WIZ_SCRIPTMOVE
=== STAFF MANUAL ===
Usage: scriptmove <source vid> <destination vid>
Description:
Renumber a script (trigger) prototype, moving it from one virtual
ID to another. Unlike scriptcopy, this is a move -- the source VID
is vacated and the script lives at the destination VID afterwards.
The engine chases every world-wide reference to the source in the
same pass and rewrites them to the new VID, so a scriptmove is
safe even when the script is heavily attached:
Mob attachments .. Every mob prototype's m_Triggers list is
scanned; occurrences of the source VID are
replaced with the destination VID, and the
owning zone is queued for resave.
Obj attachments .. Every object prototype's m_Triggers list
is scanned and rewritten the same way.
Zone resets ...... Any zone with a T reset command whose
script pointer is this prototype is
marked for resave so the reset file picks
up the new VID.
Behavior sets .... BehaviorSet::Save is called after the
move so any behavior set that references
the script writes out with the new VID.
Global triggers .. SaveGlobalTriggers is called so the
global scripts file picks up the new VID
for any script attached at that level.
Both source and destination zones are marked dirty for their
.trg files, and each cross-reference hit queues an additional
deferred save for the owning zone's matching file type. The full
set of deferred saves is executed at the end of the command.
Arguments:
<source vid> ..... Virtual ID of the script to move. Short
form :<number> inherits the current
room's zone.
<destination vid> Virtual ID to move it to. Short form
inherits the source VID's zone rather
than the current room's.
Output:
On success the invoker sees:
Moved script <src> to <dst>.
The action is logged to the staff wiznet as:
OLC: <name> moved script <src> to <dst>
Restrictions:
- Requires the OLC staff permission and build access to
both the source and destination zones.
- Both arguments are required. A missing destination
prints "Usage: scriptmove <source> <destination>".
- The destination VID must be well-formed and its zone
must exist: "Invalid destination VirtualID." or "The
destination zone does not exist." otherwise.
- The source must currently hold a script prototype
("Script not found.").
- The destination must be empty -- the move refuses to
overwrite: "The destination script already exists."
- Either the source or the destination being open in an
active scriptedit session blocks the command, with the
game reporting which staff member has it open.
Notes:
- scriptmove has no "safe" mode -- unlike omove, it
never leaves a backup prototype behind at the source
VID. Plan ahead if you need a rollback path.
- Because both the behavior-set file and the global
triggers file are resaved after every scriptmove, the
disk cost is slightly higher than the other move-family
commands.
- Running scripts already loaded into live entities
continue executing against the renumbered prototype;
the rewrite is handled through trig_index.renumber
and the existing pointers stay valid.
Related Helpfiles: WIZ_MMOVE, WIZ_OMOVE, WIZ_RMOVE
=== END MANUAL ===