Staff commands
Use staff commands to discover prototypes, inspect live state, and perform controlled runtime changes. Use OLC to make attachments permanent.
src/interpreter.c. DG command bodies: src/dgscript/dg_scripts.c. Stats: src/act.wizard.c.Quick reference
| Command | Minimum level | Purpose |
|---|---|---|
| trigedit | Builder | Create or edit a trigger prototype in an assigned zone. |
| tlist | Builder | List trigger prototypes by current zone, zone number, or VNUM range. |
| tstat | Builder | Display one trigger prototype and its command body. |
| attach | Builder | Attach a fresh trigger instance to a live mobile, object, or room. |
| detach | Builder | Remove trigger instances from a live owner. |
| vdelete | Builder | Delete one or all globals from an entity by numeric script ID. |
| tcopy | Staff | Copy an existing trigger prototype to a new target VNUM. |
| stat scriptvar | Immortal | Show a character's attached scripts, memory, and player globals. |
| vstat t | Immortal | Route a trigger VNUM through the general virtual-stat command. |
| vnum trig | Immortal | Search trigger prototypes by keyword. |
| set ... variable | Grand Staff option | Set a persistent player DG variable in context 0. |
Level names above mirror the command table and the per-option permission for set variable.
List and inspect prototypes
tlist
tlistList triggers in the zone containing your current room.tlist .The same current-zone selection, made explicit.tlist 118List triggers in zone 118.tlist 11800 11899List triggers in an inclusive VNUM range.
tstat and vstat
tstat 11868
vstat t 11868Both display the trigger prototype. tstat is available at Builder; vstat is the broader Immortal command and delegates type t back to tstat.
Live-owner inspection
General stat output includes script data for supported entity targets. stat scriptvar <character> specifically displays a character's scripts, script memory, and PC global variables.
Prototype versus instance
tstat shows the prototype. A live owner holds trigger instances with current depth, locals, wait state, and owner globals. Inspect both sides when behavior differs from the saved definition.
Copy and edit prototypes
trigedit <vnum>Open an existing prototype or initialize a new one in your editable zone.tcopy <source-vnum> <target-vnum>Copy an existing source into a new target VNUM; the source may be in another zone.
tcopy rejects an existing target and requires permission for the target zone. It opens the target in TRIGEDIT so the copy can be reviewed before saving.
Review copied coupling
Search the copied body for room, mobile, object, quest, and trigger VNUMs; variable namespace prefixes; hidden command tokens; and owner-specific command families. A syntactically valid copy can still point into the old zone.
Attach a trigger to a runtime instance
attach { mob | obj | room } { trigger-vnum } { target } [ position ]| Owner | Examples | How target resolves |
|---|---|---|
| Mobile | attach mob 11800 shopwoman | Visible world character by name; otherwise a matching mobile VNUM in the current room. |
| Object | attach obj 11805 eye | Visible object; otherwise matching VNUM in the room, then inventory. |
| Room | attach room 11868 . | A room VNUM or any target containing . for the current room. |
The optional position controls placement in the live trigger list; omitted means append. The command reads a new instance from the prototype and does not add a T record to the mobile, object, or room prototype.
- For a room target, permission is checked against that room's zone. For mobile and object targets, this command checks the builder's current room zone.
- Player attachment is allowed only when the server configuration enables player scripts.
- The command does not reject an intended-owner mismatch. Confirm with
tstatfirst; the driver's mismatch abort is only compiled in whenSCRIPT_DEBUGis enabled.
Detach from a runtime instance
Room syntax is deliberately different from mobile and object syntax:
detach room <trigger|all>Operates on the current room. There is no separate room target argument.detach mob <target> <trigger|all>Resolves a visible character or a current-room mobile VNUM.detach object <target> <trigger|all>Resolves a visible object, current-room object VNUM, then inventory VNUM.
A trigger selector can be a list position, prototype VNUM, or matching name form. all extracts the owner's full script structure. Like attach, this changes the live owner only.
Permanent attachment changes belong in OLC
Use the S scripts menu in MEDIT, OEDIT, or REDIT, then save that prototype. Runtime attach/detach is appropriate for testing and incident response, not world-data authoring.
Inspect, set, and delete variables
Set a player global
set <player> variable <name> <value>This creates the player's script structure if needed and writes the global in context 0. It is intended for explicit state repair or controlled testing.
Delete globals by numeric script ID
vdelete { <variable-name> | * | all } <numeric-id>vdelete resolves the numeric ID as room, character, or object, then removes the named global or every global. It does not ask for confirmation.
Deletion is immediate
Inspect the target and record the variable name, context, and value before using vdelete. For player state, make sure the change matches the quest or recovery intent.
Safe operational sequence
- Identify whether you are inspecting a prototype, a live instance, or persistent player state.
- Use
tstatand owner stats before changing anything. - Confirm the target's numeric ID or visible instance and current zone.
- Make the smallest runtime change needed.
- Exercise the exact event and inspect logs and variables again.
- If the change is permanent, reproduce it in OLC and save the owning prototype.