SmaugWizard/Backup/
SmaugWizard/Backup/L/
SmaugWizard/Boards/
SmaugWizard/Building/
SmaugWizard/Corpses/
SmaugWizard/Councils/
SmaugWizard/Deity/
SmaugWizard/Gods/
SmaugWizard/MudProgs/
SmaugWizard/Player/L/
SmaugWizard/Src/
SmaugWizard/Src/res/
This document describes the menus for online building in the SmaugWizard MUD server.

In addition to the usual command line build commands, SmaugWizard has three build menus which can make room, object, and mob creation and editing much easier.  While patterned after the same functionality in the Smaug server, there are some substantial differences.

Perhaps the biggest single difference is that items being edited are not edited 'live' as they are in Smaug.  For example, if you are making changes to a mob, in Smaug, each time you change a value the mob is immediately updated with your change.  This is true of rooms and objects too.   The menus in SmaugWizard make a copy of all pertinent data about the thing being edited, and all changes you make are made to the copy.  Then when you are done editing, you must issue a 'savemenu' command, and the room, object, or mob you were editing will be updated.  You can also issue a 'quitmenu' command to discard all changes and leave the item unchanged.

General editing commands and methods:

When you want to start editing something, you start the menu with the 'rmenu', 'omenu', or 'mmenu' command.  Rmenu edits the current room, but for omenu and mmenu, you must also supply the name or vnum of the thing you want to edit.  For instance you could enter 'mmenu guard', to edit a guard mob.  If you know the vnum of the mob, you can use that instead of the name.

All menus have multiple display pages, each set up to show a specific type of information about the item being edited.  The pages are lettered as 'a' through 'g', for as many pages as are needed.  Every menu also has a page 'h', which is the help page.  When starting the menus, you can specify which display page you want to be shown first, by adding the page letter to the command (e.g. 'omenu torch c' will start on page c).  If you do not specify a start page, the menu will start with the help page.  To switch to a different display page while 'in' the menu, use the dash character, followed by the page letter (e.g. '-d' to display page d).

In addition to the help page for each menu type, there are normal Smaug help pages, which can be viewed by using 'help rmenu', 'help omenu', and help 'mmenu'.

Once you have started a menu and selected the page you want to work with, you will see that each page is laid out in numbered sections, starting with number 1.  Each item within a section is labeled with a letter, starting with 'a'.  To change an item, you have to enter a command as 'section item [data]' (data is not used for boolean data types).

As you change each item, you will see the change reflected in the menu page in the top portion of your screen.  If you are using ANSI color, the changes will be displayed in a brighter color, so you can see what you have changed.

This menu system uses ANSI character positioning and ANSI color commands, and will not work with other types of terminal emulation.  Each menu is displayed at the top of your page, and the page is cleared whenever you start a menu, change pages, or re-display the current page.  The first line under the menu is a status and error line.  The next line always shows your prompt.  After each command is entered, the appropriate change is printed on the screen, and then the screen is erased, from the bottom of the menu to the bottom of your screen.  To do this, the menu system needs to know how many lines your screen can display.  The default that it uses is 24 lines.  The minimum usable value is 16 lines.  This system has only been tested and optimized for use with the Zmud mud client, and may not work properly with other mud clients and ANSI emulations.  I will be happy to work with anyone who finds problems with the ANSI screen positioning.  I have noticed that Zmud will not always clear the last line.  This seems to be a Zmud problem.

You can change the number of lines by using the pagelen command.  This works both in and out of the menu.  Just use 'pagelen 25', for example.  Currently this value is not saved with the player file, so you may have to reset it when you log on again.

Normally when you are 'in' a menu, the menu is 'locked' so that only menu commands will be recognised by the mud.  You must use the 'savemenu' or 'exitmenu' commands in order to return to normal mud commands.  This is a safety feature, to prevent you from accidentally entering a command which could cause you to loose all your work, or cause the screen to scroll the menu off the screen.  For instance, you might indavertantly enter the 'quit' command instead of 'quitmenu'.  As long as the menus are locked, the quit command would not work.

However, there are situations where it would be desirable to enter regular mud commands while you are editing.  You can use the 'unlock' command to allow normal mud commands to work while you are still editing.  The 'lock' command can be used to relock the menus if desired.  Once you have changed the lock status, all of your menus will use the new status as long as you are logged on.  If you log off and back on, the menu status will revert to locked.

While you are editing, normal mud messages will be displayed on your screen, below the menu prompt.  If you enter a new menu command before the screen scrolls, those mud messages will be cleared, and the cursor set back to the menu prompt line.  If the screen does scroll, your menu may be all or partially lost.  In either case, the menu will no longer be updated properly on the screen when you make changes. (The changes will, however, be properly applied to the internal copy of the item you are editing).  If the screen scrolls, you can fix it by re-displaying the current page (use the -page command).

