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
bitties
Beginner


Joined: 04 Jul 2011
Posts: 25

PostPosted: Tue Jul 05, 2011 3:00 pm   

Advanced CMUD Mapper issue
 
Hi All!

I've been working with the CMUD mapper for a few days now and it's been working great! But I have found one issue that has me stuck.
The MUD I play on has an elevator system that some zones use. The particular one in question has 3 floors, mf, b1, l2. The CMUD mapper (with a quick script, is able to get to b1 and l2 no problem. However, you get to one of those 2 floors, and try to get back to mf, the mapper gets confused and mistakenly marks you in a different location.

I think the problem is the exits. To exit the elevator to MF, you must go west, go exit the elevator to go to B1, you go south, and finally to go to L2, you must go west. I think this is where the issue lies. Since 2 different areas both use WEST to exit the elevator, the mapper automatically uses the first WEST everytime, so you're never able to get to the MF, it will always go to L2 because it's higher up on the list.

I tried to make this as clear as I could, please ask questions for clarification.

TL;DR, elevator has 2 different areas that use west as an exit, mapper incorrectly concludes the first area is the only west.

Thank you so much!

-Bitties
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4691
Location: Pensacola, FL, USA

PostPosted: Tue Jul 05, 2011 3:34 pm   
 
redefine it to NW or SW if those exits arent already taken, the jst but the actuaally west command in the name field
_________________
Discord: Shalimarwildcat
Reply with quote
bitties
Beginner


Joined: 04 Jul 2011
Posts: 25

PostPosted: Tue Jul 05, 2011 5:09 pm   
 
shalimar wrote:
redefine it to NW or SW if those exits arent already taken, the jst but the actuaally west command in the name field


Hey Shalimar-

I tried that, I don't think the directions matter, I tried using NE, and even other. I think the mapper messes up when the West command is run in the name field.

I think because the word 'west' is in the name field, it assumes there is only one possible west. And so it uses the first west in the list. It never gets down to the second possible west.
Reply with quote
Fizgar
Magician


Joined: 07 Feb 2002
Posts: 333
Location: Central Virginia

PostPosted: Tue Jul 05, 2011 5:50 pm   
 
I've run into an elevator system before myself. The way I handled it if I remember correctly was I set up a command input trigger that would fire when I selected the floor. A #waitfor in the trigger waited for the door opening message then moved me out of the elevator and set my position on the map with a #teleport command. I'll look through my backed up packages and see if I can find some examples if they are needed but it worked well I think.
_________________
Windows Vista Home Premium SP2 32-bit
AMD Athlon Dual Core 4400+ 2.31 GHz
3 GB RAM
CMUD 3.34
Reply with quote
bitties
Beginner


Joined: 04 Jul 2011
Posts: 25

PostPosted: Tue Jul 05, 2011 6:33 pm   
 
Fizgar wrote:
I've run into an elevator system before myself. The way I handled it if I remember correctly was I set up a command input trigger that would fire when I selected the floor. A #waitfor in the trigger waited for the door opening message then moved me out of the elevator and set my position on the map with a #teleport command. I'll look through my backed up packages and see if I can find some examples if they are needed but it worked well I think.
'

Interesting, I have a wait added in the trigger like you do, but I'm not familiar with the #teleport, I think that might solve my issue. Do you just do #teleport <room number>?

Thanks,

-Bitties
Reply with quote
Fizgar
Magician


Joined: 07 Feb 2002
Posts: 333
Location: Central Virginia

PostPosted: Tue Jul 05, 2011 7:00 pm   
 
Below is a class full of room scripts I had set up for one such elevator. Room 657, 3202, 3208, 3215, 3223, and 3228 were the"lobbies", when I entered those room a pickbox would come up asking if I wanted to board the elevator. Select yes and the script would send the push button command which fired the command input trigger for that room. The #waitfor waited for the doors opening message sent the correct direction to the mud to enter the elevator then teleported me to room 3229 on the map which I had set up as the elevator's room.

Once I entered room 3229 the enable script for that room threw up another pickbox where I could select which floor I wanted. Selecting a floor from that pickbox sent the command to the mud and fired a command input trigger for that particular floor's button command. That command input trigger had a specific #waitfor message that when triggered sent me in the correct direction the #teleported me to the proper room on the map.

The syntax is #TE vNum zone where vNum is the number the mapper uses for that room and the zone is the zone name the room is in. The script below won't be of any use since your rooms will have different numbers of course, but maybe it will give you a better idea of how things worked if you imported it into a blank session and took a look.

Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
  <class name="Mall of Mammon" copy="yes">
    <class name="Room657" keyword="Room657" enabled="false" copy="yes">
      <onenable>#pi {p:Call Elevator?} {Yes:push button}</onenable>
      <notes>Mall of Mammon - G floor lobby</notes>
      <trigger type="Command Input" priority="5760" copy="yes">
        <pattern>push button</pattern>
        <value>#waitfor {The elevator doors open to the east.}
#send east
#te 3229 Mall of Mammon</value>
      </trigger>
    </class>
    <class name="Room3215" keyword="Room3215" enabled="false" copy="yes">
      <onenable>#pi {p:Call elevator?} {Push Button:push button}</onenable>
      <notes>Mall of mammon - 3rd floor loby</notes>
      <trigger type="Command Input" priority="5670" copy="yes">
        <pattern>push button</pattern>
        <value>#waitfor {The elevator doors open to the east.}
#send e
#te 3229 Mall of Mammon</value>
      </trigger>
    </class>
    <class name="Room3229" keyword="Room3229" enabled="false" copy="yes">
      <onenable>#pi {p:What floor?} {G:push g} {1:push 1} {2:push 2} {3:push 3} {4:push 4} {5:push 5}</onenable>
      <notes>Mall of Mammon - Elevator</notes>
      <trigger type="Command Input" priority="5690" copy="yes">
        <pattern>push g</pattern>
        <value>#waitfor {The elevator stops at the ground floor, and the doors open to the west.}
#send west
#te 657 Mall of Mammon</value>
      </trigger>
      <trigger type="Command Input" priority="5700" copy="yes">
        <pattern>push 1</pattern>
        <value>#waitfor {The elevator stops at floor 1, and the doors open to the west.}
#send west
#te 3215 Mall of Mammon</value>
      </trigger>
      <trigger type="Command Input" priority="5710" copy="yes">
        <pattern>push 2</pattern>
        <value>#waitfor {The elevator stops at floor 2, and the doors open to the west.}
#send west
#te 3208 Mall of Mammon</value>
      </trigger>
      <trigger type="Command Input" priority="5720" copy="yes">
        <pattern>push 3</pattern>
        <value>#waitfor {The elevator stops at floor 3, and the doors open to the west.}
#send west
#te 3202 Mall of Mammon</value>
      </trigger>
      <trigger type="Command Input" priority="5730" copy="yes">
        <pattern>push 4</pattern>
        <value>#waitfor {The elevator stops at floor 4, and the doors open to the west.}
#send west
#te 3223 Mall of Mammon</value>
      </trigger>
      <trigger type="Command Input" priority="5740" copy="yes">
        <pattern>push 5</pattern>
        <value>#waitfor {The elevator stops at floor 5, and the doors open to the west.}
#send west
#te 3228 Mall of Mammon</value>
      </trigger>
    </class>
    <class name="Room3208" keyword="Room3208" enabled="false" copy="yes">
      <onenable>#pi {p:Call Elevator} {Yes:push button}</onenable>
      <notes>Mall of Mammon - 2nd floor lobby</notes>
      <trigger type="Command Input" priority="5780" copy="yes">
        <pattern>push button</pattern>
        <value>#waitfor {The elevator doors open to the east.}
#send east
#te 3229 Mall of Mammon</value>
      </trigger>
    </class>
    <class name="Room3202" keyword="Room3202" enabled="false" copy="yes">
      <onenable>#pi {p:Call Elevator} {Yes:push button}</onenable>
      <notes>Mall of Mammon - 1st floor lobby</notes>
      <trigger type="Command Input" priority="5800" copy="yes">
        <pattern>push button</pattern>
        <value>#waitfor {The elevator doors open to the east.}
#send east
#te 3229 Mall of Mammon</value>
      </trigger>
    </class>
    <class name="Room3223" keyword="Room3223" enabled="false" copy="yes">
      <onenable>#pi {p:Call Elevator} {Yes:push button}</onenable>
      <notes>Mall of Mammon - 4th floor lobby</notes>
      <trigger type="Command Input" priority="5820" copy="yes">
        <pattern>push button</pattern>
        <value>#waitfor {The elevator doors open to the east.}
#send east
#te 3229 Mall of Mammon</value>
      </trigger>
    </class>
    <class name="Room3228" keyword="Room3228" enabled="false" copy="yes">
      <onenable>#pi {p:Call elevator?} {Yes:push button}</onenable>
      <notes>Mall of Mammon - 5th floor lobby</notes>
      <trigger type="Command Input" priority="5840" copy="yes">
        <pattern>push button</pattern>
        <value>#waitfor {The elevator doors open to the east.}
#send east
#te 3229 Mall of Mammon</value>
      </trigger>
    </class>
  </class>
</cmud>
_________________
Windows Vista Home Premium SP2 32-bit
AMD Athlon Dual Core 4400+ 2.31 GHz
3 GB RAM
CMUD 3.34
Reply with quote
bitties
Beginner


Joined: 04 Jul 2011
Posts: 25

PostPosted: Tue Jul 05, 2011 8:14 pm   
 
Wow, that is really awesome. Thank you for posting that. Instead of using #waitfor like you do, I just through in an random number, yours makes way more sense. When you create this, you don't use the GUI? I haven't seen my map written out like this before, so I think I understand what I'm looking at for the most part, but still a bit confused.

Thanks!

-Bitties
Reply with quote
Fizgar
Magician


Joined: 07 Feb 2002
Posts: 333
Location: Central Virginia

PostPosted: Tue Jul 05, 2011 8:32 pm   
 
To make the room triggers I right click on the room I want to make triggers for, then click on properties. When the Room Properties box pops up click on the tab with the pistol icon, then click on the edit scripts for this room button. That will open the package editor up and create a new class under the map object. The class will be named Room## and the number will be the vNum the mapper uses to identify that room. That class will be enabled when you enter the room and disabled when you leave it. Anything you want to happen when you enter or leave a room can be added into the box of the Enable Script (when you enter), or Disable Script (when you leave) tabs. Any other triggers, aliases, ect. that you only want enabled in that room can be created in that rooms class just like you would any other time. Hope that helps a little more.
_________________
Windows Vista Home Premium SP2 32-bit
AMD Athlon Dual Core 4400+ 2.31 GHz
3 GB RAM
CMUD 3.34
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue Jul 05, 2011 8:41 pm   
 
FYI, #teleport and other location-dependant commands can use the room shortname (in the Room Properties window, it's a small textbox to the right of the Room Name textbox; use %roomid() to retrieve it via script) instead of the room number. This will prevent your scripts from breaking if something ever happens to the order of the roomkeys.
_________________
EDIT: I didn't like my old signature
Reply with quote
bitties
Beginner


Joined: 04 Jul 2011
Posts: 25

PostPosted: Tue Jul 05, 2011 8:45 pm   
 
Thanks guys! I'm going to make those changes tonight and let you know the results.

Thanks again!

-Bitties
Reply with quote
bitties
Beginner


Joined: 04 Jul 2011
Posts: 25

PostPosted: Wed Jul 06, 2011 12:10 am   
 
bitties wrote:
Thanks guys! I'm going to make those changes tonight and let you know the results.

Thanks again!

-Bitties


It worked! Thanks for the help guys!

Now, I have what is probably a very simple question. How do I set recall? Is there a way for the CMUD mapper to recognize when I type recall, and start from the recall point? Whenever I hit recall, it doesn't realize I'm in the start zone anymore.

Thanks for your continued help!

-Bitties
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Jul 06, 2011 1:59 am   
 
go to the room you want to be recall and make sure it's selected. Choose Set Recall Location from the Actions menu in the mapper window. Make an alias or oninput trigger for the recall command and use the #RECALL command there.

Alternatively, just trigger on the recall command and use #TELEPORT.

If your game implemented GMCP, don't worry about any of the above since GMCP support in CMud will keep track of your location for you at all times (except when the vnum is purposefully not sent).
_________________
EDIT: I didn't like my old signature
Reply with quote
bitties
Beginner


Joined: 04 Jul 2011
Posts: 25

PostPosted: Wed Jul 06, 2011 7:20 pm   
 
MattLofton wrote:
go to the room you want to be recall and make sure it's selected. Choose Set Recall Location from the Actions menu in the mapper window. Make an alias or oninput trigger for the recall command and use the #RECALL command there.

Alternatively, just trigger on the recall command and use #TELEPORT.

If your game implemented GMCP, don't worry about any of the above since GMCP support in CMud will keep track of your location for you at all times (except when the vnum is purposefully not sent).


Works perfectly! Thanks Matt. My next question though, is there a way to check the number of null links, so I can go back and map anything I might have missed?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Jul 06, 2011 9:04 pm   
 
You have to build a script for that one, and unless you want to specifically limit yourself to the current zone you will most definitely want to take advantage of threading. Threading is a quick and easy way to lock up CMud tightly enough to require the use of the Task Manager to kill it, so if you aren't comfortable with threading issues you should avoid threading--it's never a matter of if something will go wrong, but when.
_________________
EDIT: I didn't like my old signature
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4691
Location: Pensacola, FL, USA

PostPosted: Wed Jul 06, 2011 9:16 pm   
 
for simple threading, just put it into an alias that starts with:
#WAIT 0
That forces it to make a thread to run it without as much chance of messing things up
_________________
Discord: Shalimarwildcat
Reply with quote
bitties
Beginner


Joined: 04 Jul 2011
Posts: 25

PostPosted: Thu Jul 07, 2011 1:01 am   
 
Fizgar wrote:
To make the room triggers I right click on the room I want to make triggers for, then click on properties. When the Room Properties box pops up click on the tab with the pistol icon, then click on the edit scripts for this room button. That will open the package editor up and create a new class under the map object. The class will be named Room## and the number will be the vNum the mapper uses to identify that room. That class will be enabled when you enter the room and disabled when you leave it. Anything you want to happen when you enter or leave a room can be added into the box of the Enable Script (when you enter), or Disable Script (when you leave) tabs. Any other triggers, aliases, ect. that you only want enabled in that room can be created in that rooms class just like you would any other time. Hope that helps a little more.


Hey Fizgar,

I tried to adjust my elevator triggers from #wait 7500 to #waitfor {MUD elevator message}, but it doesn't seem to ever hit that trigger. Could you show me what you put into the room trigger to see what I'm doing wrong?

Thanks!

-Bitties
Reply with quote
Fizgar
Magician


Joined: 07 Feb 2002
Posts: 333
Location: Central Virginia

PostPosted: Thu Jul 07, 2011 4:08 am   
 
Code:
<trigger type="Command Input" priority="5840" copy="yes">
        <pattern>push button</pattern>
        <value>#waitfor {The elevator doors open to the east.}
#send east
#te 3229 Mall of Mammon</value>
      </trigger>

That's an example of how I used the #waitfor command with the elevator doors opening message. That trigger would reside in the class of the room that has the button I pushed to summon the elevator.
_________________
Windows Vista Home Premium SP2 32-bit
AMD Athlon Dual Core 4400+ 2.31 GHz
3 GB RAM
CMUD 3.34
Reply with quote
bitties
Beginner


Joined: 04 Jul 2011
Posts: 25

PostPosted: Thu Jul 07, 2011 2:37 pm   
 
Fizgar wrote:
Code:
<trigger type="Command Input" priority="5840" copy="yes">
        <pattern>push button</pattern>
        <value>#waitfor {The elevator doors open to the east.}
#send east
#te 3229 Mall of Mammon</value>
      </trigger>

That's an example of how I used the #waitfor command with the elevator doors opening message. That trigger would reside in the class of the room that has the button I pushed to summon the elevator.


Hey Fizgar,

It's most likely my own mistake, but I tried to copy and paste the relevant information into my room trigger, but it doesn't seem to activate. I changed the #waitfor {} information with the message the elevator says, and change east to south. I removed the #te. It currently looks like this:

<trigger type="Command Input" priority="5840" copy="yes">
<pattern>press 1</pattern>
<value>#waitfor {The elevator door hisses open to the south.}
#send south</value>
</trigger>

Can you see any reason why this wouldn't work?

Thanks,

Bitties
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Thu Jul 07, 2011 9:11 pm   
 
If you remove the #te, the mapper's position might not update...
Reply with quote
bitties
Beginner


Joined: 04 Jul 2011
Posts: 25

PostPosted: Sat Jul 09, 2011 9:20 pm   
 
Daern wrote:
If you remove the #te, the mapper's position might not update...


Hey Daern-

While that is true Daern, the problem I am having is that the trigger never fires. I try to have it go in the direction that the elevator door opens, but it just never seems to fire for some reason. I've tried using the #print command to see whether or not the trigger fires, and it never seems to get there. I'm not sure what I'm doing wrong.

Thanks!

-Bitties
Reply with quote
bitties
Beginner


Joined: 04 Jul 2011
Posts: 25

PostPosted: Sat Jul 09, 2011 11:23 pm   
 
I have a separate question and hopefully this is an easy question.

I have a portal room in the mud, each portal goes to a different zone. I use #TE <zone name> to enter the zone. The only problem is the name of all the zones overlap, is there a way to fix this? I can take a screenshot if my description wasn't good enough.

Thanks!

-Bitties
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sun Jul 10, 2011 1:50 am   
 
First off, in the room properties window on the Exits tab is a textbox with the caption of Label. This is the text shown for zone links and zone links only (if it's to a room in the same zone then the text is never displayed). If left empty, the text shown is to zonename which you've already discovered can be rather inconveniently lengthy. If you fill in this field, it shows exactly what you typed.

Secondly, which room that you first fill in the label for matters. This is the room that controls the "sameness" of the zone link (in other words, editing the label from this room will automatically assign the same label text to the other side of the link). Once created, you can flip over to the other side of the zone link and change the label text so that it no longer matches what you originally typed. Make no mistake that this is in fact a bug, but the jury is still out as to whether or not it will or should become a supported feature (this will be decided when Zugg one day gets back to focusing on the mapper code).

Thirdly, if all the link labels go to the same zone but connect to different parts you can just use a space or an otherwise shorter description (ie, "ditto") for the link label. Alternatively, you could simply uncheck the Draw Link checkbox. This will make the link look like a stub exit, so you might find it useful to also turn on the Show Untested Links as Grey option in the Appearances section of Map Configuration.

Fourthly, use a legend built with text fields and set the link labels to something that doesn't overlap other labels. Keep in mind that the zone boundery calculations do NOT respect the locations or dimensions of any sort of text item set upon the map (zone link labels, room labels, or text fields.) Text fields are entirely separate from room objects, they do not scale with the zoom level, and even though you can select rooms and text together you can only move text objects or room objects.
_________________
EDIT: I didn't like my old signature
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