Caled Sorcerer
Joined: 21 Oct 2000 Posts: 821 Location: Australia
|
Posted: Fri Dec 07, 2007 7:21 am
z(C?) Mapper thread. Building from a different format |
From the MyMuds.com thread, this was a derail.
| Quote: |
| I'm also keen to see cMapper, or whatever it gets called in the end. I'll probably be away and unable to use it, but I have these maps written for Imapper (mudbot, third party mapper) and the information is written into a text file. The maps are pretty complete, but I believe it should be possible, with the right triggers set up, to generate a map in cmapper just by reading that text file. |
Reply from Rorso
| Quote: |
The iMapVery Happy file format doesn't look too complicated from a quick look at it. It would be great if Zugg included import/export functionality for that file format into cMapper. If there are a lot of maps in that file format it makes sense because it would add a lot of value to cMapper. Talking about file formats it could also be interesting if cMUD supported area-files of different popular MUD codebases as well. |
Reply from Larkin
| Quote: |
It would be cool if we could make our own cMapper plugins that translate file formats and distribute those plugins to people who play our games. It would take off some of the load for Zugg to make a dozen different import functions and allow us flexibility in our formats and distribution. |
Reply from Tech
| Quote: |
I'm loving all of these ideas... especially a plug-in importer. My guess it shouldn't be too hard. Worst case you could do it as a CMUD plugin that did the import for you. If you're really a glutton for punishment you could probably get it done using stander zScript/Lua commands and the API for the mapper. |
Reply from Zugg
| Quote: |
Feel free to send me some files, or give me a link to the iMap file format. It is certainly something that I can consider supporting. |
Me again
| Quote: |
| Quote: |
AREA
Name: Prelatorian Highway.
ROOM v1
Name: North of Trees.
Type: Road
E: north 10
E: southeast 9
E: south 625
E: southwest 8356
EJ: southwest 1
ROOM v2
Name: Nearing the Liruma scrublands.
Type: Road
E: north 47
E: southeast 25
E: south 198
E: west 3
ROOM v3
Name: Highway north of the Aureliana.
Type: Road
E: east 2
E: south 828
E: west 4
ROOM v4
Name: Passing the Aureliana Forest.
Type: Road
E: east 3
E: northwest 5 |
Naturally, there is more to it (room types as shown in 'survey' are declared, special exit messages declared, etc. I figured though, that just some triggers and the api could build the basic map, and I could work through the list of special exits manually. There are a few issues I haven't gotten my head around yet, but its a project for another day so I haven't really gotten into it. |
Reply from Vigilante
| Quote: |
Actually, I could probably write a full script to do it. My existing complete mapper override scripts already handle collision and xyz placement. Making a script to completely build out the map becomes sort of an issue of delaying some rooms until you know where to place them. For example from the little snippet you provided the map would start at room 1 then delay 2-8 and put room 9 to the southeast of room 1. It would probably be an interesting problem to do, and not really something I want to tackle right now. |
Reply from Rorso
| Quote: |
It is very simple to generate a map from a textual description. I did it like this for my own mapper. First you just start at first room. Enter all neighbour rooms and their coordinates in a queue. Then pop room from queue, and add its neighbours to the queue and repeat until done. Special care for non connected rooms needed. So it is like a graph search with the goal condition that all nodes have been visited. |
Me again
| Quote: |
It occurred to me that with cmapper using the same sql database as the rest of cmud, it would be a very simple set of triggers to capture the information in that text file to the database.. and that is the end of it. No need to control the mapper through api commands or write a plugin to create the rooms with the commands that form the mapper module, just fill up the database directly?
I don't know how well or even if the mapper could then display these rooms visually though? |
Reply from Zugg
| Quote: |
No, just modifying the mapper database directly won't be enough. You'd have to close and re-open the map to get it to display in the mapper window. The whole point of the API is to provide ways to modify the map *and* properly update the screen display and the internal cache. The mapper isn't drawn directly from the SQL...that is too slow. The database is always cached in memory, just like with the settings database for the normal CMUD settings editor. |
Reply from Seb
| Quote: |
Just briefly then, I think Caled would be OK with building his map offline, with the mapper closed. So I reckon it would be possible to do it via the database, but you'd need a good understanding of how that works first, and that's going to take some digging around, experimentation, and, I expect, false starts. |
|
|