|
kyran64 Beginner
Joined: 18 Feb 2008 Posts: 11
|
Posted: Wed Apr 18, 2012 6:25 am
How to retrace steps with CMUD mapper. |
So, I've sifted through the help content and searched the forum, but I haven't seen exactly what I'm looking for and don't have the foggiest how to even get started.
As I move around the MUD manually, the mapper, of course, follows my movement. Because the room descriptions change between day/night (and in some areas, change depending on what time of day) so I leave it set to fastwalk because it can't effectively do anything otherwise.
Every so often, an event will occur which prevents me from moving in a particular direction. Don't actually have they key to the door...too tired to move...an npc blocks the path, that sort of thing.
The mapper, doing it's duty on fastwalk, moves me even though I haven't actually moved in the MUD. The #BACKUP command sends a command to the MUD telling it to back me up...is there anything similar that works for the MAPPER? Something that basically does #TELEPORT except to a previous room?
And if that's possible...is there any way to do the same thing multiple times in a row? i.e. ...I've just fastwalked a few hundred spaces across the map...somewhere along the way I get tired and quit moving. I know the mapper saved my path because I can #RETRACE it if I wanted to...but I just want to back it up to 'roughly' the room I got tired and quit moving in.
I could easily set up some triggers to determine how many failed movements were attempted but...how can I make the mapper move back that many spaces without sending the commands to the mud?
Any thoughts would be appreciated because I'm drawing a complete blank on this one. |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: Wed Apr 18, 2012 10:56 am |
You need to set the speedwalk to safe or slow mode instead of fast. This allows CMUD a chance to respond to bad exit messages.
make triggers for the message you get when you sent a bad direction, #NODIR tells the mapper to ignore that exit command
With both in affect, you should not be losing your position on the map to start with. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
kyran64 Beginner
Joined: 18 Feb 2008 Posts: 11
|
Posted: Wed Apr 18, 2012 2:44 pm |
See...that's the thing. Safe and slow absolutely 100% will not work on my MUD.
Is there no way to log or record my movements...or even better...record the vnum of the rooms I pass through... into an array or string list or such where I could go back and literally just #TE to any point in the list? |
|
|
|
Daern Sorcerer
Joined: 15 Apr 2011 Posts: 809
|
Posted: Wed Apr 18, 2012 2:49 pm |
I'm 100% sure that safe and slow will work on your MUD, if you configure the mapper properly. If the only thing preventing you from using safe or slow, as your first post seems to imply, is that the room descriptions change, the easiest way would probably be just unchecking room descriptions in the mapper preferences. Alternatively, as long as the description is in a consistent position and format, #TAG triggers could be used to tell the mapper what the description is.
|
|
|
|
kyran64 Beginner
Joined: 18 Feb 2008 Posts: 11
|
Posted: Wed Apr 18, 2012 3:28 pm |
Unfortunately, the only thing that's even close to uniform so far as room descriptions go is when you're walking around in brief mode...which is how I've recorded nearly 5000 rooms into the mapper.
The room will appear as
Street < n s e w >.
However...depending on the area of the MUD and who coded it...there's not always punctuation at the end then of the line. If it's night, the directions in most places disappear entirely so all I see is
Street.
or in the sloppier places....
Street
...there may or may not be a > prompt under the room description. If I've moved through multiple rooms faster than the MUD can respond, there typically will not be a prompt.
I understand the arguments for getting it configured correctly to walk in safe or slow...but unless it's really just a matter of checking or unchecking some boxes I've missed prior to now, it's going to be a monumental amount of effort to remap the place.
-----------------
SO: Change in thought process.
Imagine it to be operationally advantageous to be able to record the vnum of every room you pass through into an array or String List.
Is there an Event perhaps...something similar to OnRoomEnter that can be applied universally without putting it in EVERY room? ..or a way to fire off a script every time the mapper updates? If so...it'd be a simple matter of using #ADDITEM and %roomnum to record to string list and from there I can do pretty much anything I want with my travel history. |
|
|
|
Daern Sorcerer
Joined: 15 Apr 2011 Posts: 809
|
Posted: Wed Apr 18, 2012 3:31 pm |
Yes, that's exactly what onRoomEnter does.
|
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Wed Apr 18, 2012 3:51 pm |
Unfortunately, I don't believe that onRoomEnter will work in FAST mode, because in FAST mode, Cmud is not checking whether you successfully entered the room. It simply assumes that the walk will be successful and moves your Location to the end of the walk path.
If you absolutely have to do this in FAST mode, then you would have to write up your own code to track the rooms.
Are you absolutely certain that there is no way to get SAFE or SLOW mode to work in your mud? Do the room names stay consistent in day/night? As Daern said, it is possible to get Cmud to ignore room descriptions in room identification. Alternatively, is there _any_ way of telling that a specific movement was successful? If so, you could write your own trigger to execute an #OK. |
|
|
|
kyran64 Beginner
Joined: 18 Feb 2008 Posts: 11
|
Posted: Wed Apr 18, 2012 4:49 pm |
I've tried numerous times over the past 10 years playing with the mapper and never gotten it to work reliably everywhere for safe/slow. So, absolutely certain...no. I acknowledge my own shortcomings in that respect..but from everything I've read and tried, it seems very, very unlikely. I know my way around most of the MUD fairly well and I'm not worried about having to make manual spot corrections here and there so...for my purposes, it generally DOES work well enough as it is :) I promise :)
That being said....I think I figured it out :D And I owe it entirely to you guys...just the being able to talk through what I need and thinking about my responses to your questions has made something click.
Daern gave me the key :) Thank you Daern! I was under the impression that OnRoomEnter was an event for a single room, not a universal activity and I've never ever played with events before so I didn't even know where to start...and I guess the documentation on it is adequate for someone who already understands but it just didn't look like what I needed when I read it the first couple times.
So, I built an event for OnRoomEnter that just sends the command "dance"....speed walking across the mud just got a whole lot funnier :D Even in fastwalk, it dances in every single room :)
So...my solution is certainly not as elegant as just getting the mapper set up correctly from the getgo...but I believe it'll work for me.
I'll be tinkering with a couple of lines that record the roomnumber at the end of a list string and limit the length of the list string to 100 lines or so to keep it from getting out of hand.
For what I'm wanting to do, I'm going to call this one most probably solved.
I really really appreciate the discussion! Thank you! |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: Thu Apr 19, 2012 8:54 am |
You could set up a string list of emotes and dance fight your way around.
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
kyran64 Beginner
Joined: 18 Feb 2008 Posts: 11
|
Posted: Fri Apr 20, 2012 4:33 am |
shalimar wrote: |
You could set up a string list of emotes and dance fight your way around. |
ROFL So true
So, my solution...while not preferable to getting the mapper to work correctly...does indeed work :)
For anyone in the future that has a similar problem...namely..you made my mistake and started mapping a fairly large game with an incorrectly configured mapper....here's a crude but effective solution. For reference...when I fast walk...CMUD can send hundreds of commands to my MUD before the MUD ever responds which is largely why this works for me. If your MUD is faster on the uptake then this may not be as effective.
Set up an OnRoomEnter event with two simple lines of code in it.
#Var RoomHistory %additem(%roomnum,@RoomHistory)
#IF (%numitems(@RoomHistory)>100) {#DELNITEM RoomHistory 1}
As you move around the MUD (or, at least...as you move around the mapper because this is 100% tied into where the mapper thinks you are at a given moment), every time you walk into a new room, the Event will add the vnum of the room you just entered to the end of a String List.
The second line is not necessary but recommended....it turns your String List into a stack of sorts...Last In, First Out. When the list hits 100 items, the top item gets deleted. Since new rooms are added to the bottom of the list, you always have 100 rooms in your history. ...you can of course change that to any other number you want.
From here there are a few different things you can do.
I chose to make an alias called BackMapUp. ...it can easily be applied to multiple triggers, you can make a button for it...you can even name it something easier to type like xx and manually back yourself up a few spaces from the command line. Anyway...it's a simple alias.
#DELNITEM RoomHistory %numitems(@RoomHistory)
#TE %item(@RoomHistory,%numitems(@RoomHistory))
#DELNITEM RoomHistory %numitems(@RoomHistory)
It immediately deletes the last room in the list...which is the room the mapper currently thinks you're standing in.
Next, it #TELEPORTS you to the new end of the list...which is the room the mapper thinks you were most previously in.
...here's the catch. When you teleport to the same room you're currently standing in...the OnRoomEnter event still fires even though you went from a room to the same room.
So the last line deletes the inadvertently added item at the end of the list. Without it...the alias would move you back one room and get stuck there..you'd be deleting the last room you were in and immediately re-adding the last room...kind of like trying to bail water out of a boat by scooping up a bucket full of water in the floor of your boat and dumping it right back into the floor of your boat.
Now you just need some triggers to activate your alias :)
In my case, most of my problems stem from getting tired while I speedwalk. When that happens, I typically get two messages from the MUD. One is that I'm too tired to move. The other is that There's no obvious direction to the <direction>.
Since getting tired starts the problem, I set a trigger to be activated by the notification that I'm too tired to move.
This one's a simple multi-stage trigger with two stages. The trigger pattern is the same for for both stages.
The first stage:
#T+ MapNoObvDir
#ALARM {+10} {#T- MapNoObvDir}
BackMapUp
...activates the normally disabled trigger that backs the map up when I try to go a direction that doesn't actually exist from the room I'm standing in then sets an alarm to turn the trigger off again after 10 seconds (it does NOT need to be on all the time and 10 seconds is typically more than enough for my MUD to quit sending me text even after a long failed speedwalk)
...then it moves your position back one room on the map.
The second stage to the fatigue trigger is set as a Duration type trigger...also set for 10 seconds. It only activates the MapBackUp alias any time it's set off and after 10 seconds, goes back to the first stage.
The MapNoObvDir trigger is set off by the line my mud sends when I, for example, try to go North from a room that doesn't have a north exit.
I gave it a trigger ID (MapNoObvDir is the ID...not the pattern that sets it off) so it'd be easier to activate/deactivate without setting up a class just to put the trigger into.
The only command it executes is the alias to back up the map position by one room.
So between the event, alias, and those two triggers, my mapper fairly consistently finds its way back to the exact room I was in when I got tired :) ...if it's ever wrong, it's usually only off by one room.
Hopefully I'm the only person to exist between now and the heat death of the universe to need (or..just want) something like this...but in the event that I'm not, I hope it helps :) |
|
|
|
|
|
|
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
|
|