Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Plugins ➜ Nick's Learning Mapper - Learning Info missing

Nick's Learning Mapper - Learning Info missing

You need to log onto the forum to reply or create new threads.

  Refresh page


Posted by Kaiju   (2 posts)  Bio
Date Sat 14 Mar 2026 11:02 PM (UTC)
Message
Hi,

Really loving the learning mapper and want to say thanks.

In the latest version, I can't find the code or the option to turn on the learning info stats to show the certainty percentages to matches to room name, description, etc.

They are shown in the example screenshots (with the option to turn the learning info on and off) but do not appear on my client with the downloaded version, is there something I am doing wrong?
Thanks in advance.
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #1 on Sun 15 Mar 2026 05:17 AM (UTC)
Message

Try:

mapper help

That leads you to:

mapper config

Then try:

mapper config show_info yes

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Kaiju   (2 posts)  Bio
Date Reply #2 on Sun 22 Mar 2026 12:56 PM (UTC)

Amended on Sun 22 Mar 2026 12:59 PM (UTC) by Kaiju

Message
thanks. I have since abandoned the learning mapper and am trying to adapt the Two Towers mapper..

I have trouble with duplicate rooms without vnums, so am trying to force override the mapper with some if statements and having a pre-fix in the room ID that is checked on checking 'expected_exit' prior to entering the room.

It is still work in progress but snip here..

snip:



-- -----------------------------------------------------------------
-- We have a room name and room exits
-- -----------------------------------------------------------------

function process_room_description (name, line, wildcards)
  if not dups then
    mapper_dups = "11"
  end -- If
  

  exits_str = trim (wildcards.exits)
  -- mapper.mapprint ("(Exits: " .. exits_str .. " ).")
  roomdesc = trim (wildcards.roomdesc)
  -- mapper.mapprint ("(Room desc: " .. roomdesc .. " ).")
  name = trim (wildcards.name)
  -- mapper.mapprint ("(Name: " .. name .. " ).")	
  
  -- ColourNote ("white", "blue", "exits: " .. exits_str)  -- debug
  
  -- generate a "room ID" by hashing the room description and exits
  uid = mapper_dups .. utils.tohex (utils.md5 (roomdesc .. exits_str))
  uid = uid:sub (1, 25)  

  -- break up exits into individual directions
  exits = {}
  
  for exit in string.gmatch (exits_str, "%w+") do
    local ex = valid_direction [exit]
    if ex then
      exits [ex] = "0"  -- don't know where it goes yet
    end -- if
  end -- for
		 
  if #name > MAX_NAME_LENGTH then
    name = name:sub (1, MAX_NAME_LENGTH - 3) .. "..."
  end -- if too long		 

  -- add to table if not known
  
    if expected_exit then
    -- dup handling
    mapper_dups = string.sub(expected_exit, 1,2)
	end -- If
	
	if mapper_dups == "00" then
	  current_room = expected_exit
	  uid = expected_exit
	  mapper.mapprint ("force duplicate: " .. expected_exit)
	else
			if not rooms [uid] then
				ColourNote ("cyan", "", "[" .. uid:sub (1, 8) .. "] Mapper adding room ".. uid .. ", name: " .. name)
				rooms [uid] = { name = name, desc = roomdesc, exits = exits, area = MUD_NAME }

				-- save so we know current room later on  
				current_room = uid

			else
				current_room = uid   	
				room_edit_area1 ()
				room_edit_name1 ()
  end -- If
  end -- If
  
  -- set default dups
  mapper_dups = "11"
  
  -- call mapper to draw this room
  mapper.draw (uid)

  -- try to work out where previous room's exit led  
  if expected_exit == "0" and from_room then
    fix_up_exit ()
  end -- exit was wrong
    
end -- Name_Or_Exits



-- -----------------------------------------------------------------
-- Duplicate room name and room exits
-- -----------------------------------------------------------------

function process_room_duplicate (name, line, wildcards)
  mapper_dups = "00" 
  local name = ""

  -- generate a "room ID" by hashing the room description and exits
  uid = mapper_dups .. utils.tohex (utils.md5 (roomdesc .. exits_str))
  uid = uid:sub (1, 25)  

  -- break up exits into individual directions
  exits = {}
  
  for exit in string.gmatch (exits_str, "%w+") do
    local ex = valid_direction [exit]
    if ex then
      exits [ex] = "0"  -- don't know where it goes yet
    end -- if
  end -- for
		 
  if #name > MAX_NAME_LENGTH then
    name = name:sub (1, MAX_NAME_LENGTH - 3) .. "..."
  end -- if too long		 

  -- add to table if not known
  if not rooms [uid] then
    ColourNote ("cyan", "", "[" .. uid:sub (1, 8) .. "] Mapper adding room ".. uid .. ", name: " .. name)
    rooms [uid] = { name = name, desc = roomdesc, exits = exits, area = MUD_NAME }


  else	
    room_edit_area1 ()
	room_edit_name1 ()
  end -- If

  
  -- set default dups
  mapper_dups = "11" 
 
  -- save so we know current room later on  
  current_room = uid
  
  -- call mapper to draw this room
  mapper.draw (uid)

  -- try to work out where previous room's exit led  
  if expected_exit == "0" and from_room then
    fix_up_exit ()
  end -- exit was wrong
    
end -- Name_Or_Exits

it runs off the following tagged trigger:



  </trigger>	
  <trigger
   custom_colour="2"
   enabled="y"
   lines_to_match="15"
   match="^(?P<name>[^\d\n]+)\n(?P<roomdesc>(?:\S.*\n)*)?Exits:\s*(?P<exits>.*)\Z"
   multi_line="y"
   regexp="y"
   script="process_room_description"
   sequence="100"
  >
    </trigger>	

Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


926 views.

You need to log onto the forum to reply or create new threads.

  Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.