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


Joined: 19 Nov 2006
Posts: 40

PostPosted: Mon Jan 26, 2015 3:07 am   

#CAP is firing triggers from the parent session
 
I'm a very rusty zMud user, switching over to cMud. Most of my cMud development is handled in the Package Editor; my apologies for not fully scripting all of my activity.

I would like a simple trigger to capture tells from other players to another text area. Years ago in zMud, I used #CAP. In cMud, however, this child window is somehow firing on triggers, even though text for those triggers isn't going to that window.

How can I accomplish what I want? Here is what I've tried so far:

Trigger pattern: %w tells you ~'*~'$
Script Text: #CAPTURE Chat

Trigger pattern: ^You gained %d experience points for the kill.$
Script Text: :*:assist @tank

When I kill a monster and see the 2nd trigger's text in my parent session, I get two commands instead of one to assist @tank. If I close down the child chat window, I only get 1 command from the 2nd trigger's text. My workaround was to create a new session, call it Chat, and make it work offline. Unfortunately, :*:assist @tank gets sent to this offline session.

When Chat is a child window of my character's session, I do see in the Package Editor that Window: Chat has the main character's package enabled, but I cannot turn this off. Turning off echo commands still sends the command, just doesn't echo it to a screen.

Any help is much appreciated!
Reply with quote
shalimar
GURU


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

PostPosted: Mon Jan 26, 2015 3:52 am   
 
A trigger should not be firing in all windows unless:
a. it is in a module
b. it is in a package other than the default session package that is also enabled for that window
c. the trigger is duplicated in all windows
_________________
Discord: Shalimarwildcat
Reply with quote
apfinger
Novice


Joined: 19 Nov 2006
Posts: 40

PostPosted: Mon Jan 26, 2015 4:52 am   
 
Thanks for the quick response!

Quote:
b. it is in a package other than the default session package that is also enabled for that window


I think that's the culprit, somehow. The trigger only fires in the parent session and the child window. The other sessions I have loaded do not fire the trigger.

What do you mean by default session package? Right now, it has access to the parent's session package. I'm not able to disable this - the checkbox is greyed out. No other packages have a checkmark in them.
Reply with quote
shalimar
GURU


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

PostPosted: Mon Jan 26, 2015 6:55 am   
 
the default package is sessionName.pkg
and Unless you have gone out of your way to make it otherwise, that is where all your triggers should be located
_________________
Discord: Shalimarwildcat
Reply with quote
apfinger
Novice


Joined: 19 Nov 2006
Posts: 40

PostPosted: Mon Jan 26, 2015 7:10 am   
 
Ok, so it isn't a generic default file, but the default file created for that session. Joe.pkg

In my cMud window, I have tabs for each session: Joe / Bob / Bill / Arny. Right now, Joe is the only one with the trigger that will #CAP Chat. The Chat window changes the tabs to now read Chat, Joe / Bob / Bill / Arny.
Eventually, I would like all of my characters to #CAP to the Chat window. How do I get it to be independent of Joe, without making it its own session?

Right now, under the Advanced tab for Window: Chat, the List of packages enabled for this window:
no English Directions
no English Keypad
no Clickable URLs
yes Joe (this is locked, cannot uncheck this)
no Bob
no Bill
no Arny

If I can't make the window indepedent without making it a new session, can I make it stupid so that it doesn't attempt do anything, like interpret text for triggers? I just want it to display the captured text.
Reply with quote
shalimar
GURU


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

PostPosted: Mon Jan 26, 2015 7:30 am   
 
You would want to make a new package from within the setting editor and move the capture trigger over to it.
Then edit each of your character sessions and include the new package. (will require closing and restarting sessions)
Then you will need to go into the advanced settings of the chat window and make sure that the package is NOT active for that window, else you will get caught in a loop til the system self disables it.
_________________
Discord: Shalimarwildcat
Reply with quote
apfinger
Novice


Joined: 19 Nov 2006
Posts: 40

PostPosted: Mon Jan 26, 2015 9:36 am   
 
Interesting! I will figure out how to do all that and give it a try - probably tomorrow. Thank you so much!
Reply with quote
apfinger
Novice


Joined: 19 Nov 2006
Posts: 40

PostPosted: Thu Jan 29, 2015 10:54 am   
 
I gave this a shot, but I get the same result. #WIN has the same effect.

It's nice to have a generic package that all my characters share, though. Unfortunately, the capture window still spawns, requiring the package of the receiving session.

GeneralStuff.pkg:
#TRIGGER { (%w) tells you '(*) } { #WIN Communications %1 : %2 }

When the capture window spawn, I verify in its settings that it does not inherit GeneralStuff.pkg. However, it does inherit settings from whoever spawned the window, and do not see how I can disable that inheritance.

Session: Joe
Includes Joe.pkg
Includes GeneralStuff.pkg

In Joe.pkg:
#TRIGGER { (@Tank) tries to ambush *, but fails. } { :*:assist @Tank }

Bill tries to ambush a Beastly Fido, but fails.

With Communications window NOT OPEN, this triggers once. All sessions receive the command to assist Bill (presuming he is the tank)
With Communications window OPEN, this triggers twice, IF Session: Joe was the session that spawned the Communications window.
With Communications window OPEN, this triggers once, IF Session: Bill was the session that spawned the Communications window.

How do I get this capture window to not inherit the parent settings and without making the window its own session?

Signed,
Frustrated and Thankful
Reply with quote
shalimar
GURU


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

PostPosted: Thu Jan 29, 2015 11:20 am   
 
make the capture windows part of the supper session, instead of the individual sessions?
_________________
Discord: Shalimarwildcat
Reply with quote
apfinger
Novice


Joined: 19 Nov 2006
Posts: 40

PostPosted: Thu Jan 29, 2015 11:57 am   
 
I haven't figured out how to make a super session yet, but I am leaning in that direction at the moment. To get by for now, I am cheating by using one of my other characters, which doesn't have any of its own settings yet, open the window.

I do appreciate the helpful support!
Reply with quote
apfinger
Novice


Joined: 19 Nov 2006
Posts: 40

PostPosted: Sat Jan 31, 2015 9:09 pm   
 
I figured out how to make a super session based on a link you sent me in my other thread. However, I've got this:

Multiplayer/Super Session Thread

MattLofton wrote:
Supersessions never, EVER have packages associated with them and therefore cannot have windows/modules of their own.


So, I'm still stuck with binding the secondary chat capture window to a character session, and thus seeing multiple reactions in that character session when I invoke :*: commands.
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