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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Jim Vance
Beginner


Joined: 07 Dec 2006
Posts: 16

PostPosted: Sat Nov 08, 2008 5:02 pm   

Automapper: Changing an Existing Room's Name
 
Hello there,

I spent a fair bit of time looking for this problem, couldn't find a usable solution. So, here goes...

I have used the Automapper to create a medium-sized map database for a particular MUD.
This MUD uses two different methods for room descriptions, brief and verbose. Examples:

Brief
Code:
Shire Plains(n, w, e and s)


Verbose
Code:
    The gentle plains of the Shire stretch out, with their gentle
grasses and cool breezes.
The Great East Road continues north.
The sun shines brightly in the western sky.
A crystal clear sky hovers over the landscape, dotted with a few small clouds.
    The only obvious exits are north, west, east and south.


When I was first learning to use the automapper, it was easier for me to configure it using the verbose mode. However, the Room Name in the map database looks like this:

Code:
The gentle plains of the Shire stretch out, with their gentle


I have been able to change many of the Room Names by opening the map database with Access and replacing one string with another. However, there are some rooms that I would like to change with a simple script, and this is where I need the help.

I have created a trigger that recognizes the MUD's Brief Room Name, but I cannot get that value to alter what is stored in the map database. I have tried using the #TAG command and the %roomname() function, all with no result (both in the Follow and Map modes). The information given in the Help files says that %roomname can be used to "set" the Room name, but I am wondering if this is only for new room creation.

Please help? Right now the only way I can do this is through manually altering the values either through the Room Properties window, or through MS Access.
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Sun Nov 09, 2008 12:35 am   
 
Try unlocking the map first.

#CALL %maplocked(0)
#CALL %roomname(,"Shire Plains")
#CALL %maplocked(1)

Should do the trick. Obviously you would want to use a variable like %1 instead of a quoted string in your trigger.
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Sun Nov 09, 2008 3:15 am   
 
If you've changed your configuration so that the mapper is recieving the new name "Shire Plains" rather than the old name - or what it thought was the name - "The gentle plains of the Shire stretch out, with their gentle", then you can use the %roomload function to tell the mapper to reload the room name the next time you pass through that room. This will only work if the new configuration is properly capturing the name you want to use, though.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Jim Vance
Beginner


Joined: 07 Dec 2006
Posts: 16

PostPosted: Wed Nov 19, 2008 9:20 pm   
 
I forgot to say thank you, the script Arminas suggested works like a charm. Very Happy
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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