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
jtown84
Novice


Joined: 09 Oct 2007
Posts: 36

PostPosted: Fri Mar 28, 2008 12:01 pm   

Possible Capture Bug?
 
Hey all again.
In the mud i'm playing, it has a 'map' an in game that allows you to preview the rooms around you.
Its a very nice feature to have but it spams you a lot, so the best solution has always been to Capture it
here is what i get from the mud
Code:

<MAPSTART>
                           
                         
                             
                         
                             
            |( *|         
         ---                 
        |<!>|[#]         
         ---|               
            |[ ]|         
                             
    |[ ] < > < > < > [ ]|
     -------------------     
                         
                             

<MAPEND>

Well its not alll smashed but, you get the idea. In zMud I would trigger on mapstart #gag;#gagon;#T+ Capturefolder
inside of the CaptureFolder was a trig (*) and it would Capture everything to Specified window, and then would have the #gagoff
and the #T-CaptureFolder triggered on the MAPEND line..
It worked great and it was quick.. There seems to be some problems with that in CMud, Its gettting a trigger loop, which i believe
is caused by it triggering again in the CaptureWindow (not sure). Thats not the real problem, while going through some helpfiles
i found #C+ Windowname, Which is PERFECT for what i need. The only problem im coming into is.. Its extremely slow
It takes about .75sec to move a room.. when its spammed.. e;s;e;s;e;s; etc.. its Very slow.. and when i disable the trig it moves fine.

Yeah I'm sorry about the uglyness of the post.. Its 7am.. and i need sleep :(
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Fri Mar 28, 2008 7:52 pm   
 
Your best bet is to but your original triggers into a local module. Then add that module to your main window, and make sure it's disabled in your capture window.

In summary it's a scoping thing, and by doing it that way you basically tell CMUD to only match the text for the main window. Sorry for the crappy explanation, but I'm sick. Embarassed
_________________
Asati di tempari!
Reply with quote
jtown84
Novice


Joined: 09 Oct 2007
Posts: 36

PostPosted: Sat Mar 29, 2008 6:55 am   
 
That does make sense, but how do i "make sure it's disabled in your capture window. "
Thanks.
_________________
Aardwolf
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Sat Mar 29, 2008 10:05 am   
 
Are the triggers for your mapper in a module, or a window? You should put them in the window you want them to apply to (so not the capture window) rather than in a global module - they'll fire in the capture window if they're in a global module.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
jtown84
Novice


Joined: 09 Oct 2007
Posts: 36

PostPosted: Sat Mar 29, 2008 10:38 am   
 
Ahh, I've put almost all of my scripts in Module form. :(
_________________
Aardwolf
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Sat Mar 29, 2008 11:07 am   
 
You have a couple of options - either put the scripts you only want firing in one window in that window, or put the capture window in a separate package from the module and the main window and have the module local, or put the main window in a separate package to the capture window and the module and set it to external.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
jtown84
Novice


Joined: 09 Oct 2007
Posts: 36

PostPosted: Sat Mar 29, 2008 1:50 pm   
 
is the #C+ not inteneded for use as i am using it?
or is there another reason for the lag it causes?
_________________
Aardwolf
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Sat Mar 29, 2008 9:55 pm   
 
You aren't seeing that Fang has already answered those questions so I will try again.

Look at this structure.

Code:
Package--
         |_Module
         |_Main_Window
         |_Capture_Window


Both windows are firing off of the triggers that you have in the Module, because both windows can see them.
This is causing a looping effect and is a large portion of why you are having the slow down.

There are two easy solutions.
1. Place your capture triggers INSIDE the main window instead of a module.
2. Place your capture triggers inside their OWN Package and only enable that Package in the Main Window.

Windows cannot see triggers that live within other windows because windows are private to themselves.
There are ways around this for some settings, triggers are exceptions. So placing your capture triggers
within the main window will stop them from firing multiple times.

Modules are by default seen by all windows within the same package. You can also enable
the Modules within a separate package for a window. If you place your triggers in a module in another package by
themselves and only enable that package for the main window, this means disabling it for the capture
window btw, again it will also stop the looping.
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
jtown84
Novice


Joined: 09 Oct 2007
Posts: 36

PostPosted: Sat Mar 29, 2008 10:11 pm   
 
No, I do see that he did answer this.
I was wondering if the lag on #C was intended, or if i was using it for an undesired use.
I've already done what fang said and it works.
but thanks for your in depth answer.
_________________
Aardwolf
Reply with quote
jtown84
Novice


Joined: 09 Oct 2007
Posts: 36

PostPosted: Sun Mar 30, 2008 11:30 am   
 
Well It appears that the map capture script does not work as intended still
Its still very laggy, enough that i have to disable it, Hopefully soon I can figure this out.. but the #cap when triggering on (*) seems to be EXTREMELY laggy
Possible bug.. Might be worth looking into.
_________________
Aardwolf
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Mon Mar 31, 2008 12:49 am   
 
I think that may the result of the trigger your using. As has been discussed in other forum topics, (*) is a greedy pattern matcher and takes some time to evaluate. You can try detecting the last line, (if it always eight lines) then doing #CAPTURE 8 MapWindow, which should the last 8 lines to the MUD window. that should speed things up a bit. it might also help if no other (or at least as few as possible) are trying to match when you receive this info. If you do a search on speed in CMUD you'll find a topic already discussing the nuances of this.

I hope that helps.
_________________
Asati di tempari!
Reply with quote
jtown84
Novice


Joined: 09 Oct 2007
Posts: 36

PostPosted: Mon Mar 31, 2008 11:43 pm   
 
Just for reference.. I did what you suggested Tech
I did #Capture 17 MapCapture on the Mapend line
I also did #gag -17 on it too
Its quick and works fine, Thanks for all help
_________________
Aardwolf
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