Simple, Basic Mapping Script Thread
Re: Mapping
You can move rooms by changing their coordinates via the setRoomCoordinates() function
Re: Mapping
how does this work for a group of rooms? Do i add or subtract 1 to the axis i want to make room on? I think Chris dealt with it on his 3k script but i didn't really grasp the concept of what he was doing.
Re: Mapping
the crashes seem fine now i was on test 4b, it looks pretty great on test 5, thanks
Re: Mapping
Yeah, to shift rooms about, you add or subtract the coordinates - x to move left and right, y to move up and down, z to move the room on a different level.
Re: Mapping
Frankly, by far the easiest and best way to layout maps is to do the map layout manually with the visual map editor. A mapper script should do the basics, i. e. add a new room object in the right area at approximate coordinates and known room exits to other already known rooms. Then you do the map layout manually with the visual map editor tools like group selection, group spread, shrink etc. in order to get a both visually pleasing and geographically optimal result. All other attemps to do this fully automatically will inherently fail, because MUDs are notoriously illogical and unrealistic with respect to their maps, because there were no maps when the areas were originally created.
Re: Mapping
Thanks, I think I will use the visual map, as the coordinate system seems very complicated.
I tried to insert this line
if roomExists(roomID) then centerview(roomID); return; end
at the start of the script so I don't keep re-adding rooms I've already visited. However when I do this and then enter a new room the visual map explodes to the whole world map instead of just the area I'm mapping. If I walk back to the room I was just in it returns to normal. If I comment the line out again this doesn't happen. Any idea's?
Another problem is when I move rooms around using the right click menu and then walk into a new room, it plots the new room back at the old coordinates, how do I update the coordinates, also the room info at the top of the mapper stays fixed at the room I just moved.
I tried to insert this line
if roomExists(roomID) then centerview(roomID); return; end
at the start of the script so I don't keep re-adding rooms I've already visited. However when I do this and then enter a new room the visual map explodes to the whole world map instead of just the area I'm mapping. If I walk back to the room I was just in it returns to normal. If I comment the line out again this doesn't happen. Any idea's?
Another problem is when I move rooms around using the right click menu and then walk into a new room, it plots the new room back at the old coordinates, how do I update the coordinates, also the room info at the top of the mapper stays fixed at the room I just moved.
Re: Mapping
Looks like you have some logic problem in your script. centerview(17) will show the room with room id 17, i. e. it will show the area that has room 17 at the x,y and z coordinate of room 17 and the surrounding rooms on that particular z level. Make sure to read this first: http://wiki.mudlet.org/w/Manual:Technical_Manual#Mapper
We need to add a mapping howto, so this thread is kind of interesting with respect to what problems people run into that are not familiar with the mapper internals. Keep asking questions, but read the docs first + provide source code of your scripts if you have coding questions or post a package of your entire mapper script and server details of the MUD that you are playing if you have more complex problems.
We need to add a mapping howto, so this thread is kind of interesting with respect to what problems people run into that are not familiar with the mapper internals. Keep asking questions, but read the docs first + provide source code of your scripts if you have coding questions or post a package of your entire mapper script and server details of the MUD that you are playing if you have more complex problems.
Re: Mapping
Yes, I have read the docs but still struggling. Think I might try and start again. When I move a room with the mapper, it messes up the mapping from that point on. The Room info on the map stops updating and the new rooms plot to old coordinates. Could it be that when I move a room, the exit rooms coordinates from that room don't update as well, so when i walk into one of those exits it maps back to the exits original position. I think it might be this, but I don't have any idea how to update these from the visual mapper? Is it intended to map every room first and then move the rooms?
Re: Mapping
The visual map editor works correctly. You are messing things up somewhere in your script. If you don't show your script you won't get any help.
Re: Mapping
Here is the script, its mostly the aardwolf demo one posted on these forums.
It may be this line
setRoomArea(v,0) -- mark as unknown area for unknown rooms
Or I could be talking complete nonsense
Thanks for your assistance
When I do getAreaRooms(id) I get 28 rooms, I counted the rooms on the map, there are 28 rooms. There are no exit rooms shown on the map but I think they are getting created because when I do roomExists(3068) it says true even though the room doesn't display and I think the script gives that room some coordinates some are returned with getRoomCoordinates(3068). I think one of the properties a room needs to display is missing centerview(3068) causes the map to go funny, so the exit room doesn't display, so I don't move the exit when I move the parent room.
It may be this line
setRoomArea(v,0) -- mark as unknown area for unknown rooms
Or I could be talking complete nonsense
Thanks for your assistance
Last edited by Silvine on Mon Dec 17, 2012 7:50 pm, edited 1 time in total.