Below is my first attempt at a mapper for the Twin Two Towers MUD.
It certainly isn't perfect, but it might help others get further.
Basically the problem with a mapper is to detect unique rooms, and in the case of this MUD I fairly quickly stumbled into a place where each room had the same description, namely:
You stand in a very dark tunnel. All around you shadows hide
the sides of the walls. Every once in a while you pass a torch
which gives off a small amount of light that is consumed by the
darkness. In the distance you hear the dripping of water and an
occasional hammering of stone.
Also rooms don't seem to have names per se, so in the absence of a better idea I have put in the partial room hash (better than nothing, maybe).
To use, install as per the instructions below. Then you have to "teach" it by walking around. You should start to see squares appearing with you in the middle. You are best off backtracking as you enter each room. (So if you go west from A to B, it knows A leads to B. Then go back east again, so it knows B leads back to A).
This version just stores the map in the plugin state file. It could be modified to use a SQLite3 database, which would then let you share the map between different characters.
The only real change was to make a multi-line trigger that tries to detect room descriptions, namely starting with 4 spaces, then multiple lines, followed by "The only obvious exits are xxx" or "The only obvious exit is xxx".
To save and install the Two_Towers_Mapper plugin do this:
Copy the code below (in the code box) to the Clipboard
Open a text editor (such as Notepad) and paste the plugin code into it
Save to disk on your PC, preferably in your plugins directory, as Two_Towers_Mapper.xml
The "plugins" directory is usually under the "worlds" directory inside where you installed MUSHclient.
Go to the MUSHclient File menu -> Plugins
Click "Add"
Choose the file Two_Towers_Mapper.xml (which you just saved in step 3) as a plugin
Click "Close"
Save your world file, so that the plugin loads next time you open it.
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<muclient>
<plugin
name="Two_Towers_Mapper"
author="Nick Gammon"
id="565a2ddd934aca9913894ad4"
language="Lua"
purpose="Mapper for LOTR Two Towers"
save_state="y"
date_written="2010-08-30"
requires="4.51"
version="1.1"
>
</plugin>
<!-- Triggers -->
<triggers>
<trigger
enabled="y"
lines_to_match="10"
match="^\s{4}(?P<roomdesc>.*\n(\S.*\n)*)\s{4}The only obvious exit(s are| is) (?P<exits>.*)\.\Z"
multi_line="y"
regexp="y"
script="process_room_description"
sequence="100"
>
</trigger>
</triggers>
<aliases>
<alias
match="^mapper find ([\w* %d/"]+)$"
enabled="y"
sequence="100"
script="map_find"
regexp="y"
>
</alias>
</aliases>
<!-- Script -->
<script>
<![CDATA[
local MAX_NAME_LENGTH = 60
local MUD_NAME = "Two Towers"
require "mapper"
require "serialize"
require "copytable"
require "commas"
default_config = {
-- assorted colours
BACKGROUND_COLOUR = { name = "Background", colour = ColourNameToRGB "lightseagreen", },
ROOM_COLOUR = { name = "Room", colour = ColourNameToRGB "cyan", },
EXIT_COLOUR = { name = "Exit", colour = ColourNameToRGB "darkgreen", },
EXIT_COLOUR_UP_DOWN = { name = "Exit up/down", colour = ColourNameToRGB "darkmagenta", },
EXIT_COLOUR_IN_OUT = { name = "Exit in/out", colour = ColourNameToRGB "#3775E8", },
OUR_ROOM_COLOUR = { name = "Our room", colour = ColourNameToRGB "black", },
UNKNOWN_ROOM_COLOUR = { name = "Unknown room", colour = ColourNameToRGB "#00CACA", },
DIFFERENT_AREA_COLOUR = { name = "Another area", colour = ColourNameToRGB "#009393", },
MAPPER_NOTE_COLOUR = { name = "Messages", colour = ColourNameToRGB "lightgreen" },
ROOM_NAME_TEXT = { name = "Room name text", colour = ColourNameToRGB "#BEF3F1", },
ROOM_NAME_FILL = { name = "Room name fill", colour = ColourNameToRGB "#105653", },
ROOM_NAME_BORDER = { name = "Room name box", colour = ColourNameToRGB "black", },
AREA_NAME_TEXT = { name = "Area name text", colour = ColourNameToRGB "#BEF3F1",},
AREA_NAME_FILL = { name = "Area name fill", colour = ColourNameToRGB "#105653", },
AREA_NAME_BORDER = { name = "Area name box", colour = ColourNameToRGB "black", },
FONT = { name = get_preferred_font {"Dina", "Lucida Console", "Fixedsys", "Courier", "Sylfaen",} ,
size = 8
} ,
-- size of map window
WINDOW = { width = 400, height = 400 },
-- how far from where we are standing to draw (rooms)
SCAN = { depth = 30 },
-- speedwalk delay
DELAY = { time = 0.3 },
-- how many seconds to show "recent visit" lines (default 3 minutes)
LAST_VISIT_TIME = { time = 60 * 3 },
}
rooms = {}
valid_direction = {
n = "n",
s = "s",
e = "e",
w = "w",
u = "u",
d = "d",
ne = "ne",
sw = "sw",
nw = "nw",
se = "se",
north = "n",
south = "s",
east = "e",
west = "w",
up = "u",
down = "d",
northeast = "ne",
northwest = "nw",
southeast = "se",
southwest = "sw",
['in'] = "in",
out = "out",
} -- end of valid_direction
-- -----------------------------------------------------------------
-- We have a room name and room exits
-- -----------------------------------------------------------------
function process_room_description (name, line, wildcards)
local exits_str = trim (wildcards.exits)
local roomdesc = trim (wildcards.roomdesc)
-- ColourNote ("white", "blue", "exits: " .. exits_str) -- debug
-- generate a "room ID" by hashing the room description and exits
uid = 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
local name = string.match (roomdesc, "^(.-)[.\n]")
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", "", "Mapper adding room " .. uid:sub (1, 8) .. ", name: " .. name)
rooms [uid] = { name = name, desc = roomdesc, exits = exits, area = MUD_NAME }
end -- if
-- save so we know current room later on
current_room = uid
-- call mapper to draw this rom
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
-- -----------------------------------------------------------------
-- mapper 'get_room' callback - it wants to know about room uid
-- -----------------------------------------------------------------
function get_room (uid)
if not rooms [uid] then
return nil
end -- if
local room = copytable.deep (rooms [uid])
local texits = {}
for dir in pairs (room.exits) do
table.insert (texits, dir)
end -- for
table.sort (texits)
room.hovermessage = string.format (
"%s\tExits: %s\nRoom: %s",
room.name or "unknown",
table.concat (texits, ", "),
uid
)
if uid == current_room then
room.bordercolour = config.OUR_ROOM_COLOUR.colour
room.borderpenwidth = 2
end -- not in this area
return room
end -- get_room
-- -----------------------------------------------------------------
-- We have changed rooms - work out where the previous room led to
-- -----------------------------------------------------------------
function fix_up_exit ()
-- where we were before
local room = rooms [from_room]
-- leads to here
room.exits [last_direction_moved] = current_room
-- clear for next time
last_direction_moved = nil
from_room = nil
end -- fix_up_exit
-- -----------------------------------------------------------------
-- try to detect when we send a movement command
-- -----------------------------------------------------------------
function OnPluginSent (sText)
if valid_direction [sText] then
last_direction_moved = valid_direction [sText]
-- print ("Just moved", last_direction_moved)
if current_room and rooms [current_room] then
expected_exit = rooms [current_room].exits [last_direction_moved]
if expected_exit then
from_room = current_room
end -- if
-- print ("expected exit for this direction is to room", expected_exit)
end -- if
end -- if
end -- function
-- -----------------------------------------------------------------
-- Plugin Install
-- -----------------------------------------------------------------
function OnPluginInstall ()
config = {} -- in case not found
-- get saved configuration
assert (loadstring (GetVariable ("config") or "")) ()
-- allow for additions to config
for k, v in pairs (default_config) do
config [k] = config [k] or v
end -- for
-- and rooms
assert (loadstring (GetVariable ("rooms") or "")) ()
-- initialize mapper
mapper.init { config = config, get_room = get_room }
mapper.mapprint (string.format ("MUSHclient mapper installed, version %0.1f", mapper.VERSION))
end -- OnPluginInstall
-- -----------------------------------------------------------------
-- Plugin Save State
-- -----------------------------------------------------------------
function OnPluginSaveState ()
mapper.save_state ()
SetVariable ("config", "config = " .. serialize.save_simple (config))
SetVariable ("rooms", "rooms = " .. serialize.save_simple (rooms))
end -- OnPluginSaveState
-- -----------------------------------------------------------------
-- Plugin just connected to world
-- -----------------------------------------------------------------
function OnPluginConnect ()
from_room = nil
last_direction_moved = nil
end -- OnPluginConnect
-- -----------------------------------------------------------------
-- Find a room
-- -----------------------------------------------------------------
function map_find (name, line, wildcards)
local room_ids = {}
local count = 0
local wanted = (wildcards [1]):lower ()
-- scan all rooms looking for a simple match
for k, v in pairs (rooms) do
local desc = v.desc:lower ()
if string.find (desc, wanted, 1, true) then
room_ids [k] = true
count = count + 1
end -- if
end -- finding room
-- see if nearby
mapper.find (
function (uid)
local room = room_ids [uid]
if room then
room_ids [uid] = nil
end -- if
return room, next (room_ids) == nil
end, -- function
show_vnums, -- show vnum?
count, -- how many to expect
false -- don't auto-walk
)
end -- map_find
]]>
</script>
</muclient>
[EDIT] Amended to fix up problems with room detection. Also put room name on top of map.
It was sometimes getting extra spaces in room descriptions and thus treating the same room as two different ones.
Also now put the first 60 characters of the description, up to the first period, as the room name:
Also added an alias "mapper find x" where "x" is something you are looking for (eg. "mapper find inn").
Example output:
mapper find sign
This is the bank of Belegost is the room you are in
This is a cozy pipe shop, situated in a nook off the tunn... - 3 rooms away
This is the first sign of civilization that you have sigh... - 4 rooms away
There was 1 match which I could not find a path to within 30 rooms.
I also find that in places the mapper doesn't show the real situation because you are "lost" in tunnels. This particularly happens if multiple rooms have identical descriptions and exits.
For example:
You stand in a very dark tunnel. All around you shadows hide
the sides of the walls. Every once in a while you pass a torch
which gives off a small amount of light that is consumed by the
darkness. In the distance you hear the dripping of water and an
occasional hammering of stone.
The only obvious exits are west and east.
Now if you go west and get the same description it thinks you haven't moved. I suppose you expect this, because the MUD is trying to confuse you, and it succeeds. :)
But if you keep walking and escape from the maze it should re-synchronize OK.
Also added debugging message like this:
Mapper adding room 7C01B73F, name: You stand in a very dark tunnel
So if you see that, the mapper has added to its knowledge of the MUD layout.
I should point out that there is nothing in this plugin that is really specific to this MUD (apart from the layout of a room description). It doesn't use MXP, it doesn't use telnet negotiation. There is only a single multi-line trigger that tries to match a room description/exits line.
If you can adapt that trigger to suit your MUD you should be able to use it practically anywhere.
First off, let me give a very big thanks to every one helping me, especially those that actually took the time to go into the game...
Now, I did all this plus extra stuff that was directed to me to do. But when I go to File, Plugins... and then add the twin_towers_mapper, it says "unable to create the plugin save state file:"
Then "There was a problem loading the plugin"
There are two pages that pull up that covers the entire MUSHclient screen. One is white that I am assuming is what was copied from the notepad and then when I close that one there is an orange looking screen that says "Line 14: Plugin requires MUSHclient version 4.51 or above (problem in this file)" But as far as I know, the latest MUSHclient is 4.43...
So I updated the MUSHclient. Problem now though is that when I try to save it is fine, but when I try to add the plug in from the game file, it does not show at all. I double checked and at first could not find it in the game folder from desk top, but then looking under all files it shows it is already saved. I even resaved it and over write it. But in the game it does not show, even if I search under all instead of just XML. I even shut down and restarted MUSHclient more than once.
Jerrid said: Now, I did all this plus extra stuff that was directed to me to do. But when I go to File, Plugins... and then add the twin_towers_mapper, it says "unable to create the plugin save state file:"
Go into the plugins directory (<mushclient directory>/worlds/plugins) and create a new folder "state". Sometimes you have to do that manually, but it's a one-ime thing.
Jerrid said: Then "There was a problem loading the plugin"
There are two pages that pull up that covers the entire MUSHclient screen. One is white that I am assuming is what was copied from the notepad and then when I close that one there is an orange looking screen that says "Line 14: Plugin requires MUSHclient version 4.51 or above (problem in this file)" But as far as I know, the latest MUSHclient is 4.43...
That's a big pet peeve of mine. The version you first see on the download page is the so-called "stable" version. If you look really hard, there's a section that says "Want the very latest version?" that links you to the Announcements forum here.
Jerrid said: So I updated the MUSHclient. Problem now though is that when I try to save it is fine, but when I try to add the plug in from the game file, it does not show at all. I double checked and at first could not find it in the game folder from desk top, but then looking under all files it shows it is already saved. I even resaved it and over write it. But in the game it does not show, even if I search under all instead of just XML. I even shut down and restarted MUSHclient more than once.
I assume you're talking about the Open Plugin dialog. Plugins usually live in <mushclient directory>/worlds/plugins, so you'll want to put it there unless you have a good reason not to. That's usually whree the Open Plugin dialog goes first.
So I updated the MUSHclient. Problem now though is that when I try to save it is fine, but when I try to add the plug in from the game file, it does not show at all. I double checked and at first could not find it in the game folder from desk top, but then looking under all files it shows it is already saved. I even resaved it and over write it. But in the game it does not show, even if I search under all instead of just XML. I even shut down and restarted MUSHclient more than once.
Any suggestions?
You've lost me a bit with that. In the Plugins dialog (File menu -> Plugins) you just browse for where you saved the plugin file. Desktop, My Documents, whatever.
Jerrid said: So I updated the MUSHclient. Problem now though is that when I try to save it is fine, but when I try to add the plug in from the game file, it does not show at all. I double checked and at first could not find it in the game folder from desk top, but then looking under all files it shows it is already saved. I even resaved it and over write it. But in the game it does not show, even if I search under all instead of just XML. I even shut down and restarted MUSHclient more than once.
Attempted translation:
Jerrid said: So I updated MUSHclient. Problem now though is that when I try to save it is fine, but when I try to add the plugin from MUSHclient, it does not show up in the file browser at all. I double checked and at first could not find it in the MUSHclient folder from the Desktop, but then changing the file filter to "All files" it shows it is already saved. I even tried re-saving it again. But in MUSHclient it does not show up, even if I use "All files" instead of just XML. I even shut down and restarted MUSHclient more than once.
This brings up another point: Save it with a .xml extension. Make sure it doesn't have any hidden .txt extension, because Windows sometimes does that. Copy it into Wordpad and save it as .xml from there, I don't think it's as annoying.
I see... I thought I was suppose to save it under the games file plugin folder. But now I just saved it under desktop and loaded it from there and it works!!! Has a nice green glow to it. However, (And I think I read some where about this.) the map doesn't show previous rooms you were in unless you back out on purpose? Like if I go n, n, n, n, all I see is me not moving on the map screen. But if I were to now go s, s, s, s, I would see all four rooms... But if I were to now go e, I am on a screen with a single box, but I go back out where I came from, w, the entire map now shows up.
It even shows descriptions for the rooms which is nice! Is there a work around for the rooms not showing until I go back out where I came from though? Even if not, I do appreciate all that you have done. Should I or some one from here tell The Two Towers game that a map feature is now implemented for MUSHclient? Or does more work need to be done if such an announcement will be made?
PS. Does the map save it self or would I have to go through rooms again to redo it all? And I have also seen a "fat" arrow pointing up... what does that mean? After trying to go north an then back down it looks like a thicker line than the regular connecting lines for rooms... I have to go s, s, or n, n to get to the other room on the map screen. Perhaps because there is not much going on as in big descriptions like there would be normally? Also when I do go south the rest of the map besides the four adjoining rooms disappear until I go north and then all the map so far appears again. I go back south and again only the four adjoining rooms show.
Thank you again so much. I wish I could donate money for your hard work. I was not expecting people to actually go in game and so quickly! You deserve donations even before that for all the free stuff you have done, but I have no money... literally. But I can spread the word of MUSHclient and if you have a Facebook page I could link it etc.
I see... I thought I was suppose to save it under the games file plugin folder. But now I just saved it under desktop and loaded it from there and it works!!! Has a nice green glow to it. However, (And I think I read some where about this.) the map doesn't show previous rooms you were in unless you back out on purpose? Like if I go n, n, n, n, all I see is me not moving on the map screen. But if I were to now go s, s, s, s, I would see all four rooms... But if I were to now go e, I am on a screen with a single box, but I go back out where I came from, w, the entire map now shows up.
Yes that is expected behaviour, and I was trying to describe it, although it isn't easy until you see it.
Basically it doesn't assume that two rooms connect until you have gone back and forwards. eg.
Inn --> Courtyard
Now if you go from the Inn to the Courtyard it knows (next time you are in the Inn) that it leads to the Courtyard.
BUT - until you go from the Courtyard back into the Inn, it doesn't know it leads back. It could guess, but there are such things as one-way exits.
So once you go back, it then looks like:
Inn <--> Courtyard
Until that time you get a little arrow on the line, to show it is a one-way exit.
Jerrid said:
Does the map save it self or would I have to go through rooms again to redo it all?
It should remember everything if you have the "state" saving working. Try pressing Ctrl+S, if there is no error message, then it saved. Also try closing down, and restarting. Once you type "look" (so it knows where you are) you should see the whole map as at what you had last time.
Jerrid said:
And I have also seen a "fat" arrow pointing up... what does that mean?
It draws where you have been recently with thicker lines. This is useful once you have quite a few rooms on the map, the fatter lines shows where you have been walking. It thins out after about 5 minutes. This is so you might look up and say "oh I want to go back to where I was a couple of minutes ago" - so you look at where the thick line went.
Jerrid said:
Thank you again so much.
You are welcome, I hope you enjoy it.
And hopefully the plugin shows how to adapt the mapper to other MUDs as well.
Make sure you grab the updated plugin - I improved it since the first posting.
It should have version 1.1 near the top of it.
I do not see an upated plug in... unless you are not talking about what I had to copy and past into wordpad and then save it? When I go to the top of this thread it says version 1.0... so I am not sure I am understanding you.
Nick Gammon said: And hopefully the plugin shows how to adapt the mapper to other MUDs as well.
How would I do that? If I wanted to try another MUD how could I adapt it? Is it a simple process of changing one number to another or putting a / here or there or is there some serious coding and messing with a game to understand it? And even if it is simple... to me it would be hard. Hahahaha!
I can tell you one thing though... I am much more enjoying this game. Thank you!
Line in bold. Not the XML version which is still 1.0.
Jerrid said:
How would I do that?
That was really addressed at people who play other MUDs and have some experience doing regular expressions. Because each MUD is different it isn't usually just a "change one number" thing, unfortunately.
To help anyone who wants to edit the trigger, this is how it breaks down.
First, an example room description:
You stand in a very dark tunnel. All around you shadows hide
the sides of the walls. Every once in a while you pass a torch
which gives off a small amount of light that is consumed by the
darkness. In the distance you hear the dripping of water and an
occasional hammering of stone.
The only obvious exits are west and east.
Now to match that, the regexp looks like this:
match="^\s{4}(?P<roomdesc>.*\n(\S.*\n)*)\s{4}The only obvious exit(s are| is) (?P<exits>.*)\.\Z"
And each part means:
^ --> start of a line
\s{4} --> 4 spaces
(?P<roomdesc>.*\n --> a tag named "roomdesc" consisting of anything followed by a newline; and then ...
(\S.*\n)*) --> NOT a space, followed by anything, followed by a newline, zero or more times
\s{4} --> 4 spaces
The only obvious exit(s are| is) --> Literally: The only obvious exits are (or: exit is)
(?P<exits>.*) --> a tag named "exits" consisting of anything
\. --> a period (at the end of the exits)
\Z --> end of "subject" (that is, end of the multiple-line trigger)
So as a guide, you could make a regular expression along those lines that matches how your MUD's room descriptions look.
Quote: It should remember everything if you have the "state" saving working. Try pressing Ctrl+S, if there is no error message, then it saved. Also try closing down, and restarting. Once you type "look" (so it knows where you are) you should see the whole map as at what you had last time.
I use to cancel the saving, thinking it was going to over write the mapper and thus ruin it and I would have to wipe it clean and reinstall. But after reading the above quote I would close it and it would ask so this time I saved it on desk top, but it refused, some thing about error and state... so I got back in and I tried to do the CTRL S and this time I tried to save under the plugin folder, because that is the original screen that it asks me to save under. But I get the same error.
Just simply "state" or more to it? I saved it inside the plugin folder, but it still does not save, gives me the same error message... is it because I have the automapper actually on my desk top instead of inside the MUSHclient folder?
I don't think so... Maybe? Plugins normally go inside the MUSHclient/worlds/plugins folder, though.
Yeah, the folder is just named "state" (no quotes). It's where MUSHclient stores plugin save-state files. You might need to edit the folder permissions. It's really easy. Just right-click on the state folder and click Properties, then click the "Read-only" checkbox near the bottom so it's disabled.
Just simply "state" or more to it? I saved it inside the plugin folder, but it still does not save, gives me the same error message... is it because I have the automapper actually on my desk top instead of inside the MUSHclient folder?
I just tested under Windows 7, and I must admit it isn't quite doing what I thought it would.
It seems to be looking for a "state" folder (that is the name alright) in the same place as MUSHclient.exe (not where I thought, which is under the worlds/plugins folder).
So for now, find where MUSHclient.exe is, and then make a folder called "state" (without the quotes of course) in the same directory as MUSHclient.exe.
It's all to do with the recent change ... now who suggested it? ... that make the state file folder configurable, and is now stored in the preferences database.
In yours and my case, we already had the correct location there, but it seems the default for new installations does not match where the installer actually creates the folder.
It's all to do with the recent change ... now who suggested it? ... that make the state file folder configurable, and is now stored in the preferences database.
...
I've been yelling at you for years to stop writing to the Program Files directory. Not my fault that I have resorted to getting my way incrementally. :P
I don't put things in Program Files you know. The end-user does. And they get to choose where to put the files.
They can install on to the Desktop, My Documents, C:\MUSHclient, or wherever.
And in fact under Unix you do exactly that. You put "personal" downloads into your Home folder, and run it from there. I wanted to keep all the stuff together, just like the (good) old days.
Nick Gammon said: I don't put things in Program Files you know. The end-user does. And they get to choose where to put the files.
It's really not much of a choice when that's the default. :S End-users are pretty much trained to just click through the installer, and most programs are 'installed' to Program Files, so they think nothing of it and move on.
Quote: It's really not much of a choice when that's the default. :S
Err... what? You have total choice; most people simply choose not to exercise it (for the reason you gave). Saying that you have no choice in something because there's a default option (that you can change) is a little, uh, weird. :P
Woe be unto you the next time you even consider making a pedantic remark, Twisol, of the like you have made in the past. :-) Seriously, though: it doesn't make sense to say there's no choice here; the choice is a separate matter.
David Haley said: Woe be unto you the next time you even consider making a pedantic remark, Twisol, of the like you have made in the past. :-) Seriously, though: it doesn't make sense to say there's no choice here; the choice is a separate matter.
Couldn't resist. :) At any rate, I never said there's no choice. I said it's not much of a choice. My point is that relatively few users will actually make the choice; most will prefer to take the default.
To actually be effective, the default should be the user's Documents.
Nick Gammon said: *The help files are converted to run under Windows Vista/7
Good luck with that in a mere installation program.
Incidentally though, I've been looking at a Ruby utility called nanoc, and have been considering using it to build new-style HTML documentation. I'm still undecided, and I'm not sure how it would be structured.
I might have to make another YouTube video about how to install the client under Windows 7. It might humorously feature a sledgehammer, and a few kiyups (is that the right word?).
Ok, I have it working now and loading as it should. However, I am noticing, even if I do go in and out to make rooms appear, that the entire map area will not be filled up. Like you may see about five rooms max at any one time while others may be seven or so. It looks like the size of the blue map screen could hold at least eight more squares up or down or dozens more if they zig-zag inside of it. I am not sure if I am doing some thing wrong or the map just wont recognize the other rooms (Even though I have already been there and back again and again.) until I move back out and then I can see the rest of the rooms, but not what I was just in and their rooms. But if I were to go back to the room I just came from I have a different set of rooms connected.... in other words instead of seeing twelve rooms I only see five while in a certain room and then seven while in the other... but never the full twelve and all twelve should have no problem fitting into the map screen it self, unless the map screen has invisible boarders, but I highly doubt that is the case even if it does. In the cave maze to Belegost (Dwarven City) it was hard to navigate because only parts of the map were showing at any one time. Much better than nothing I can tell you! This would have been worse than the Prancing Pony... maybe weeks before I had found my way through!
Also Nick... I wanted to email or PM you personally, but I could not find a way to do so... so I will just do it here. I would rather say it than some one else, although I doubt you really care, but I would rather you get it from a grateful person than some one just trying to be a jerk. The name of the game is The Two Towers, not The Twin Towers. Again a typo that really does not affect the game, but I figured I would tell you in case you decided to actually include this some where for download for other players of The Two Towers to use. I first saw the mistake on the map it self, but disregarded it as my own fault. However, after seeing the thread title and how people describe the game I am assuming people think it is The Twin Towers when it is actually The Two Towers. Again nothing major, but I figured I would just let you know if you make it an official plugin.
Also I wanted to know, if you have not done so already, should I tell The Two Towers that there is an automapper for their game on MUSHclient? Am I allowed to tell the guy who was supposedly working on his own automapper that he could possibly find help here, since when I mentioned about making an automapper for another game or trying to improve upon this one you said you were speaking to those who are already familiar with coding or scripting.
I ask this because I know of others who would find this automapper a nice touch and I would hate to think that all this trouble went to one person, which was my self. I know of a friend who could use this, as well as others... maybe even the guy trying to make an automapper him self.
Like you may see about five rooms max at any one time while others may be seven or so. It looks like the size of the blue map screen could hold at least eight more squares up or down or dozens more if they zig-zag inside of it.
I think this is a side-effect of some rooms having the same description. If the rooms are unique, it can fill the window with them. But if a room is already drawn it won't draw it twice.
Jerrid said:
Also Nick... I wanted to email or PM you personally, but I could not find a way to do so... so I will just do it here. I would rather say it than some one else, although I doubt you really care, but I would rather you get it from a grateful person than some one just trying to be a jerk. The name of the game is The Two Towers, not The Twin Towers.
Oops. My bad. I fixed it up on page 1. Twins come in twos, right? I must have misread it.
Jerrid said:
Also I wanted to know, if you have not done so already, should I tell The Two Towers that there is an automapper for their game on MUSHclient?
Also in Belegost, although it may just be the same problem I already describe or for the same reasons you gave... since a lot of the tunnels have the exact same description, it looks like if I go south I am stuck in a room with the only exit is to go north again. So I do, but looking at the map, the room south from me shows there should be another exit to the south from there, but there is not. And all the other rooms that go south should also be able to go east a few times and each one also go south at least once.
I tried to hover my mouse pointer on the room to the south because it was showing me a different descritpion, like I was in the beginning maze tunnnel opposed to already in the city. A red error message came up and said I was unable to speed walk there when I had clicked on it. I was not worrying about speed walking just trying to see why it was showing a room to the south of the room south of me even though I knew there was not.
"Speedwalk failed! Expected to be in '2AD67D1349A49C3D2778FAA65' but ended up in '3C17363B32C275D0E641CAA4C'."
Well it's a side-effect of multiple rooms having the same description.
For example, using simple numbers, if you had rooms like this:
10 <--> 11 <--> 11 <--> 11 <--> 12
The rooms I call 11 in this example all have the same description, so they are given the same room ID.
Now depending on the order you visit them, it may think that west of room 11 is room 10 (from the left side) and right from room 11 is room 12 (from the right side).
But if you are in the middle room 11 and click on the room on the left, it expects to end up in room 10, but is still in room 11, hence the error message.
I can only suggest manually navigating your way out of such places, and hope the MUD doesn't have too many of them.
It might help if it didn't store that rooms lead to themselves (eg. west of 11 leads to 11) however in some MUDs rooms do just that, so that may cause other problems.
Is there a way to make the MUSHclient use the entire screen for the game/words? When I play MUDs on it and I fight, at least for this other game... I am only getting half of the screen used and I do not have a map for this one so that can not be the reason why. When I fight things, it all scrolls up so fast, it is hard to know what I am doing. Since I am only getting half of it, every thing is overwrapped or scrunched up... I am losing half the game due to the amount of stuff getting lost on screen.
Nick Gammon said: I'm not sure what you mean by this. Can you take a screenshot? The windows are all resizable.
I think he means to make the world document fill the whole screen, with no toolbars or borders in sight.
Assuming you haven't done something with them, do you see the three image toolbars above the output window? Each one should have a bumpy "tab" on the left side. You can grab that tab to move the toolbar around. What I would do (and have done) is move all of the toolbars onto the same horizontal line. And you can remove some of them if you want, too. Just click the View menu and de-select the ones you don't want.
I am not even sure how to do that... I am using a laptop... is there a Ctrl or Alt key combo? The easiest way to describe it though is that if you look at MUSHclient and it is open like a regular large window, only the half left of the screen is used, the half right side is just black.
Ok, I did what Twisol suggested, but that only gave me the very top with a little extra room, which actually does make it a little better. But I still have the entire right side not being used.
Oh, I thought the problem is that you didn't have enough vertical space. It's just not using all of the horizontal space?
Okay, try this. Go to Game -> Configure -> Output. See at the bottom, where it says "Adjust width to size"? Click that and hit OK.
Now, assuming the MUD doesn't wrap lines automatically at column 80 (for example), MUSHclient will try to take as much of the horizontal space it can without making things go off the right edge.
Well, if the server is wrapping the lines for you before MUSHclient gets them, you may be happy to know that you'll have the same problem in any other client too. >_>
Is there a way to fix that? I tried it on CMUD and it only uses half the screen and then I tried The Two Towers on CMUD as well and it only use half the screen too... and I made sure the mapper was off.
MUDs are "helpfully" wrapping for you. It is their nature. Some do it, some don't.
This isn't an easy problem to solve. If the MUD assumes you have an 80 character wide screen, when you can actually fit 300 characters, and it wraps at 80, you can't do much about it.
Neither worked. I asked some one in it and he said he did not think so, but I have been waiting for one of the creators to come on. But every time I see him he is AFK. So I have not gotten to ask. Are there any other tricks? Anyway to force it?
Try their help files. However if the messages are hard-coded with line breaks in them there isn't much you can easily do. You could take out the line breaks, sure, but then the whole output would be one huge mass of text.
Ok I asked one of the guys who takes care of the game. He says there is no wraping at 80. There also is no automatic wrapping either except for tells and out door maps. So I am not sure. He says he is not familiar with MUSHclient and the client he uses the entire screen gets used... I think I will retry messing with the properties of MUSHclient, but it did not work last time.
"Go to Game -> Configure -> Output. See at the bottom, where it says "Adjust width to size"? Click that and hit OK."
OK I did that, but am I missing a step? I have tried different variations when the first suggestion did not work. When I click "Adjust width to size" the number keeps going to 168, before it was at 80. I type in 300, but when I keep clicking "Adjust width to size" going back into it, it goes back to 168. Are there any steps I am missing or any other tabs I need to click on and adjust? Should any boxes be checked or unchecked?
Do I need to restart the client, which I did, or restart my computer? Are the changes suppose to be automatic and all text from now on will fit the entire screen? I keep typing look, but it is still compacted. If it works would all previous room descriptions automaticly get pushed out or would they stay the same due those parts were already used?
What exactly was suppose to happen? I saw the screen flash or the borders, but the exact same part of the screen is still used and there is a whole paragraph worth of it. The one guy I had asked before said it did wrap because it was old, but the guy who actually works on it says it does not and I kept asking in different ways to try and make my self clear.
Another window will open up (you may have to Ctrl+Tab to see it). It will look something like this:
Sent packet: 12 (6 bytes) at Monday, September 13, 2010, 4:45:55 PM
look.. 6c 6f 6f 6b 0d 0a
Incoming packet: 7 (1024 bytes) at Monday, September 13, 2010, 4:45:55 PM
.[33mTemple of T 1b 5b 33 33 6d 54 65 6d 70 6c 65 20 6f 66 20 54
hanatos..[37m..S 68 61 6e 61 74 6f 73 2e 1b 5b 33 37 6d 0d 0a 53
tanding in the m 74 61 6e 64 69 6e 67 20 69 6e 20 74 68 65 20 6d
iddle of the cen 69 64 64 6c 65 20 6f 66 20 74 68 65 20 63 65 6e
tral square of D 74 72 61 6c 20 73 71 75 61 72 65 20 6f 66 20 44
is, the city of 69 73 2c 20 74 68 65 20 63 69 74 79 20 6f 66 20
the dead, this.. 74 68 65 20 64 65 61 64 2c 20 74 68 69 73 0d 0a
temple is built 74 65 6d 70 6c 65 20 69 73 20 62 75 69 6c 74 20
in macabre parod 69 6e 20 6d 61 63 61 62 72 65 20 70 61 72 6f 64
y of classic imp 79 20 6f 66 20 63 6c 61 73 73 69 63 20 69 6d 70
erial architectu 65 72 69 61 6c 20 61 72 63 68 69 74 65 63 74 75
re. Raised on .. 72 65 2e 20 52 61 69 73 65 64 20 6f 6e 20 0d 0a
white marble ste 77 68 69 74 65 20 6d 61 72 62 6c 65 20 73 74 65
ps, the structur 70 73 2c 20 74 68 65 20 73 74 72 75 63 74 75 72
e is surrounded 65 20 69 73 20 73 75 72 72 6f 75 6e 64 65 64 20
by columns which 62 79 20 63 6f 6c 75 6d 6e 73 20 77 68 69 63 68
support a ..lof 20 73 75 70 70 6f 72 74 20 61 20 0d 0a 6c 6f 66
ty triangular ro 74 79 20 74 72 69 61 6e 67 75 6c 61 72 20 72 6f
of. Its ionic co 6f 66 2e 20 49 74 73 20 69 6f 6e 69 63 20 63 6f
lumns seem to wa 6c 75 6d 6e 73 20 73 65 65 6d 20 74 6f 20 77 61
rp as they climb 72 70 20 61 73 20 74 68 65 79 20 63 6c 69 6d 62
to the ..ornate 20 74 6f 20 74 68 65 20 0d 0a 6f 72 6e 61 74 65
ceiling high ab 20 63 65 69 6c 69 6e 67 20 68 69 67 68 20 61 62
ove. Painted on 6f 76 65 2e 20 50 61 69 6e 74 65 64 20 6f 6e 20
the ceiling is a 74 68 65 20 63 65 69 6c 69 6e 67 20 69 73 20 61
n effigy of Than 6e 20 65 66 66 69 67 79 20 6f 66 20 54 68 61 6e
atos ..standing 61 74 6f 73 20 0d 0a 73 74 61 6e 64 69 6e 67 20
before a maelstr 62 65 66 6f 72 65 20 61 20 6d 61 65 6c 73 74 72
om of writhing s 6f 6d 20 6f 66 20 77 72 69 74 68 69 6e 67 20 73
ouls, which by s 6f 75 6c 73 2c 20 77 68 69 63 68 20 62 79 20 73
ome strange law 6f 6d 65 20 73 74 72 61 6e 67 65 20 6c 61 77 20
of ..nature, app 6f 66 20 0d 0a 6e 61 74 75 72 65 2c 20 61 70 70
ear to flicker a 65 61 72 20 74 6f 20 66 6c 69 63 6b 65 72 20 61
nd shift as an e 6e 64 20 73 68 69 66 74 20 61 73 20 61 6e 20 65
ver-present fog 76 65 72 2d 70 72 65 73 65 6e 74 20 66 6f 67 20
traces across it 74 72 61 63 65 73 20 61 63 72 6f 73 73 20 69 74
s ..surface..[36 73 20 0d 0a 73 75 72 66 61 63 65 2e 1b 5b 33 36
m A colossal mar 6d 20 41 20 63 6f 6c 6f 73 73 61 6c 20 6d 61 72
ble statue of Lo 62 6c 65 20 73 74 61 74 75 65 20 6f 66 20 4c 6f
rd Thanatos upon 72 64 20 54 68 61 6e 61 74 6f 73 20 75 70 6f 6e
His throne of f 20 48 69 73 20 74 68 72 6f 6e 65 20 6f 66 20 66
lesh ..dominates 6c 65 73 68 20 0d 0a 64 6f 6d 69 6e 61 74 65 73
the area..[37m. 20 74 68 65 20 61 72 65 61 2e 1b 5b 33 37 6d 1b
[36m A large boo 5b 33 36 6d 20 41 20 6c 61 72 67 65 20 62 6f 6f
k bound in crack 6b 20 62 6f 75 6e 64 20 69 6e 20 63 72 61 63 6b
ed and fading bl 65 64 20 61 6e 64 20 66 61 64 69 6e 67 20 62 6c
ack leather sits 61 63 6b 20 6c 65 61 74 68 65 72 20 73 69 74 73
..at the base of 0d 0a 61 74 20 74 68 65 20 62 61 73 65 20 6f 66
the statue of L 20 74 68 65 20 73 74 61 74 75 65 20 6f 66 20 4c
ord Thanatos..[3 6f 72 64 20 54 68 61 6e 61 74 6f 73 2e 1b 5b 33
7m.[36m A sleek 37 6d 1b 5b 33 36 6d 20 41 20 73 6c 65 65 6b 20
black hound stan 62 6c 61 63 6b 20 68 6f 75 6e 64 20 73 74 61 6e
ds stone ..still 64 73 20 73 74 6f 6e 65 20 0d 0a 73 74 69 6c 6c
, ears perked an 2c 20 65 61 72 73 20 70 65 72 6b 65 64 20 61 6e
d alert..[37m.[3 64 20 61 6c 65 72 74 2e 1b 5b 33 37 6d 1b 5b 33
6m A radiant Sou 36 6d 20 41 20 72 61 64 69 61 6e 74 20 53 6f 75
l drifts here on 6c 20 64 72 69 66 74 73 20 68 65 72 65 20 6f 6e
a breathless wi 20 61 20 62 72 65 61 74 68 6c 65 73 73 20 77 69
nd, ..a silver n 6e 64 2c 20 0d 0a 61 20 73 69 6c 76 65 72 20 6e
imbus surroundin 69 6d 62 75 73 20 73 75 72 72 6f 75 6e 64 69 6e
g it..[37m...[1; 67 20 69 74 2e 1b 5b 33 37 6d 0d 0a 1b 5b 31 3b
34mYou see exits 33 34 6d 59 6f 75 20 73 65 65 20 65 78 69 74 73
leading.[0;37m. 20 6c 65 61 64 69 6e 67 1b 5b 30 3b 33 37 6d 1b
[1;34m north, ea 5b 31 3b 33 34 6d 20 6e 6f 72 74 68 2c 20 65 61
Incoming packet: 7 (69 bytes) at Monday, September 13, 2010, 4:45:55 PM
st, south, west, 73 74 2c 20 73 6f 75 74 68 2c 20 77 65 73 74 2c
and down.[0;37m 20 61 6e 64 20 64 6f 77 6e 1b 5b 30 3b 33 37 6d
.[1;34m..[0;37m. 1b 5b 31 3b 33 34 6d 2e 1b 5b 30 3b 33 37 6d 0d
. <.[31mdead.[37 0a 20 3c 1b 5b 33 31 6d 64 65 61 64 1b 5b 33 37
m> xx 6d 3e 20 ff ef
That will tell me if they are telling you the truth about the line-wrapping as I can see the linefeeds. (The '0d 0a' I put in bold are the linebreaks).
In my experience, alt-tab doesn't work between world windows in MUSHclient, only between top-level windows. Just click the de-maximize button at the upper-right corner of the window [1], then pull the sub-window around until you can see the debug output behind it. (Or click the minimize button right next to it.)
The one guy I had asked before said it did wrap because it was old, but the guy who actually works on it says it does not and I kept asking in different ways to try and make my self clear.
The guy who said it wrapped was correct.
In my case I had the output window wrapping at column 100, however the longest line there ("is likely a merchant selling things from here. Crates in groups") is only 64 characters.
So clearly the MUD is doing the wrapping, and there isn't a heap you can do ... unless for example room descs are always in that particular colour, then maybe you could throw away the wraps for that.
I would ask again (and maybe point them to this thread) if you can defeat or adjust the column the MUD wraps at, so you can use more of your client screen.
It does some pretty weird things too, for example: "0d 0d 0d 0d 0d 0d 0d 0d 0d 0d 0d 0d 0d 0d 0d 0d". That is a whole lot of carriage-returns. That doesn't do much. One might put the "cursor" back to column 1, but after that the extra ones are just wasting space.
They also put out colour codes for exits, even if the exit is spaces. (So you see nicely coloured spaces ... not).
Ok I asked one of the guys who takes care of the game. He says there is no wraping at 80. There also is no automatic wrapping either except for tells and out door maps. So I am not sure. He says he is not familiar with MUSHclient and the client he uses the entire screen gets used... I think I will retry messing with the properties of MUSHclient, but it did not work last time.
This fellow is incorrect. As you have it configured on the server (and maybe you can change that) it is clearly wrapping. Maybe on his client "the full screen gets used" because he only has an 80-character screen. Some MUDs have an option to disable server-side wrapping, I would ask again about that. But as received in your packet debug, the server is wrapping it.
I did some experimenting (changed Mushclient's wrapping and mailed myself a long string) and found that the server does not wrap except in tells and a few other cases. Virtually every line of text in the game is between 50 and 75 characters, though, so it's rare to encounter anything that would exceed 80.
I confess I don't fully understand this. The server does not wrap, but "virtually every line of text in the game is between 50 and 75 characters".
That sounds to me like it is wrapping, or a long room description would be much longer than 50 characters.
One point of confusion might be that the server may not wrap as text is being sent (hence tells might come out quite long), but the predefined descriptions for rooms (in area files) may have been entered with newlines at around column 70. So the server might technically not be wrapping, but it is sending lines that have been "pre-wrapped".
I understand what you are saying - the line breaks are in the area files, the server is not adding them "on the fly". However the fact remains that the line breaks are in the data as it arrives from the server. Whether the builder of the area put them in, or whether the server adds them at the last minute, the line breaks are there.
So, the client isn't adding them, is my point. The original question was:
Quote:
Is there a way to make the MUSHclient use the entire screen for the game/words?
The answer is, it isn't easy if the server has put the linebreaks there (at some point). The only real way of achieving it would be to "unwrap" the lines, and that requires some knowledge of context. Things like WHO lists, for example, would look stupid you just ran everything together.
I am using this plugin for my MUD. I managed to change the trigger and get it to work, however I have a few issues.
1) When I move to a new unexplored room, the mapper only shows a little square with that room. It does not link it automatically to the rest of the map because it seems to wait to see that I can move both directions before it draws a link between the rooms. I have to move back and forth to "connect" the room and display the whole map. Is it possible to make it draw the connection automatically?
2) When I add an exit to a room, it changes its ID. Then same problem as above: the map for the rooms that lead to this room still lead to the old room, and the map does not display.
3) Is there a command to change the background colour of the squares? e.g. yellow for a desert.
I am using this plugin for my MUD. I managed to change the trigger and get it to work, however I have a few issues.
1) When I move to a new unexplored room, the mapper only shows a little square with that room. It does not link it automatically to the rest of the map because it seems to wait to see that I can move both directions before it draws a link between the rooms.
No, because going east to a room doesn't necessarily mean going west from the new room takes you back to the old one. You have to "teach" the mapper by actually doing it.
LordOwl said:
2) When I add an exit to a room, it changes its ID. Then same problem as above: the map for the rooms that lead to this room still lead to the old room, and the map does not display.
What do you mean by "add an exit"? As a room builder? The mapper tries to generate room IDs by including the description and exits. If the descriptions are always unique then you could omit the exits. However you will still have problems if the description changes.
LordOwl said:
3) Is there a command to change the background colour of the squares? e.g. yellow for a desert.
On the GMCP mapper I did that because the MUD sent down terrain types. There isn't a command per se.
No, because going east to a room doesn't necessarily mean going west from the new room takes you back to the old one. You have to "teach" the mapper by actually doing it.
Everyone that has tested the mapper HATES it for this reason. They find it highly annoying that they have to run back to every square to "teach" the mapper. It wouldn't happen with the mapper of a graphical game where the map is drawn automatically.
Players prefer if the MUD doesn't have rooms like that or if the map is wrong for such odd/rare room.
Anyway, it took me forever but I figured it out myself how to fix this problem.
I changed the function process_room_description as
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
if ex == getReverseDir() then
exits [ex] = current_room
end -- if
end -- if
end -- for
with
function getReverseDir ()
if last_direction_moved == "n" then
return "s"
end
if last_direction_moved == "s" then
return "n"
end
if last_direction_moved == "w" then
return "e"
end
if last_direction_moved == "e" then
return "w"
end
end
Now for the background colour, I looked at the GMCP mapper. I see that I must deal with the values fillcolour and fillbrush, correct?
However, I tested it and tried to add the same fillcolour to all rooms:
It wouldn't happen with the mapper of a graphical game where the map is drawn automatically.
Graphical games don't have illogical room layouts, you couldn't draw them. Your fix sounds sensible for games that have logical layouts.
Quote:
function getReverseDir ()
if last_direction_moved == "n" then
return "s"
end
if last_direction_moved == "s" then
return "n"
end
if last_direction_moved == "w" then
return "e"
end
if last_direction_moved == "e" then
return "w"
end
end
Or:
reverse_direction = {
n = "s",
s = "n",
e = "w",
w = "e",
u = "d",
d = "u",
ne = "sw",
sw = "ne",
nw = "se",
se = "nw",
} -- end of reverse_direction
function getReverseDir ()
return reverse_direction [last_direction_moved]
end -- getReverseDir
Quote:
... but it doesn't do anything, what am I missing?
That code gets executed for new rooms (not ones already saved). You look like you are doing the right thing. Does it not work for new rooms?
Quote:
Is there a list of commands/variables for the mapper somewhere that could help?
The start of mapper.lua lists exposed functions and variables.
I'd like to start with saying how happy I am at finding this old post!
I was one of the traitors that used MUSHclient for about 7 years and then drifted over to the world of Zuggsoft for the shiny map, and now here we have a map of our very own.
I have played The Two Towers for about 10 years now, and I my aim now is get this map working and perhaps follow Fiendish footsteps in a T2T package for MUSHclient!
....time to learn lua!
I'm going to start by changing the main trigger that picks up an indented line, as the MUD uses 4 spaces for lots of things... gets confusing.
T2T has a brief mode and the room descriptions then look like this:
[code]A very dark tunnel(n and w)[/code]
Not only will these give you a room name, but the exits are a lot easier to strip out.
Would anyone be able to help me by converting the original two triggers that pick up the room name/exits into working on one trigger on the room brief?
As I said, I have no real experience of Lua, but a huge willingness to learn and a lot of time to put into this.
From having a play around I think the main issue has already been raised, that is the fact that if you have identically named rooms, the map won't always create as a new room.
I think an easy fix for this would be by -not- naming the rooms, and just giving them room IDs (which they get anyway). It would then be a simple case of making triggers for unique rooms to 'sync' the map to the correct room ID, or even manually adding unique room descs to the map. I fear that without finding a fix for multiple room names, this map will never stick.
Also is there any command to delete a room, if you make a mistake the only way I can see to rectify it is to start again.
Quote: I think an easy fix for this would be by -not- naming the rooms, and just giving them room IDs (which they get anyway).
I don't see any IDs in any of the MUD output shown in this thread. The only IDs are being generated by Nick's hash. The problem is hash collisions. You fix the problem by using more unique data in the hash. I have proposed a method below.
Nick Gammon said:
Also rooms don't seem to have names per se, so in the absence of a better idea I have put in the partial room hash (better than nothing, maybe).
The naive hash method described by Nick should be amended to include information from currently known connected rooms (uids and directions of known connected rooms at the time of construction should produce more unique hashes). This may also require storing meta information about which information was used in the hash. But off the top of my head I think it shouldn't.
You really want something like (note: this is code will not work without structural changes in the plugin)
realexits = {}
for k,v in pairs(room.exits) do
table.insert(realexits,k)
table.insert(realexits,v)
end
uid = utils.tohex (utils.md5(roomdesc .. exits_str .. table.concat(realexits,",")))
This of course requires that you have room.exits set up first.
Hi, back to mudding and scripting after a good 5 years and in that time forgot all I knew about coding. I have been working on getting this mapper to run in the MUD i've started playing on and while adjusting the multiline trigger I came across this weird aspect of the game. Basically it appends any new things onto the description and places mobs before the exits. I've not seen another mud do this. So my question is, is there a good way to exclude information from the trigger?
I just don't want the mapper thinking I walked into a new room and try to map it because a mob or an item is left on the ground.
Normal Empty Room
[Combat Practice Arena.]
Wooden golems line up from wall to wall, waiting for their next chance at combat. These magical creatures have been given the most basic of combat functions to provide novice adventurers with an opponent for testing.
Obvious Exits: southeast, northeast, and east.
Room with Mob
[Combat Practice Arena.]
Wooden golems line up from wall to wall, waiting for their next chance at combat. These magical creatures have been given the most basic of combat functions to provide novice adventurers with an opponent for testing.
Also here: a scrawny goblin-shaped wooden golem
Obvious Exits: southeast, northeast, and east.
Room with item drop
[Combat Practice Arena.]
Wooden golems line up from wall to wall, waiting for their next chance at combat. These magical creatures have been given the most basic of combat functions to provide novice adventurers with an opponent for testing. You notice a tin training dagger.
Obvious Exits: southeast, northeast, and east.
Room with item drop and mob
[Combat Practice Arena.]
Wooden golems line up from wall to wall, waiting for their next chance at combat. These magical creatures have been given the most basic of combat functions to provide novice adventurers with an opponent for testing. You notice a tin training dagger.
Also here: a scrawny goblin-shaped wooden golem, and a scrawny goblin-shaped wooden golem
Obvious Exits: southeast, northeast, and east.
Basically I want to exclude everything after "You notice" up to "Obvious Exits"
I'm sure there's probably an obviously easy way staring at me in the face.
It's for a new mud called Shattered Isles some old school mud friends of mine are developing from scratch. We all used to play Dragons Gate on Genie and then AOL back in the day. They don't have anything like GMCP messages which I already asked about and suggested especially since they plan on making the room descriptions change with the weather and time of day.
Is there a way to exclude the entire line similar to the (?!) regular expression used for a single word? I've been searching and can't find a suitable example.
Anything's achievable with enough effort. But these MUDs that spew out lengthy descriptions with one thing running into another (whilst they look less robotic) are a pain to interpret for mapping purposes.
And it seems to work. But I do have another question.
This mud is very fond of "hidden" exits in place of doors and gates and the mapper will treat them as new areas and not connect them. So I'll have a set of rooms up to a point and then like in the case of a shop, a standalone room.
[Pawnshop, Entrance.]
Sedrin's is quite possibly the busiest shop in the entire academy. Customers come and go at all hours of the day in hopes of selling their spoils from conquests beyond the safety of the academy walls. An iron-banded wooden barrel sits beside the door, collecting rainwater as it rolls off the roof. You notice an iron-banded wooden barrel, and an open sturdy oak door.
Obvious Exits: north.
HP: 185/185 ST: 136/136 DB: 10 192/401 south
[Sedrin's Pawnshop.]
The wooden walls of the shop are overly stocked with goods and equipment such as torches, tools, and pouches. Numerous wares have been haphazardly displayed behind a counter. A merchant graciously accepts coin in exchange for merchandise, even buying some used goods from willing suppliers. You notice an open sturdy oak door, a dented steel trashcan, and a wooden LIST sign.
Also here: a swift human merchant
Obvious Exits: none
Is there a way to connect areas? So I can speed
walk directly.