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
Sutex-Kindred
Apprentice


Joined: 26 Aug 2009
Posts: 119

PostPosted: Mon Apr 23, 2018 12:25 pm   

Trigger Prompt Variables are Not Working ?
 
This is the thread to setup CMUD so I could share Variables between all 3 of my Chars on my Mud ( can play with 3 at once)
http://forums.zuggsoft.com/forums/viewtopic.php?t=39238

All of the triggers below are not sending variables to the other chars only Sutex is getting data , even with the triggers in the Session /EternalDarkess.pkg which all 3 Chars see ( image below)

When I type GROUP , I get the below in SUTEX window/session ( there's no separation between them)

Hit Points Mana Movement Align Exp needed Level
[ 3441/3441 ][ 2467/2467 ][ 901/901 ] [ -310] [ 644075] [106 Mu] Sutex
[ 4060/4060 ][ 5159/5159 ][ 1010/1010 ] [ -754] [ 32673911] [172 Mu] Zarlix
[ 5659/5659 ][ 3877/3877 ][ 1120/1120 ] [ -746] [ 20876668] [172 Wa] Halix

GROUP
#TR {~[%s(%d)/(%d) ~]~[%s(%d)/(%d) ~]~[%s(%d)/(%d) ~] ~[ ([-%d])~] ~[ (%d)~] ~[(%d) %w~] (%sessionid)} {
hp=%1
max_hp=%2
mana=%3
maxmana=%4
move=%5
maxmove=%6
align=%7
expneed=%8
level=%9
name=%10}


#All Report in Sutex command line sends this output, below this is how it appears in the GroupHealth window.
this was working but no-longer sends the output to the capture window , no-idea why it has stopped working.

Zarlix reports: 2080/4060H, 3730/5159M, 1010/1010V
Halix reports: 4341/5659H, 2373/3877M, 1070/1120V
Sutex reports: 3148/3441H, 2461/2467M, 901/901V

#TR {%sessionid reports: (%d)/(%d)H, (%d)/(%d)M, (%d)/(%d)V } {
hp=%1
max_hp=%2
mana=%3
maxmana=%4
move=%5
maxmove=%6
}

PROMPT
3441hp 2467m 901mv > cant get this to work either in any syntax Ive tried
This is the trigger I'm using its in a class Health Folder in each of the 3 Char below
(%d)hp (%d)m (%d)%x
hp=%1
mana=%2
move=%3

@hp
@mana
@move ... @ all in the tree view in the class Health Folder

so the @variables for Sutex shows data, other two Char have same script but show nothing

Have most Triggers Alias 'Stuff' in classes ( ignore the uncheck Eternaldarkness.pkg Its Checked in all 3 Chars now, old image from before )
SUTEX


ZARLIX


HALIX
_________________
Entropy rules
Reply with quote
Sutex-Kindred
Apprentice


Joined: 26 Aug 2009
Posts: 119

PostPosted: Tue Apr 24, 2018 3:56 am   
 
Anyone know why it's not working?
_________________
Entropy rules
Reply with quote
shalimar
GURU


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

PostPosted: Tue Apr 24, 2018 5:24 am   
 
It's a scope issue unless you specifically tell it to fire in the proper character's window:
#EXWIN WindowName {dostuff}

The supersession may have failed, but a shared package should work.
Make a new package from the file menu of the settings editor.
Move the trigger to said package.
Edit all three sessions (from the sessions screen) to have this package on the package list.
Restart CMUD.
_________________
Windows 10 Home Premium 64-bit
AMD Phenom II x6 1055T 2.8GHz 16GB
CMUD Pro v3.34
Reply with quote
Sutex-Kindred
Apprentice


Joined: 26 Aug 2009
Posts: 119

PostPosted: Tue Apr 24, 2018 6:00 am   
 
Ok could you possibly show me the whole trigger with one of the names
one example something work with and in explaining this 'scoping'

I'm going to use GROUP as REPORT is not capturing to the GroupHealth window anymore

This is what I did
I dropped the GROUP trigger in the supersession that's all, with variables in the other 3 Chars

GROUP
#TR {~[%s(%d)/(%d) ~]~[%s(%d)/(%d) ~]~[%s(%d)/(%d) ~] ~[ ([-%d])~] ~[ (%d)~] ~[(%d) %w~] (%sessionid)} {
hp=%1
max_hp=%2
mana=%3
maxmana=%4
move=%5
maxmove=%6
align=%7
expneed=%8
level=%9
name=%10}

Yet GROUP the above only reads the top line below

If I run group from any other Char , none of the their variable are populated only Sutex is.

[ 3441/3441 ][ 2467/2467 ][ 901/901 ] [ -310] [ 644075] [106 Mu] Sutex
[ 4060/4060 ][ 5159/5159 ][ 1010/1010 ] [ -754] [ 32673911] [172 Mu] Zarlix
[ 5659/5659 ][ 3877/3877 ][ 1120/1120 ] [ -746] [ 20876668] [172 Wa] Halix


3441hp 2467m 901mv Cant get any of the Chars to read this expect Sutex... scoping ?

You said It's a scope issue, but I have no-idea how to go about scoping what ? I have things in Classes , is that what you mean ?

