Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
mesla
Beginner


Joined: 21 Dec 2010
Posts: 11

PostPosted: Sat Aug 27, 2011 7:51 am   

Cmud Mapper need help
 
I was wanting to no if i could take this map http://flaprider.dyndns.org/~freld/icesusmap.html and use it as the world map on the maper.
Reply with quote
geniusclown
Magician


Joined: 23 Apr 2003
Posts: 358
Location: USA

PostPosted: Sat Aug 27, 2011 2:45 pm   
 
Not directly, no. But, assuming that each letter on the map is a room of the MUD, and also assuming that you can move to any adjacent land spot, it ~may~ be possible to write a script to convert the text map into a huge map for CMUD, but unless you go from room to room and map them to get the descriptions and names and such, you won't be able to take advantage of most of the features, and it will be very easy to get off so it shows you're in a room other than what you intend.

Here's some experimental code to get started to automate the conversion (it won't work as such, but perhaps with some tweaking...):
Code:
#ALIAS "ConvertMap" {
 #LOOP (%len(%1)) {#MAKEROOM e
  #SWITCH (%left(%right(%1,%i-1),1)
   ("^") {#TAG flag water}
   ("p") {#TAG flag plains}
   ("h") {#TAG flag hills}
   ("H") {#TAG flag highhills}
   (etc) {#TAG flag et cetera}
  }}


You would manually create a room to the left of where you want your map to start, then execute this alias for each line, and it should fill the whole row from left to right with rooms tagged with the terrain type. Perhaps some more code can be added to adjust movement points or do not enter flag etc, but I'm not entirely sure how. It can be tweaked to somehow do the entire map rather than line by line, but this is just to get you started.

Notes: The #LOOP will make it create a room for each character in the row fed into the alias. The #SWITCH (%left(%right(%1,%i-1),1) makes it check for the i'th character, then whatever it is sets the flag. If there's no difference between H and h hills on the map, you can do #SWITCH (%lower(%left(%right(%1,%i-1),1)) and just do the lower-case version of each possibility.

Good luck!
_________________
.geniusclown
Reply with quote
mesla
Beginner


Joined: 21 Dec 2010
Posts: 11

PostPosted: Sun Aug 28, 2011 4:07 am   
 
Thanks alot for helping me out. and yes all the letters are a room but ^
Most of the rooms have the same test. plains
You are walking on an open plain. The grass is mostly
low, with occasional tufts of longer grass. The ground is
flat and even all around, with no trees or hills in
sight. Occasionally you hear slight rustles as small
rodents move around in the grass, and high above your
head you can spot some big birds wheeling around the sky,
searching for prey. The sky is pitch black and the stars
shine down brightly. Little fluffy clouds drift lazily
overhead. It is somewhat bright here.
all plains say that maybe a few are not but 99% or plains are the same. Same with hills, water,so on
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net