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


Joined: 15 Apr 2013
Posts: 24

PostPosted: Thu May 16, 2013 6:09 pm   

Detecting combat before moving in trigger or detecting non-movement
 
Hi everyone,

I'm fighting with an edge case that's driving me a little batty.

[MUD OUTPUT]
Mycharacter is not fighting (42/42h 92m |neutral||2,659|S-)
Thieves East Cage
Exits: west
The head of the kobold lies here, a vacant stare of shock on its face.
The corpse of the kobold is buzzing with flies. (2)
A large pool of spilled blood lies here.

Mycharacter is not fighting (42/42h 92m |neutral||2,659|S-)west

The kobold grazes you.
You dodge the kobold's attack.

Mycharacter is fighting (2,659 41/42h 92/92m|S|The kobold is perfect health )Slow walking paused
No way! You are still fighting!
[END MUD OUTPUT]

This is an example of issuing a move command through slow walking and between the command being issued and actually moving I get attacked by an aggressive mobile that triggers a combat. You can see the slow walk combat pause detection worked just fine.

I considered triggering off of "No way! ... " to reissue the last direction used, however this also appears for many other commands, not just movement (for example if I type kill kobold above while fighting, it will trigger such a response) so it would result in a lot of false positives I think.

It is rare that this happens, but often enough to drive me batty.

I do not have a map defined, I am using the #SLOW command directly in my triggers so I cannot return to a known good point. I also don't want to have to trigger every room, I'm trying to be as generic as possible.

Any suggestions on how to detect a failed move? (NOTE: I was thinking of recording the room name and trying to detect a name change, but that's not always going to work, eg hallways or of somehow trying to use MXP ...)

I am playing on the Realms of Despair using CMud 3.34 if it makes any difference at all.

Alternately a solution that recognizes no movement in a time interval and reissues the last move would be good too.
Reply with quote
Tharius
Beginner


Joined: 15 Apr 2013
Posts: 24

PostPosted: Thu May 16, 2013 6:40 pm   
 
Alternately, is there a way to keep using the speed walker but have it execute a command before the move?

In this way I could set up a trigger that sets a timer and looks for an Exits: line within nn seconds or repeats that last movement?

Ie can #SLOW nnnww become #SLOW iiijj where i is an alias for #t+ ExitCheck;n and j is #t+ExitCheck;w (etc)
Reply with quote
shalimar
GURU


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

PostPosted: Fri May 17, 2013 2:49 am   
 
You can increase the delay between speedwalk steps under preferences, under scripting, the time is in milliseconds though.
Changing that should allow you enough time for a trigger to fire and issue a #PAUSE for you.

Failed move detection is not automatic, you have to create a trigger for the failed movement message and issue #NODIR.
_________________
Discord: Shalimarwildcat
Reply with quote
Tharius
Beginner


Joined: 15 Apr 2013
Posts: 24

PostPosted: Mon May 20, 2013 12:51 am   
 
I have spent most of today trying to get speed walking to work, frustratingly no success as yet.

I find that #SLOW .whatever does not wait for me to issue a #OK, ignores me if I do and that #PAUSE doesn't always keep waiting until #STEP

If I throw in #STOP and use #OK/#STEP I get the same direction repeatedly... *sigh* this should not be this hard to figure out.
Reply with quote
Tharius
Beginner


Joined: 15 Apr 2013
Posts: 24

PostPosted: Mon May 20, 2013 12:52 am   
 
If it matters ... I am not using the automapper ... empty map... I delete it when I see it...

I can create a map but for now I know the path I want.
Reply with quote
shalimar
GURU


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

PostPosted: Mon May 20, 2013 6:06 am   
 
Have you tried configuring the mapper?
That usually is enough to get most games started.
But sometimes triggers are needed to fire off the #TAG commands, to define what part of the room is being displayed.
#OK is used to confirm a map movement when autodetection fails.
#NODIR is for when you get a line of text saying you did not move, for whatever reason.
_________________
Discord: Shalimarwildcat
Reply with quote
Tharius
Beginner


Joined: 15 Apr 2013
Posts: 24

PostPosted: Mon May 20, 2013 11:55 am   
 
shalimar wrote:
Have you tried configuring the mapper?
That usually is enough to get most games started.
But sometimes triggers are needed to fire off the #TAG commands, to define what part of the room is being displayed.
#OK is used to confirm a map movement when autodetection fails.
#NODIR is for when you get a line of text saying you did not move, for whatever reason.


I went ahead and configured the mapper and mapped 2 zones... Even double clicking on a room I can't get cmud to stay in sync map to mud (after removing all the stops and pauses from my triggers, without combat)

The constant crashes when I re-arrange the window panes was one thing but this is the functionality that cmud's supposed to be good at... as an experienced zmud user I figured this would be the right way to go but I am seriously losing faith.

Thanks for your help btw.
Reply with quote
Tharius
Beginner


Joined: 15 Apr 2013
Posts: 24

PostPosted: Mon May 20, 2013 2:06 pm   
 
Ok to simplify things I went back to a fresh install of zmud and started from there, since it is fairly stable here.

Fast walking seems to work quite well (I just issue a #WALK @roomname after every fight) and I can simulate paths by lying on the map and creating one way exits and fake rooms to force the path I want (I know zmud's path finding has issues, so hopefully this will translate to cmud ok). This only helps for aggressive mobs so it's really less than ideal.

Slow walking not so much. When using slow walking I have a trigger #trig {^Exits:*} {#OK} which occasionally misses a map update. I can check if I'm fighting and #STEP if I'm not based on my prompt. If I can tell that I'm off course I can issue a #WALK @roomname to correct my path. Now ... dealing with those missed map updates... is there any sort of command that will programatically achieve the same result as pressing the find button on the automapper? (Never mind this last part, I'm experimenting with the #FIND command now)
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