|
Jim Vance Beginner
Joined: 07 Dec 2006 Posts: 16
|
Posted: 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. |
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: 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 |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: 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.
|
|
|
|
Jim Vance Beginner
Joined: 07 Dec 2006 Posts: 16
|
Posted: Wed Nov 19, 2008 9:20 pm |
I forgot to say thank you, the script Arminas suggested works like a charm.
|
|
|
|
|
|
|
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
|
|