MOBLOG
Keywords:
MOBLOG, MPTRACE, MPINFO, DEBUG, MOBHELP, IFHELP
Category:
olc
Debugging mobprogs without tools can at times be near impossible at the best of times. This help entry documents some of the mobprog debugging features and commands built into the dawn codebase.
Syntax: mptrace [lines to look back]
The mud mobprog system remembers the last 500 mobprogs triggered. In
addition it records, the type of trigger, the mob which the mobprog was
triggered on, the room the mob was in and the time of the triggering. All
this information can be displayed with the mptrace command. By default
mptrace only displays the most recent 20 triggered mobprogs. You can view
earlier triggerings by specify how many lines back into the trace you want to look.
Syntax: mpinfo [lines to look back]
Often bugs in syntax within a program are not obvious initially. In
addition some syntax errors in mobprogs will cause the program to terminate
and be marked inactive until edited. These errors are logged and can be
displayed using the mpinfo command.
medit's act moblog flag
At times, a mobprog can be behaving in ways you don't intend or not behave at all... you can tell it is triggering using mptrace and no errors are
showing up in the mpinfo log. In situations like this it can be useful to
see 'what the mob sees'. A mob with the 'act moblog' flag turned on will
log all output from commands run by the mob and other events to the moblog
file. The contents of this file can then be seen using the checkmoblog
command.
An example line in a mobprog might read 'mq6 at 3118 mob transfer $n 3119'. This may appear to be correct at first, but at is an immortal command. Turning on the moblog for a mob running this prog, you would shortly see
that the at command was running attune. Then you could correct the prog to
read 'mq6 mob at 3118 mob transfer $n 3119'.
In addition there are two reference commands to help check syntax...
Syntax: mobhelp - display a list of all mob commands.
Syntax: mobhelp [command] - display matching example notes.
Syntax: ifhelp - display help on 'if' mobprog syntax.
Syntax: ifhelp [check] - display help on specific 'if' check.
See Also
Mobhelp
Ifhelp
If Checks
Variables
Mob Asound
Mob Echo
Mob Oload
Mob Kill
Mob Flee
Mob Remove
Mob Junk
Mob Purge
Mob At
Mob Goto
Mob Transfer
Mob Force
Mob Cast
Mob Damage
Mob Delay
Mob Cancel
Mob Remember
Mob Forget
Mob Call
Mob Tgive
Mobprogram List
Mobile Programs
Triggers
Operators
Mpsyntax
Mp Building
Mpexamples
Mprog Character Variables
Mpcommands
Checkmoblog
Medit