Setting up Automapper in CMUD or zMUD
Posted: 16 Mar 2010 20:41
Setting up automapping in cmud or zmud poses an extra challenge in Genesis. I have had to set up a different set of mapping triggers for different areas in order to get it to work correctly. Also, there are some areas in the game that actually change long description depending on time of day or local calendar year.
You really have to play with it in order to get it to work correctly. Here are some of the rules of thumb mostly for Cmud users:
1) The biggest thing is to set the options in Genesis not to wrap.
This makes it so that your client can read the whole room description as one line instead of multiple lines. That makes triggers easier to fire.
2) Set #NODIR triggers for all the "error" messages in movement. #NODIR tells the mapper that your attempt to move in that direction failed. Set one for all the ones in the area you are mapping. One basic one is
3) You can use the #TAG command to set the name of the room, or long description or exits. Here is an example:
4) Move very slowly through the area. You have to wait for the mapping to complete before you move. If you run too fast, it's a problem.
5) Edit your maps as you go. It's better to fix the problem with a room right then and there then edit a mistake later. Yes, this is tedious, but it happens.
6) There are some areas will require quite complicated logic in order to capture. In CMUD, I had to create my own custom map trigger in zscript. Here is an example of what I mean:
First, I had to create a variable with all the short names of the rooms in an area:
Second, I created a zscript trigger to find those rooms that matched the desciptions listed in @MatchingRooms variable (also have to take out the > prompt if it shows:
That trigger executes the following code which automatically adds north south east west as exits (since the room I was matching didn't show any obvious exits).
Then I had to eliminate those extra exits. I thought it easier to delete exits than to create them, and the mapper seemed to be happier about it.
Hope this helps as a starting guide. If you have any additional questions, please post here so that everyone can benefit from your questions and the answers.
You really have to play with it in order to get it to work correctly. Here are some of the rules of thumb mostly for Cmud users:
1) The biggest thing is to set the options in Genesis not to wrap.
Code: Select all
options screenwidth off
2) Set #NODIR triggers for all the "error" messages in movement. #NODIR tells the mapper that your attempt to move in that direction failed. Set one for all the ones in the area you are mapping. One basic one is
Code: Select all
There is no obvious exit*
Code: Select all
#TAG name %1
#Tag desc %2
5) Edit your maps as you go. It's better to fix the problem with a room right then and there then edit a mistake later. Yes, this is tedious, but it happens.
6) There are some areas will require quite complicated logic in order to capture. In CMUD, I had to create my own custom map trigger in zscript. Here is an example of what I mean:
First, I had to create a variable with all the short names of the rooms in an area:
Code: Select all
#VAR MatchingRooms {On the road|On the plans of Solamnia|etc...}
Code: Select all
^{~> |}({@MatchingRooms}).[a-zA-Z ,].[a-zA-Z ,]. (*)
Code: Select all
#Tag name %1
#tag desc %2
#TAG exit {north|south|east|west}
#OK
Hope this helps as a starting guide. If you have any additional questions, please post here so that everyone can benefit from your questions and the answers.