Register to post in forums, or Log in to your existing account
 

 Related 
Contents
Configuration
  Automatic Mapper Configuration
  Mapper Wizard Offline
  Manual Mapper configuration
  Overriding the Mapper
Related Links:
  Configuration
Overriding the Mapper [[CMUD_Overriding_the_Mapper]] 
Overriding the Mapper

While the mapper works great on many MUDs after auto-configuring it, there are some MUDs that are tough to map. The mapper contains many powerful commands that enable you to map complex MUDs. With these commands, you should be able to map any MUD with a little effort.

Basic Overrides

All to often text will be received between the moment a direction command is sent and room information begins to be received. There are some advanced tricks you can use that will modify your MUD output before the mapper has a chance to see it. You can do this using Triggers. With the #SUBSTITUTE command, you can remove any special characters that are giving the mapper trouble, or add characters that the mapper needs like blank lines. You can tell the mapper to ignore lines altogether using the #NOMAP command. You can override any of the automapper detection with the #TAG command. Finally with you can abort a failed movement with #NODIR. It is recommended that whenever you use a trigger to change the mapper behavior, you run the autoconfigure wizard after adding the trigger so that the mapper configuration gets set properly.

Fixing the MUD Prompt

The mapper is sensitive to the Prompt used on your MUD, since it flags this as the same as a blank line, separating room information. If the mapper cannot auto-detect your MUD Prompt, then the mapper will have trouble. By default, the mapper looks for a line that contains more numbers and special characters than regular letters. So, a prompt like: "[100 hp 100 mana]" works the best. If you cannot change the prompt on your MUD to be something like this, you can use the #TAG command to force the mapper to detect your prompt. In this case, go to the Other Config page in the Mapper Preferences and turn off the Auto Prompt detection. Then set up a trigger for your prompt. For example, if your prompt is a simple * character, use a command like:

#TRIGGER {^~*} {#TAG prompt}

to tell the mapper what the prompt looks like.

Using the TAG command

The #TAG command, while extremely powerful, requires precise triggers. You can use this command to force the mapper to recognize a room name, exit information, description, vnum, flags, prompt, etc. This is done by having a trigger capture information from the received lines. For example, if your MUD displays room names in brackets like: "[Room Name]" you would could up a trigger like this:

#TRIGGER {^~[(*)~]} {#TAG name {%1}}

This tags the line as a room name and captures the text between the brackets and sends it to the mapper. In this case a trigger using #SUBSTITUTE would work as well.

You can combine multiple tags for a single line. For example, if your MUD displayed the room name, exit information, and room number in the same line like this: "Room Name [n,s,e] #20" then you would set up a trigger like this:

#TRIGGER {(*) ~[(*)~] ~#(%d)} {#TAG name,exit,vnum {%1} {%2} {%3}}

to tag the line, capture all the information, and send it all to the mapper.

Whenever you set up Tag triggers, you must also Tag your prompt and Reconfigure the mapper so that it will properly recognize your new triggers. Also note that you do not need to detect everything with the #TAG command. Just detect what you need to and let the autoconfigure detect the rest. In many cases, just detecting the MUD Prompt is good enough.
Viewer Comments [0 - Post your comments]

Jump to:  

© 2009 Zugg Software. Hosted by Wolfpaw.net