In some cases, the item you are editing may be deleted from the mud before you finish editing.  For instance you could be editing a piece of food, and forget and eat it!  When you try to save your changes, you will get a message that the object could not be saved because it no longer exists.

One thing that you will not be able to change with the menus is the prototype flag.  This is because the prototype flag is used to determine how to load and store the data you are editing.  If you could change it during the edit, the menu system would get confused.  This will be described in greater detail in the Object section, below.

The editing menus being released with SmaugWizard version 1.02 are not complete.  I have added some functionality to what was already in Smaug 1.02a, but there is much data that needs to be added.  The following sections of this document will describe each menu and some of the missing items will be documented.  Where items are not yet in the menu, you will have to revert to the normal (non menu) build commands.  If you discover any missing items that I have not documented, please let me know so I can add them for the next version.

Editing Rooms:

Start the menu by issuing the 'rmenu' command, which can be abbreviated as just 'rm'.        This will start a menu for editing the room which you are currently in.   The top of each page will show the name of the room, it's vnum, and a 'N' or 'P' flag to show whether it is a prototype room or not.  Room data is currently divided into 3 pages, a,b,c.  Page a allows editing the room name and description.  Since the description can encompass many  lines of text, you will be put into the line editor when you specify item 1 b.

Page b allows you to set the room flags and sector type.  These are boolean values, you simply enter the section & item value, and the boolean value is toggled on and off (X or blank).

Page c shows room exits data.  At the top of the menu are check boxes showing all possible exit directions.  Only exits that actually exist are checked.  Currently you can not create new exits with the room menu, but you can change the properties of existing exits.  Page c only shows data for one exit at a time.  The exit being currently displayed is shown at the top in yellow letters. ('North Exit', etc.).  You can change the displayed exit by using the -DIR command, where DIR = N, S, E, W, U, D, NE, NW, SE, SW, or SO (SO = the somewhere exit).  Note that these directions must be entered in upper case.

The 'to room' and 'key' values are the vnum of the room that the exit goes to, and the vnum of the room key.  Currently these values are not checked when you enter them, so if they do not exist, you will have some bug messages after saving the room.  The next version should have additional checking, and functionality for room exits.


Editing Objects:

Start the menu by issuing the 'omenu' command, which can be abbreviated as just 'om', followed by the name or vnum of the object you wish to edit.  The top of each page will show the name of the object, it's vnum, and a 'N' or 'P' flag to show whether it is a prototype object or not.  If it is a prototype object, the data displayed will be read from the object index (the master description for all copies of that object).  If the object is non-prototype, the data shown will be from the object itself.  When you save the object, the prototype object data will be saved in the index (which means that all copies of that object will be altered), and the non-prototype object data will be saved in just the single object you are editing.

Object data is currently divided into 5 pages, a - e.  The items that can be edited on each page are obvious, so here I'll only comment on special cases.  In page a, the item values 0 to 3, each have a string field after them, which shows what the value is used for.  This changes with the object type, which is selected in page b.  If you change the object type, the strings should change, but currently they stay the same as when the object was originally loaded.  This will be fixed in the next version.  Also, only one object type should be able to be selected at a time, currently you can check as many as you wish, only the last one selected will be saved though.

Also on page a is the object level.  This level is only stored and read back in when the object is held by a player.  Otherwise, even for a prototype object, the level you set in the menu will only be valid for the life of the individual object you are editing.

Section 2 of page c allows you to set the RIS (resist, immune, susceptible) affects for the object.  You change them by using 'section item <R,I,S>'.  You can only use one of R,I,S at a time, so if you wanted the same property to have both resist and immune, you have to issue the command twice.  They are toggles, so to remove one, use the command again.


Editing Mobs:

Start the menu by issuing the 'mmenu' command, which can be abbreviated as just 'mm', followed by the name or vnum of the mob you wish to edit.  The top of each page will show the name of the mob, it's vnum, and a 'N' or 'P' flag to show whether it is a prototype mob or not.  If it is a prototype mob, the data displayed will be read from the mob index (the master description for all copies of that mob).  If the mob is non-prototype, the data shown will be from the mob itself.  When you save the mob, the prototype mob data will be saved in the index (which means that all copies of that mob will be altered), and the non-prototype mob data will be saved in just the single mob you are editing.

Mob data is currently divided into 6 pages, a - f.  Page e, section 3 contains RIS flags.  See the description above in Editing Objects to learn how to set and clear the RIS flags.  Page f is where you set the mob's race.  Currently you can set as many races as you wish, but only the first one selected will be saved.

*eof*  Rustry   (3/25/98)