Sunday, July 6, 2008

MPREDIT: Finally, a room version of MPMSET and MPOSET. (Or: How to let mobs edit rooms)

Creates a new mobprog command, MPREDIT. This allows mobs to edit
rooms, similar to MPMSET and MPOSET. It is set up so that if a
builder saves an area, changes done by MPREDIT will not be saved.

This has been fairly rigorously tested, but has changed slightly in the
conversion to stock SMAUG.

Stock SMAUG's room affect code is buggy. One of the things mpredit can
do is manipulate room affects. I've posted snippets at and which fix the room affect bugs. If you don't want to
install them, then it's probably a good idea not to use mpredit to manipulate
room affects (nor manipulate them with regular redit either).
If you don't have any idea what room affects are, and don't plan on making
mobs mess with them, then this is a non-issue.

The syntax of the mpcommand are as follows.

mpredit affect (affect): add a room affect
mpredit rmaffect #: remove a room affect
mpredit bexit (dir) [destination]: create (or remove) an exit and its reverse
mpredit description (text): set the room description
mpredit description +(text): add to the room description
mpredit description clear: clear the room description
mpredit ed (keyword) (text): add or modify an extradescription
mpredit ed (keyword) +(text): add text to an extradescription
mpredit rmed (keyword): remove an extradescription
mpredit exkey (dir) (key): set an exit's key
mpredit exname (dir) (name): set an exit's name
mpredit exdesc (dir) (text): set an exit's description
mpredit exflags (dir) (flags): toggle exit flags
mpredit exit (dir) [destination]: create (or remove) an exit.
mpredit flags (roomflags): toggle room flags
mpredit name (name): change room's name
mpredit pull (dir) #: set the strength of an exit's pull
mpredit push (dir) #: set the strength of an exit's push
mpredit revert: return room to its original state before any mpredits took place
mpredit sector #: change the room's sector type (Water traps!!!:)
mpredit tunnel #: change the room's tunnel size
mpredit teledelay #: change the room's teleport delay
mpredit televnum #: change the room's teleport destination

The snippet also installs an imm command "unmpredit" which is the same as
"mpredit revert". Also it adds support for the "rstat" command to tell an
imm when a room is under the effects of mpredit. An imm can type "rstat mpredit"
to see a list of exactly what those changes are.


No comments: