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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
harley
Apprentice


Joined: 05 Apr 2008
Posts: 121

PostPosted: Sat Sep 18, 2010 10:02 pm   

[3.27] [BUG] %walk()
 
this is an alias I use for almost every speedwalk in aardwolf:
Code:
#exec %replace( %replace( %replace( %replace( %replace( %walk( $RoomKey), ".", "ru "), "(", ";"), ")", ";ru "), "ru ;", ""), "maze;", "maze ")
#raiseevent startSpeedwalk {%roomkey()}
#te $RoomKey
#raiseevent endSpeedwalk {%roomkey()}


this stopped working with 3.26, and after reading I assumed that it would be fixed in 3.27. Its not however..
Any suggestions?

UPDATE:
when I input
Code:
#say %roommode

it outputs
Code:
0


The way I use the alias is 'rrun 12345' and it runs to 12345.
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Sun Sep 19, 2010 8:43 am   
 
Are you using roomkeys or roomnum? It looks like you are passing %roomkey. Roommode 0 uses vNums. You need to change roommode to 1 if you are going to use roomkeys.
Reply with quote
harley
Apprentice


Joined: 05 Apr 2008
Posts: 121

PostPosted: Sun Sep 19, 2010 4:39 pm   
 
roommode 1 didnt work either, didnt know there was a difference..
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Sep 20, 2010 5:18 pm   
 
I cannot reproduce any problem with this. As OldGuy mentioned, check the value of your $RoomKey to make sure it is a proper room "key" value. If it is a "key" value (the number shown in the bottom right corner of the Room Properties window when clicking on a room), then you should set:

#CALL %roommode(1)

If you are using the vNum of a room (shown in the "Other Properties" tab of the Room Properties window), then you should set:

#CALL %roommode(0)

For example, if I am in the Aardwolf room "The Aylorian Bank of Ivar" I can do the following:
Code:
#CALL %roommode(0)
#SHOW %walk(215)  // displays .3en
#CALL %roommode(1)
#SHOW %walk(32472)  // displays .3en

to get the speedwalk directions to the room "One-Eyed Lester's Platemail Armory". The #215 is the Room Key in my map (which will change depending upon your map database, so your room key might be different). The #32472 is the vNum of the room, as sent via GMCP, so this should be the same for you unless you haven't remapped the room yet. If you haven't remapped with GMCP yet, then just use your existing vNum and it will also work.
Reply with quote
harley
Apprentice


Joined: 05 Apr 2008
Posts: 121

PostPosted: Mon Sep 20, 2010 6:16 pm   
 
would you recommend remapping with gmcp?
I'm by no means savvy with scripting, the majority of my scripts I got from a friend who no longer plays.
Can I map an area, yes, but I don't know how to with gmcp.

Thanks.

I think the problem i'm having, is that my portals arent working correctly anymore.. for instance all my portals have the 'valid zone' and it has -1.
I changed this to 1, but it doesnt seem to be helping. :)
should I re-add all my portals?
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Sep 20, 2010 6:39 pm   
 
You shouldn't need to re-add your portals, but I am not able to reproduce a problem with portals, so I'll need more specific details about your portals, how they were created and how you are using them.

You don't need to "remap". Simple walk through an area with the mapper in Map mode and CMUD will automatically bring in the GMCP data from the MUD (assuming the mud supports GMCP). When you do this, CMUD will automatically update the vNum fields and the Name/Exits to match the data sent from the MUD via GMCP. So it should be transparent to the player. You can turn on the "Color rooms without Real vNum" option in the Mapper Options/Appearance page to see which rooms you still need to walk through.
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Mon Sep 20, 2010 6:50 pm   
 
The issue I've found with walking through an area in Map mode is that if the mud has changed any of the room names you are walking through, CMud will create a new room instead of moving you into the incorrectly named existing room. This is why I do the updates to my map by myself. Doing it myself I get to determine whether I'm in the correct room and whether to update the mapper information.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Sep 20, 2010 7:00 pm   
 
Well, of course it will. How is CMUD supposed to know that the room name has changed and that it's not a new room name. In fact, even you are making an assumption that your map is correct and that the MUD hasn't change the layout of the map. How do you know it's really the same room as before if the name is different? Trying to do it yourself will run into the same issues that CMUD itself has with this. There is no correct answer and neither you nor CMUD can be absolutely sure what has changed on the map.

My advice above was for *most* CMUD users. ReedN, you are not "most" CMUD users. For the vast majority of players, just walking through the MUD in Map mode is what you want to do. If CMUD makes a new room, then you simply Merge it with the previous room just like when you created the map for the first time. Most users cannot handle the advanced scripts that you would need to have to try and handle this automatically, since even then the scripts would probably still fail now and then.

My point above was that you don't need to re-map from scratch, or delete portals, or anything drastic like that.
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Mon Sep 20, 2010 7:12 pm   
 
Your point is taken on what most CMud users should do. I agree that most users should stick to your suggestion.

However, I disagree strongly when you say I can't accurately know whether I'm in the correct room, albeit with an incorrect name, or not. There are many items I use to determine this:

- Does it match if I lower-case both? If so then they just changed the case on some letters. No need to create a new room in this case, just update the name.
- Does the room have the same exits as the compared room? If so then it's probably the same room but with an updated name. No need to create a new room in this case, just update the name.
- Is the name the same but not all the exits match up? If so then I'm in the proper room but I'll want to update the exits.

Most changes in the mud are in capitalization or altering the name of the room. Next most common are new exits being added. In very few instances is it that the mud has actually changed the layout of the map. With a few very simple tests I'm able to get it right 99.9% of the time. This is a vast improvement over what I get with the built in exact case name check done by CMud in Map Mode.

Additionally and probably the most important feature is that I don't have to be in Map Mode all the time to catch new changes made to the mud. With your method you'd need to periodically walk around in Map Mode to catch these changes. In my case I simply walk around and I automatically integrate the changes into my map. Anything more complicated gets my attention with #say commands that alert me to changes that I need to be involved in deciding how to fix.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Sep 20, 2010 7:33 pm   
 
CMUD ignores the exit information when matching the room name. It's very common for exits to come and go (or get hidden/unhidden) so CMUD will not create a new room if just the exits don't match. It's only the change in room name that will cause a new room to be created. From what you are saying, perhaps CMUD needs a matching mode where it compares the room name without caring about the upper/lower case of the letters?
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Mon Sep 20, 2010 8:20 pm   
 
Testing for case changes would catch many cases I see.

An option for a secondary match on exits wouldn't hurt either. What I mean by secondary match for exits is that, for example, if the room name doesn't match only then will it compare the exits. If all the exits are exactly the same then just change the room name. This way the only time room exits are checked is if the roomname mismatches in the first place. The worst case scenario is that the roomname mismatches and the exits don't exactly match either and in that case you do exactly what you were doing before, create a new room when it shouldn't. Best case is that after seeing a mismatch in the name it sees all the exits matching and correctly renames the room instead of creating a new room. By only doing the exits check when the room name mismatches it will ignore the problematic cases where exits come and go.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Sep 20, 2010 9:12 pm   
 
No, I do not plan to just check the exits. There are too many cases on MUDs where the exits would be different in the same room, or the same exits but in different rooms. I played with exits way back at the beginning of the zMUD mapper and they were completely unreliable for mapper operation. Updating the room name just because the exits are the same is a really bad idea on most muds. This case really needs human intervention to determine if you are in the correct room or if you are lost.
Quote:
By only doing the exits check when the room name mismatches it will ignore the problematic cases where exits come and go.

No, because it could easily also mean that you are lost on the map. For example, a single wrong direction "you can't do that direction" without a #NODIR trigger could completely screw it up and start causing all of your room names to be overwritten. Especially in an outdoor zone where every room has the same n,s,e,w directions.

Definitely not something I'm messing with this close to a public release. I'm already violating my rule about changes before a public release for some of your other issues.
Reply with quote
harley
Apprentice


Joined: 05 Apr 2008
Posts: 121

PostPosted: Mon Sep 20, 2010 11:52 pm   
 
FYI zugg, I readded my portals and is working as expected.
Really thought it was a bug.. but portals just broke..
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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