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
ryven
Newbie


Joined: 24 Aug 2007
Posts: 4

PostPosted: Fri Aug 24, 2007 11:58 pm   

mapper creating extra rooms
 
I've got a problem where when a room movement fails (e.g. 'you cant move that way') the mapper creates a 'wrong' room in that direction, as opposed to the 'correct' new direction you might go in. I know #TRIGGER {You cannot move that fast!} {#NODIR} would fix this, only the problem is there are a tonne of different return responses for not being able to go in a certain direction, and i don't want to make a trigger for every single one i come across. So if anybody has a solution for this, i'm all ears, but my own personal idea is something like this

Having a trigger for going in a certain direction, e.g. when you go east, it starts a 1 second timer, if inside of this 1 second the mud doesn't return a string of 'obvious exit' (indicating the existance of a room) then the last direction in the queue is deleted. The idea behind this is when you're spamming a direction that you can't go in, and getting any kind of feedback from the mud saying 'you cant go that or way' or equivalent, then you make the assumption it will take more than 1 second for you to realise what you've done, in which time, the trigger will delete that erroneous direction from the queue, you now hit your correct direction, enter a new room, that new room gets created, everything is gravy. Does anyone know how i could do this?


My other issue is that custom directions seem to be far more complicated than they ought to be. For example, i don't really want to have to go and manually edit every time i come across an enter room with an out reverse exit, sure, ive got an alias that runs a #makeroom command for that room, but it's still more work than seems necessary. Is there no script i can set up that just gives the automapper extra acceptable dirs? Like enter, the reverse dir being out, and always create it to the east on the map or something? Thanks
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Sat Aug 25, 2007 12:15 am   
 
Your final, direction question is an easy one to answer - yes. See the #direction command, and perhaps also take a look at this file.

As for your more complex room question - is the mapper creating rooms when you receive the "you can't go that way!" message? Normally, the mapper just leaves the command you entered in the command queue, and when you next receive a room description (from look, or movement or whatever) the right room is created, but in the wrong direction. If this isn't what's happening to you, you might want to try reconfiguring the mapper to improve room detection.

The easiest method of solving your problem is most definitely to use a #nodir trigger. You can use a single trigger for this like so:

#trig {{You can't go that way!|There's no exit that way|And so on}} {#nodir}

This makes life a bit easier. But if you really don't want to do that, then you can try something like this:

#oninput "movetrig" {^{n|e|s|w}$} {}
#cond {obvious exit} {#state movetrig 0} {within|param=10}
#cond {*} {#nodir}
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
ryven
Newbie


Joined: 24 Aug 2007
Posts: 4

PostPosted: Sat Aug 25, 2007 12:48 am   
 
Could you explain a little bit of what exactly is going on with that last part? I can follow, but not entirely in detail.


If i was setting the scene a bit, imagine you were trying to go west, but it turns out you cant, you're not high enough level. The mapper now thinks you're going west, but seens as you cant, you go back east, the way you came from. This east room you've already created before, cos you've come from that way, but now the mapper recreates this room west of where you just where because it assumes this room is the result of going west, not not being able to go west and then backtracking east. This seriously screws things up. My issue is that i have so many different messages on my mud for not being able to go in a certain direction that i'd be forever adding triggers to the nodir list to accomodate them all, and im just trying to figure out a way of filtering all of them by, like i said, doing something like waiting a second for a new room to appear, if it doesnt, cancel the movement on the map.

Thanks
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Sat Aug 25, 2007 12:56 am   
 
Sounds like your mapper is set up correctly - that's how it normally behaves when #nodir isn't being used.

My second example there is a trigger with three states. The first state is an input trigger with a list of movement commands (you'll want to add to these if there are others - it's possible that there's a way to automatically generate such a list from your existing #directions but I can't remember). When you send a movement command, the trigger moves onto the second state and waits for the string "obvious exit" - the state has the Within parameter set to 10 - this means that if the text isn't received within 10 lines, the trigger will move onto its third state, which will send #nodir on the next line received. Once #nodir is sent, the trigger loops back round and starts waiting for more movement.

If "obvious exits" is received within 10 lines, the #state command sets the current state of the trigger to the first one (the first state is numbered 0), so the trigger starts waiting for another movement command before the whole process begins again.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
ryven
Newbie


Joined: 24 Aug 2007
Posts: 4

PostPosted: Sat Aug 25, 2007 1:05 am   
 
Thanks a lot, this sounds exactly what i need. I'll give it some testing. Where would you recommend setting this script? In the map script area? I was wondering if it wouldn't interfere with other lines of script or something.
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Sat Aug 25, 2007 1:27 am   
 
If you just enter the three commands I've given you there on the command line and hit enter, it'll create the trigger for you. Since it's only a single trigger and it's totally self-contained, it shouldn't matter what you do with it beyond that.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
ryven
Newbie


Joined: 24 Aug 2007
Posts: 4

PostPosted: Sat Aug 25, 2007 12:30 pm   
 
Thanks :) It only really semi-works in the end, lol, but i might have to put some serious effort into getting it to work properly.


As for the other simple custom directions, i still cant really get this working properly. The Direction command doesn't quite do what i want it to, is there any way i can just set 'enter' to be a command, and 'out' to be its reverse, so that whenever i hit enter a new 'other' room is created on the map, and then 'out' will reverse the direction you move on the map. It seems simple but Direction doesn't want to work that way, it wants a single character ns etc for the speedwalker, i dont know what it cant just take enter as a room command and out as its reverse without needing to complicate the process with some other speedwalk single character direction.

It cant be that hard for the mapper to just accept that when i hit enter i want an 'other' room and when i hit 'out' i want to reverse it? For the speedwalk as well? What i dont quite get is that i could get this exact process by manually editing the Other Com of each room to enter or out, but cant get the mapper to just do it on its own.

Thanks
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Sat Aug 25, 2007 12:43 pm   
 
You can do that, sure. The "speedwalk direction" is for speedwalks, like how hjkl represent the diagonal directions. It's simply because the speedwalk module can't (for obvious reasons) handle directions having more than one character.

Try this:

#dir eo enter east
#dir oe out west

This creates two directions, enter and out. Their speedwalk characters are e and o. Enter, when it's mapped, is put "east" and the opposite for out.

To save having to enter the Other Com commands manually, zMUD has a mapping character. If you follow the second link in my original post, it'll explain it more, but basically, typing

>enter>east

will create a room to the east with the word "enter" to get into it, and move you into it.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
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