deutsche Version
Application Information
tf Packages (german)
Mapper Home
Applet
Changes 8/3/99
Changes 6/17/99
Changes 5/6/99
Changes 4/26/99
Changes 4/3/99
Changes 3/22/99
The DoItYourself Mapper for MUDs written in Java (TM) Alpha Version
What for?
As I am frustrated drawing my maps with a pencil on a sheet of paper I started writing a software tool to make it easier.
The most annoying thing when drawing by hand were:
after having drawn the half map I noticed that some nodes did not fit forcing me to redraw the whole thing
there was no space for adding information to the nodes
if the regions of the mud changed afterwards I had to update, often redraw the maps
the maps (of one mud) are filling a whole notebook, when walking from one map to another I spend my time searching the right map
thats why I choose to add the following functionality to the mapper:
implemented:
maps containing nodes with exits connecting them
its possible to walk through the maps (mouse/direction commands/keypad)
3 dimensional map with one z-level displayed and the connections to other z-levels shown
each map can be connected to other maps; when choosing the connecting exit the map is automagically switched (the connection to other maps is shown as a yellow rectangle at the end of the exit)
new exits can be created interactively by walking through the map or if multiple exits shall be created by a command
special exits which are used by a command (in the map) are created with a direction given or a destination point with its map (also the way to connect maps)
its possible to remote control the mapper by issuing commands to a port (application only) (i will add some helper macros for tf)
nodes can be marked using the mouse
one-way exits are possible
there are multiple zoom levels (Mouse/Keyboard), its possible to move the view of the map without moving the actual node, centering around the actual node
removing of nodes and exits
its possible to add information to any node like name, p_short, p_long, node in my routing system, npcs, misc information, if the room was thoroughly examined) which are either visualised within the map or shown in a infoarea (this information can also be generated by a mud client like tf)
for adding information to a node additional self chosen keywords can be used, these are used as title strings in the info area
the commands DE (deleteExit), ae (addExit) now also work on all marked nodes, just use the option marked
the command cgrid creates a grid within the map
most of the usable directions were added (see navigation)
using the command ar (addReverse) rooms which have only one exit can easily replace that exit with a special exit with the given name (e.g. out, leave)
the information about npcs, houses, node names, portals, refresh possibilities, pubs, shops do now have a graphical representationwithin the map
Its now possible to set some options viaopt (Grid, numbers shown, max npcs level)
demonstration maps which demonstrate the functionality
Moving nodes within and between maps with the command MP
creation of nodes at any coordinates with the command an
splitting of a node into two nodes by exits using sn
to force thre replacement of exits (with "!") and the creation of nodes at coordinates already used by another node ("$"), the lenght of newly created exits can be given explicitely with n* see syntax
createion and updating of lpc code with template files
saving of the set options and adding of self chosen options see opt
Listing of nodes, which contain a given information keyword or step by step instruction listing for a number of nodes
the nodes which were visited (using tf) or which have information added are marked internally as visited. These visited nodes are displayed as a square in the map.
the internal attributes are saved in the coords file (marked nodes, visited nodes, overlapping nodes)
Help function in the Mapper using ? for all commands and some general info
a history for the commands of the Mapper (Arrow up and down)
partially working undo
new auxiliary functions for zooming, unzooming, moving the view and centering
new functions for marking and unmarking by command, with selection syntax like lna
the command mh for halving the scale of a number of (marked) nodes e.g. for buildings
go is able to jump to named nodes in other maps
when using asp the parameter -mmap can be spared if the node given at -p is a named node in an other map
save can save all maps at once when supplying the option "all"
DE also deletes named exit without any additional parameters
planned:
colored polygons in the map
remarks written directyl into the map
recalculation of the nodes when the map is having displaced nodes
integration in the routing system, by choosing a node the character in the mud is walking there
usage for lpc rooms, if wanted lpc code is generated for marked nodes
??your ideas
Here is the demo (almost)
General Information:
- Mac: the Alt modifier mentioned is the Option modifier
- Mac and everywhere: instead of the right mouse button (you might ask:What right button?) a double click is possible
- a virtual machine supporting jdk1.1 is required, there were problems with netscape not finding the class ActionListener used in jdk1.1
The graphical Map
the map is displayed on the largest area of the mapper
the sizes of the displayed symbols depend on the zoom factor
the actual node is shown as a green square
overlapping nodes are red, nodes whose scale was halved (buildings) are blue
if a node was already visited it is displayed as a rectangle (useful for new regions for showing which nodes were not visited by now).
beside the nodes their numbers and if available their names are displayed (dir ese)
normal exits are drawn middle grey, up exits light grey with a + (dir nne), down exits dark grey with a - (ssw), special exits red (special exits without a direction end dir nnw)
switching between maps is shown by a yellow rectangle at the end of a exit
npcs are display as little figures (sse), their color is the given level in relation to level 50, autoattack npcs are red, normal blue, and blocking npcs are wearing a "shield" (e.g. ai npc Guard (#A#B#L30) where Guard is the name of the npc, #A means autoattack #B means blocking and #L30 is level 30)
existing houses are displayed wsw
the existance of fillUps, pubs, shops is hinted by the letters (FPS) in direction ene
portals/teleporters at the actual node are shown as an arc (wnw)
overlapping nodes are displayed red and a little bit moved off their position (for accessing them or marking)
Keyboard usage:
Keybindings which have immediate effect
!!All immediate keys does only work if you select the drawing area. If the input field is selected the characters are inserted!
navigation:
like keypad 1-sw, 2-s, 3-se, 4-w, 6-e, 7-nw, 8-n, 9-ne for the directions, + for up, - for down
moving the view:
Ctrl+navigation keys: Moving the map in x/y/z direction
Ctrl+z: zoom
Ctrl+u: unzoom
Ctrl+c, Ctrl+m: center the map around the actual point
creation:
Alt+#
next single exit creation is oneway only
Alt+$
the next node is also created if a node exists at the coordinates
Alt+navigation keys
new exit in the given direction is crated (if there's a node a connection is made otherwise a new node is also created)
marking:
Shift+u
removes all markings in the actual map
Using the mouse
navigation:
right button or double click:
jumping to the clicked node
left button:
intended for interactive commands meanwhile output of information (screen coordinates, map coordinates, if found the node)
moving the view:
Ctrl+drag with left button pressed:
draw a zoom rectangle (zoom)
Ctrl+right button:
one zoom level back (Unzoom)
interaction:
Shift+left button:
mark/unmark of nodes
Shift+drag left button:
mark the nodes contained in the rectangle
commands: (option syntax == regexp)
syntax:
-d(#|x*|$|!)?(name|id): directionname (s e sw single word) or ID (special 0 for exits without a direction e.g. telporter or exits reaching over multiple nodes),
- if # is given the direction is only used in oneway (from the (actual) node to the other node) (otherwise both directions are used), when giving -d0 oneway is the default
- "x*" with x a number makes the next newly created exit has a length of x units (e.g. -d2*se creates an exit which is two units long to the direction se)
- "!" is used if an already exiting exits in the direction shall be overwritten with the new exit. (e.g. exit w to node 5 by exit w to node 28 asp -d!w -p28)
- "$" allows new nodes to be created at places where a node already exists (problem of overlapping nodes in a map) the new nodes is diplayed specially this is also usable with the command an
-m(name|id) name of the map (single word) or id (listed in title bar)
-p(name|id) name of the node (single word) or id (is shown in the map)
if a node of another map is given the -m option is required
for exits without a direction -d0 has to be used otherwise the direction can be given like -dse (southeast)
if the arguments are given without the mentioned options, than these arguments containing references to exits or nodes do just work for the actual map and no special exists can be used. but even there ids or names are possible (e.g. ae n nw s se u -> addExit north northwest ...)
when using the commands ae, DP, DE, MP, lpc the substring of "marked" necessary for identification can be used to have the command work on the marked nodes
Selection syntax for mark, unmark and lna
(all|map|level|region dx dy dz|((nodes|named) nodeid/name+)
options:
It is possible to use substrings of the options (e.g reg for region)
all: nodes on all maps
map: actual map
level: actual z-level
region dx dy dz: the nodes whose distance to the actual node is less or equal the given delta.(A cube with the double edge length around the actual node)
Example:reg 5 2 2: all nodes which are contained in the cube withe the edge lengths of (10,4,4) around the actual node
nodes, named nodename/id: the given nodes are tried for the selection
Example: named 1 2 tower bridge
navigation:
name of the exit/direction: n, se or name of the special exit (e.g. jump up) will result in navigation using the given exit/direction
the following exits are recognized:
sp, sw, ssw, s, sse, se, ese, e, ene, ne, nne, n, nnw, nw, wnw, w, wsw, u, d, swd, sswd, sd, ssed, sed, esed, ed, ened, ned, nned, ne, nnwd, nwd, wnwd, wd, wswd, swu, sswu, su, sseu, seu, eseu, eu, eneu, neu, nneu, nu, nnwu, nwu, wnwu, wu, wswu
special, southwest, southsouthwest, south, southsoutheast, southeast, eastsoutheast, east, eastnortheast, northeast, northnortheast, north, northnorthwest, northwest, westnorthwest, west, westsouthwest, up, down, southwestdown, southsouthwestdown, southdown, southsoutheastdown, southeastdown, eastsoutheastdown, eastdown, eastnortheastdown, northeastdown, northnortheastdown, northdown, northnorthwestdown, northwestdown, westnorthwestdown, westdown, westsouthwestdown, southwestup, southsouthwestup, southup, southsoutheastup, southeastup, eastsoutheastup, eastup, eastnortheastup, northeastup, northnortheastup, northup, northnorthwestup, northwestup, westnorthwestup, westup, westsouthwestup
g (nodename|id)
(Go) jumps to the given node
go (nodename|id)
(GoOther) jumps to the giben node, if the named nodes is not within the actual map all maps are searched for it.
sm (mapname|id)
(SwitchMap) switches to the given map, the last aktive node of that map is activated.
create:
asp -d(#|x*|$|!)?(directionid|-name|0) ((-m(mapid|-name))? -p(nodeid|-name))? (special name of the exit)?
(AddSPecial) adds the special exit using the given direction (or none if -d0), if no direction is given (-d0) it is required to supply a destination (node and/or map), that special exit gets the command given as last thing (e.g. go upstairs), for the parameters of -d see syntax. It can also be used to create an normal exit to a node which is more than one unit away (asp -ddirection -pnodeid) will do it
ae (((#|x*|$|!)?(directionid|-name)|marked) )+
(AddExit) exits are created for all given directions, if neccesary connected to existing nodes or nodes which were just created, with the option marked given all marked nodes are connected with the restriction that one node can only have one exit with the same name (direction). For the (#|x*|$|!) see syntax
ar special exit name
(AddReverse) if the current room has only one exit or one connection from another room the connection is created/replaced with one bearing the given special exit name (e.g. out, leave)
am mapname
(AddMap) a new map with the given name (single word) is created (if it does not already exist), it already contains the node 0
cgrid xpos ypos -sx width (-sy height)? (-di)?(CreateGRID) creates a grid within the map, the actual node has the given position in the grid (e.g. (0,0) bottom left, (width-1,height-1) top,right). If height is not given a quadratic grid is created. Givin -di also creates diagonal connection between the nodes.
an (-r(nodeid|name))? x y? z? $?
(AddNode) creates a new node
- -r if the coordinates give are a relative delta value to the given node, if none given to the actual node. Otherwise (no -r) the coordinates are absolute (!!!multiples of 2)
- x y? z? absolute coordinates or delta values, if y,z are not supplied they are set with useful values
- $ forces the creation of a new node even if there is already one at the given coordinates.
change:
MP (-a(nodeid/-name)?|-r((x*)?directionid/name)?)? (x|dx) (y|dy)? (z|dz)? (-m(mapid|name))? marked?
(MovePoint)
Moves the given nodes:
- the first parameter declares the movement as relative (-r) or absolute (-a). If absolute the node to which the new coordinates shall be given must appear behind the -a parameter (if none given the actual node is used)
- if behind -r a direction (with lenght factor) is supplied, this one is used.
- after that the new coordinates (to where the nodes are moved) or movement units (by which delta the nodes will be moved) shall appear. the first value is that of the x-direction the others (y/z) can be spared (they will be set to hopefully useful values).
Almost all nodes of the map sit on multiples of 2 (except the ones which origin from an exit like ese or nnw).
They visibility of the grid can be switched with the opt grid command
- if a map is given the nodes are moved there and deleted in the actual ma. the connections from nodes of the actual map to the moved nodes will change to map-switch connections
- if a substring of marked is given as last parameter, the marked nodes are moved otherwise the actual node will be moved
- Examples:
- MP -r2*se : moves the actual node by two units to southeast
- MP -a 6 2 : moves the actual node to the coordiantes 6 2 on the actual z level
- MP -a0 10 4 8 marked : moves the marked nodes that the node 0 sits on the coordinates 10 4 8 and the other nodes are moved relatively to that
- MP -r 4 2 marked : the marked nodes are moved by four units in x direction and by two units in y direction
- MP -a 2 2 -mtest marked : the marked nodes will be moved to the map named "test", so that the actual node has the coordinates 2 2 and the z level that was the last used in map "test"
sn ((directionid|name) )+
(SplitNode) splits the actual node into two nodes that the given exits belong to the new node and the remaining are left with the previous one.
This functionality gets useful when the recalculation of the map is implemented.
mh nodename/id
(MakeHouse) Using this command the scale of all marked nodes will be halved with the given node keeping its position. The inside of a building can be mapped that way without any intersection. The nodes get an additional flag that is displayed in the info as "building". Exits which are created from this node are also halved in scale to prevent intersections with outer exits. If an inner node has to be connected to an outer node asp -ddirection -pnodeid/name has to be used. The modified nodes appear blue in the map.
delete:
DE ((-d#?(directionid|-name|0) ((-m(mapid|-name))? -p(nodeid|-name))? (name of the exit)?)|(#?(directionid|-name) )+)
(deleteExit) deletes exits of the actual node for the given directions, a # before a direction causes only the exit from the actual node to be deleted otherwise both exits are deleted
Examples:
- DE n s e : deletes the exits n s e
- DE -ds : deletes the exit s
- DE -d0 jump : deletes the special exit named "jump"
- DE -ds -m1: deletes the exit s which switches to the map number 1
- DE -d0 -mtown teleport: deletes the special exit named "teleport" which switches to the map named "town"
- the destination nodes may be given, but if they have to be correct
- DE shout: deletes the exit shout
DP ((nodeid/-name|marked) )?
(DeletePoint) deletes the given nodes (if none given the actual node) or the marked nodes and all exits which go from this node(s) and to this node(s) (in all maps). The number of the node(s) is reused if new nodes are created later.
Other:
Q
Quit without saving (Save before)
save ((map )+|all)?
saves the map in files for coordinates, exits and information. If nothing is given the actual map, otherwise the given map and with all all maps are saved.
lpc (marked|map)?
creates or updates the lpc-files for the given nodes (marked, whole map or if nothing given for the actual node)
for that a template file is used that is supplied either for the map (named mapmapid_template.c (e.g. map0_template.c)) or for the mud (named template.c in the mud directory) or one for all muds in the maps directory. The template files are searched in the given order.
the naming conventions for the lpc files are mapname/mapname_nodeid|name.c (e.g. cave/cave_1.c or town/town_center.c)
by now the short and the long descriptions are set (and the other information for that tags exist in the file.
as example for a short description: /*short* to */ in the template is copied, decommented and a // $short$ is inserted before the change. Then #short# will be replaced by the short description.
the exits are created with AddExit, the reference files are referenced as "../map/maplpcfile.c" (e.g. "../town/town_center.c").
if a file for a node already exits it will only be updated
for that the regions between // $short$ and /*short* are deleted and created again. It is important, that changes that should not be deleted must be copied outside that region.
if other tags appear int the template file, and these tags appear as keywords for informations added with ai they will also be replaced.
if the tags and keys start with f_ an option is searched which has the same name, which is prepended before the information contained in the node. That can be an absolute path and in the information contained in the nodes only the filenames have to appear. E.g. keyword f_bsx: information in the node f_bsx="guard.bsx" option set f_bsx="/d/wonderland/mesirii/bsx" will be concatenated to "/d/wonderland/mesirii/bsx/guard.bsx" and that will be inserted in the template at #f_bsx#.
opt ((numbers|grid|vgrid|level maxlevel)|key value?)
Options: sets or switches the given options (sufficient substring are possible (e.g. opt num)):
- number Showing the node numbers
- grid Showing the coordinate system of the map (the nodes sit on coordinats which are multiples of 2 (except for directions like ssw, ene,...)
- vgrid Showing the coordinate system of the screen
- level maxlevel resetting the maximal level for the calculation of the color of the npcs(e.g. opt lev 100)
- self chosen keys can also be used. If a value is given it is set or replaced if none given the option will be deleted. The keys are for example used by lpc
- the options of the mud are saved into the file map.opts when the application is quit with Q. This is a text file which can also be edited.
ai (name|short|long|exa|ways|npc|house|port|tport|tank|pub|shop|selfchoosenkeyword) (text)?
(AddInfo) adds the given information to the actual node, the text ist directly used as string for display, if no text is given the acutal value of the attribute ist deleted. The named keywords are also used otherwise, the self choosen keywords (lots of them) not.
given keywords:
short, Short
long, Long
npc, NPCs
name, Name
ways, WayNode
exa, fully examined (details of the room)
house, Houses
tport, Teleport
port, Port
shop, Shop
pub, Pub
tank, FillUp
si (nodename|-id)?
(ShowInfo)shows the information for the given or if none given the actual node
lna keyword (all|map|level|region dx dy dz)(task)?
(ListNodeswithAttribute)
All nodes which contain the given information keyword are listed with the referred information, if they lie within the region.
region restrictions:
- all all maps
- map actual map
- level actual z-level
- region dx dy dz the nodes whose distance to the actual node ist less or equal to the deltas (a cube with the double edge lengths)
If task is given, the nodes are searched for keywords which start with the given keyword and end with a number. The contents of these keywords is displayed in the order of the numbers with the containing node (and map) behind. If a number was used twice only one of the nodes is considered
Example:
- lna house map: all nodes with houses in the actual map
- lna item reg 5 2 2: all nodes containing the keyword item, which are situated within a cube with the edge lengths of 10,4,4 around the actual node
- lna quest all task: all nodes of the complete mud map containing the keywords quest1..questxx in the order of the numbers with information, nodereference, mapinfo
? (keyword)?
Shows a helpwindow, which contains either the general help overview or a help text for the given keyword.
Arrow up and Arrow down
Pops up the recently used commands (no moving directions), which were used. The commands are saved just once, if the same command is executed a second time only the most actual reference is kept. There is no limit for the history size.
undo (number)?
the undo function takes back the result of the last (number) command(s). Some implementation details: the reverse actions to the last command are appended to the undo list and will be executed at undo. This is not as memory consuming as keeping the state of all of the maps after every command. Unfortunately it is quite complicated to define the reverse actions. Thats why this function has to be used carefully. BUT please test ist and report the errors (the output at the console of the mapper) to me. So I am able to improve that function
zoom [factor]
Zooms the given factor into the map.
unzoom [factor]
Unzooms the given factor out of the map.
moveview [count*]direction or mv [count*]direction
Moves the view in the given direction [number or one] times. All regular exits are allowed e.g. mv 5*wu or moveview 13*sswd ;)), the actual node keeps its position
center (node nodename/id|view x (y (z)?)?|screen x (y (z)?)?)?
Centers the view:
- if nothing given around the actual node
- node nodename/id: around the given node, may also be a (uniquely) named node of another map
- view x (y (z)?)?: Centers around the given coordinates (coordinate system of the nodes), the spared coordinates keep their values
- screen x (y (z)?)?: Centers around the given coordinates (screen coordinates except the z value), the spared coordinates keep their values.
03/18/2001 Michael Hunger Mesirii@mg.mud.de