Mapper for Prophecy MUD

Posted by Nick Gammon on Wed 05 Feb 2020 12:11 AM — 1 posts, 7,229 views.

Australia Forum Administrator #0

Installation

First go to this page and download the three files mentioned: http://gammon.com.au/forum/?id=14607

Install as directed in that post.


Configuration

Copy/paste below into your command window (you can do the lot in a batch) to set various configuration options:

mapper config when_to_draw                             prompt
mapper config activate_description_after_exits         No
mapper config activate_description_after_room_name     No
mapper config add_newline_to_prompt                    No
mapper config blank_line_terminates_line_type          Yes
mapper config exits_on_room_name                       No
mapper config include_exits_in_hash                    Yes
mapper config exits_is_single_line                     Yes
mapper config prompt_is_single_line                    Yes
mapper config exit_lines_start_with_direction          No
mapper config sort_exits                               Yes
mapper config status_background                        black
mapper config status_border                            #1B1B1B
mapper config status_text                              lightgreen
mapper config uid_size                                 4
mapper config show_info                                No
mapper config show_warnings                            Yes
mapper config show_room_and_exits                      No

Prompt

Set your prompt to show the room name in square brackets, like this:

prompt <%h/%Hhp %m/%Mm %v/%Vmv %Xtnl [%r] >%c%c

You can add colours, but the trigger expects the prompt to look like that. If you want a different prompt, amend the trigger (below). The important things are:

  • That the trigger actually fires (temporarily set it to recolour the line to check that)
  • That the room name is captured as wildcard #1

Triggers

To help the mapper learn the room name the following trigger should be added to your world file.

See http://www.gammon.com.au/pasting for how to copy from below and paste into your world file.


<!-- All lines - suppress lines that are not descriptions -->

<triggers>
  <trigger
   enabled="y"
   keep_evaluating="y"
   match="*"
   name="All_lines"
   send_to="12"
   sequence="1"
  >
  <send>  

  -- after exits we don't have descriptions
  if have_exits then
    CallPlugin ("99c74b2685e425d3b6ed6a7d", "set_not_line_type", "description")
  end -- if

  </send>
  </trigger>

<!-- Exits -->

  <trigger
   enabled="y"
   keep_evaluating="y"
   match="[Exits: *]"
   name="Exits_line"
   send_to="12"
   sequence="100"
  >
  <send>  

  CallPlugin ("99c74b2685e425d3b6ed6a7d", "set_line_type", "exits", "%1")
  CallPlugin ("99c74b2685e425d3b6ed6a7d", "do_not_deduce_line_type", "exits")
  have_exits = true

  </send>
  </trigger>

<!-- Prompt -->

  <trigger
   enabled="y"
   match="^&lt;\d+/\d+hp \d+/\d+m \d+/\d+mv \d+tnl \[(.*)\] &gt;"
   name="Prompt_line"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  <send>  
  CallPlugin ("99c74b2685e425d3b6ed6a7d", "set_line_type", "prompt")
  CallPlugin ("99c74b2685e425d3b6ed6a7d", "do_not_deduce_line_type", "prompt")
  CallPlugin ("99c74b2685e425d3b6ed6a7d", "set_line_type_contents", "room_name", [====[%1]====])
  CallPlugin ("99c74b2685e425d3b6ed6a7d", "do_not_deduce_line_type", "room_name")
  have_exits = false

  </send>
  </trigger>
</triggers>

Training

Don’t bother training exit lines and prompts, as the triggers will override that. Train descriptions, and “do not move” lines.

Note: Because room names look very much like descriptions (they are adjacent and the same colour) then include the room names (the ones just above the descriptions) in the description training.


Save the map, and backups

The mapping database is saved in the plugin’s “state” file which is automatically saved when you save the world file. Thus you must make sure to save the current world file, in order to save the map (and the mapping corpus). Also you might want to save them separately as shown below just in case.

mapper export map
mapper export corpus

Example output