There are currently four map databases. One for Prime, Platinum, Shattered, and DragonRealms.
There is no way to merge map databases. That means, if two people are working on the Prime map database at the same time, they each end up with a different map database, and only one of them can be distributed to everyone else. To avoid this, you need to use the repository script to checkout the map database before you start mapping.
Step 1: Type ;repository checkout-mapdb
If this command succeeds, then it will download the current map database, overwriting any changes you may have saved before doing this command. This should ensure that the changes done by the last person to update the map database aren't lost. If the command fails because someone else has already checked out the map database, you'll have to wait. You won't be able to upload the map database until you've checked it out.
Step 2: Download the mapmap script if you don't already have it (;repository download mapmap)
Step 3: Set up mapmap
3a. Clear the tracking info such as boundaries, pending rooms, and finished rooms (type ;mapmap clear).
3b. Set up boundaries to keep the mapper in a specific area (go to as many rooms as needed and type ;mapmap boundary).
3c. Set the map to lazy mode so that it doesn't ignore the boundaries (type ;mapmap set lazy on).
Step 4: Go to a room inside your boundaries and start the mapper in map mode (type ;mapmap map). In this mode, the mapper searches out new exits, and is quite spamy.
Step 5: Start the mapper in fix mode (type ;mapmap fix). This mode tests exits discovered in map mode. If a movement fails, it deletes it. If the movement leads to a room other than what was expected, it will ask you if the two rooms are the same. This often happens because of changing day/night room descriptions. If the rooms are the same, tell the script (type ;send yes) and it will combine the rooms into one room number. If the rooms are not the same, tell the script (type ;send no) and it will delete the incorrect movement and add the newly discovered movement. If you are unsure, there's also the option to do nothing (type ;send ignore). Combining two rooms that are not really the same is a pain to fix.
Step 6: Add to narost (if needed or wanted)
6a. Add the image to the map database. Narost will only display images that are already in the map database. If the image is already in the map database because it's used by other rooms, move on to 6b. If not, save the image in the lich\maps directory, go to a room that will use the image, and type ;e Room.current.image = 'filename' # substitute the actual filename of the image, including the file extension, but without the path.
6b. Start narost in fix mode (;type ;narost fix)
6c. Bring up the image in narost. Right-click in the narost window, click on “view map” in the popup menu, and click on the image name that you'll be adding to.
6d. Move the image around to find where your current room goes.
6e. Hold down the Shift and Ctrl keys, click on the top left and bottom right corners of the room on the image, let go of Shift and Ctrl.
6f. If there are more rooms to add, move to the next room in game, go to step 6d.
6g. Save the map database (type ;e Map.save). While the mapmap script saves the map database every time it closes, narost does not. You can save the map database as often as you like if you are worried about losing your progress.
Step 7: type ;repository upload-mapdb
There... wasn't that easy?
Now, to make it more complicated..
Setting up boundaries really just marks the room as done. When the mapper ends up in that room, it will use go2 to find a room that has exits marked as pending. If the mapper is in lazy mode, it will exit when there are no more pending rooms. This can happen because of boundaries, or because it doesn't test, and usually can't discover mini-script movements. If the mapper is not in lazy mode, and it runs out of pending rooms, it will use go2 to find the nearest unchecked room, and continue from there. If you start the mapper in Wehnimer's, it's quite possible you could end up in The Rift or OTF. However, it would take a very long time to get there, since it will not get on the ferry towards EN or pass the ice towards Icemule (mini-script movements) until all of Wehnimer's is done (or as much of it as it can get to without using mini-script movements).
Mini-scripts are required for any movement that can't be done with a single command. Look at the known exits for some random room:
Code:
;e echo Room.current.wayto.inspect
--- Lich: exec2 active.
[exec2: {"6337"=>"south"}]
--- Lich: exec2 has exited.
From this room, there is only one exit. Moving south takes you to room number 6337. This is not a mini-script movement. The map database also needs to know how long it takes to get there, so it knows that the 15 movements it takes to get from Solhaven to the River's Rest bank is not closer than the 20 movements it takes to get to the Solhaven bank.
Code:
;e echo Room.current.timeto.inspect
--- Lich: exec2 active.
[exec2: {"6337"=>0.2}]
--- Lich: exec2 has exited.
This shows moving south takes 0.2 seconds. That's the default for simple movements. It's somewhat accurate when not using typeahead lines. It's more important that all the simple movements (assuming the movement doesn't cause roundtime or something) have equal weight than it is for them to be accurate to a hundredth of a second.
Now consider a movement where you have to search for something before you can move. The mapmap script is not going to discover new movements by searching. This sort of thing you have to add by hand.
First, find the room number of the room you'll end up in.
Code:
;e echo Room.current
--- Lich: exec2 active.
#1220:
[Vipershroud, Mossy Trail]
Huge conifers mixed with spreading deciduous trees block out most of the moonlight. Moss grows thickly on the tree trunks and carpets the barely discernible trail that pushes through the thorny undergrowth. To the southeast, the Vipershroud appears to thin, revealing patches of starry sky.
Obvious paths: north, southeast
--- Lich: exec2 has exited.
Then, go to the room where the movement will start. In this case:
Code:
;e echo Room.current
[exec2: #1219:
[Vipershroud, Edge of Settlement]
Cicadas and crickets fill the night air with insectile song. Moonlight illuminates a small path meandering southwest through the blackberry bushes toward the Elven Settlement, civilization and safety. To the northwest, the living wall of the Vipershroud forest presents an impenetrable blackness.
Obvious paths: southwest]
--- Lich: exec2 has exited.
All we need to do to get from one room to the other is search, and go path.
Code:
;e Room.current.wayto['1220'] = StringProc.new(“fput 'search'; move 'go path'”)
If it takes three seconds to search, and the standard 0.2 seconds for 'go path', set the timeto like this:
Code:
;e Room.current.timeto['1220'] = 3.2
If you're not standing in the starting room, you could also add the movement by specifying both room numbers:
Code:
;e Room[1219].wayto['1220'] = StringProc.new(“fput 'search'; move 'go path'”)
;e Room[1219].timeto['1220'] = 3.2
It is important that 1220 is in quotes. wayto and timeto are just hashes here, and the keys to these hashes need to be strings.
The quotes inside the StringProc.new might cause you problems. You're sticking code into a string. The code generally has strings of its own. Here you see double quotes on the outside, and single quotes on the inside. For simple things, it's good to stick to that.
You can test a StringProc before sticking it into the map database by doing something like:
Code:
;e StringProc.new("put 'look'").call
or
Code:
;e StringProc.new("haste = Spell[506]; haste.cast if haste.known? and haste.affordable? and not haste.active?; empty_hands; move 'climb boulder'; fill_hands").call
Just remember to remove the ;e from the front and the .call from the end before putting it in the map database.
When adding movements by hand like this, you are only changing the map database in memory. Remember to type:
to save your changes.
Mini-scripts are also needed when there are two identical rooms right next to each other. The solution might be as simple as StringProc.new("move 'east' while checkpaths.include?('e')"), but it can become quite complicated.
You'll notice that mapper is using the location verb.. a lot. There are two reasons for this. The one you might guess is that this information might eventually be used by bounty scripts. The other is to deal with duplicate rooms in different towns, such as the training cauldron room in most guilds. Using only the room title, description, and obvious exits/paths, you can't tell what town you're in, or what room you'll be in if you move out. But, knowing the results of the location verb of the room allows these rooms to get different room numbers and to be connected to the rest map database.
There is also a spot in the map database to save climate and terrain information for each room. At this point, I don't have a ranger and I'm not too worried about filling in that data.
You can ignore most of the rest of this thread. It was used to organize who was working on the map database, which is now done with the repository script.