And why would the Supersesssion failed , thought the whole idea of setting it up , was to make life easier so I could share variables
IE drop triggers there and all the others can see it. Not so easy it seems .. confusing :)
_________________
Entropy rules
Reply with quote
Sutex-Kindred
Apprentice


Joined: 26 Aug 2009
Posts: 119

PostPosted: Wed Apr 25, 2018 10:53 am   
 
If anyone can explain scoping with these triggers, how to use it
_________________
Entropy rules
Reply with quote
shalimar
GURU


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

PostPosted: Wed Apr 25, 2018 3:08 pm   
 
Scoping is a lot like line of sight.
Anything you have the scope to see, you can edit.
Usually separate characters do not have the scope to see each others settings.
So a trigger in one character's package only set variables in the same package.

This is to prevent crossreferencing errors.

Currently, your trigger is doing everything in the Sutex window, so %sessionid is always Sutex and only Sutex variables change.
We can change this either with the shared package method i mentioned above (similar too, but not a supersession).
Or, you can make the trigger force things to happen in the correct window, assuming it has the scope (packages are enabled in advance window properties):

Code:
#TR {~[%s(%d)/(%d) ~]~[%s(%d)/(%d) ~]~[%s(%d)/(%d) ~] ~[ ([-%d])~] ~[ (%d)~] ~[(%d) %w~] (%w)} {
  #EXECWIN %10 {
    hp=%1
    max_hp=%2
    mana=%3
    maxmana=%4
    move=%5
    maxmove=%6
    align=%7
    expneed=%8
    level=%9
    }
  }
_________________
Windows 10 Home Premium 64-bit
AMD Phenom II x6 1055T 2.8GHz 16GB
CMUD Pro v3.34
Reply with quote
Sutex-Kindred
Apprentice


Joined: 26 Aug 2009
Posts: 119

PostPosted: Wed Apr 25, 2018 11:22 pm   
 
Ok so having the Prompt 3441hp 2467m 901mv triggers in each Chars Session should work, for each of them this is what I thought scoping was about but it only works for Sutex
so my confusion, thinking I'm missing something if you re-read THIS threads and below, since I started trying to sort Windows Triggers Sessions Variables out, you'll see this is has always been the case.
http://forums.zuggsoft.com/forums/viewtopic.php?t=39238

This "scoping" is not explaining why only the top line Sutex is read in this trigger either?
[ 3441/3441 ][ 2467/2467 ][ 901/901 ] [ -310] [ 644075] [106 Mu] Sutex
[ 4060/4060 ][ 5159/5159 ][ 1010/1010 ] [ -754] [ 32673911] [172 Mu] Zarlix
[ 5659/5659 ][ 3877/3877 ][ 1120/1120 ] [ -746] [ 20876668] [172 Wa] Halix

would like to get the triggers working which Ive been asking about in these threads.
_________________
Entropy rules
Reply with quote
shalimar
GURU


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

PostPosted: Thu Apr 26, 2018 12:24 pm   
 
I know you do... as soon as we can get one example of variables being defined properly you can apply it to all your settings.
One step at a time.
Did the above code work?

I know this seems like we are going in circles, I feel that way too.
_________________
Windows 10 Home Premium 64-bit
AMD Phenom II x6 1055T 2.8GHz 16GB
CMUD Pro v3.34
Reply with quote
shalimar
GURU


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

PostPosted: Fri Apr 27, 2018 4:07 am   
 
shalimar wrote:
Scoping is a lot like line of sight.
Anything you have the scope to see, you can edit.
Usually separate characters do not have the scope to see each others settings.
So a trigger in one character's package only set variables in the same package.

This is to prevent crossreferencing errors.

Currently, your trigger is doing everything in the Sutex window, so %sessionid is always Sutex and only Sutex variables change.
We can change this either with the shared package method i mentioned above (similar too, but not a supersession).
Or, you can make the trigger force things to happen in the correct window, assuming it has the scope (packages are enabled in advance window properties):


Because the other character windows do not have the Sutex package enabled, none of the triggers in Sutex will fire in them.
(scope issue, only Sutex gets any updated variable values)

If you do enable the Sutex package in them, then ALL the triggers that could fire from the Sutex package, will.
(scope issue, you could end up with every Sutex variable (not just these) written in all character sessions)

You could just create the same trigger in each session, but manually coding such redundancy is tedious.
The cleanest method to accomplish your stated goal is with a shared package that they all have enabled.
(no scope issue, no redundant triggers, each session only gets its own variables.)
_________________
Windows 10 Home Premium 64-bit
AMD Phenom II x6 1055T 2.8GHz 16GB
CMUD Pro v3.34
Reply with quote
Sutex-Kindred
Apprentice


Joined: 26 Aug 2009
Posts: 119

PostPosted: Fri Apr 27, 2018 7:13 am   
 
Ok following up an all mentioned...will post when done..

Yet the Trigger where dropped in the EtenalDarknes.pkg , which all the Chars can see and only Sutex var was getting data
Tried the triggers in each separate sessions same result as mentioned above , no data in variable

Prompt 3441hp 2467m 901mv is a classic example of it not working in any other sessions expect Sutex
The images Iv show you have everthing laid out in Classes ..

Have not tried your trigger yet above, busy few days, will follow up on all you mentioned...will post when done..

thanks
_________________
Entropy rules
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