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 Goto page 1, 2  Next
Sutex-Kindred
Apprentice


Joined: 26 Aug 2009
Posts: 141

PostPosted: Wed Apr 11, 2018 6:03 am   

Complex ? ? Variables Windows & Triggers
 
I'm trying to capture output from my Mud, and have my 3 Characters use that information.

I run a Supersession and I'm always Grouped.
Sutex is my Main Character Halix & Zarlix have their own alias, commands which can either be controlled from Sutex command line or theirs.

I been experimenting with two Commands Report and Group

REPORT is captured and sent to another window called GroupHealth as Report, sends to others in a group so Sutex report is seen by Halix & Zarlix and Sutex sees theirs.

#All Report in Sutex command line sends this output, this is how it appears in the GroupHealth window.

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

Would like to use the GroupHealth Window as the window which allows
each other session ie Sutex Harlix & Zarlix to read (trigger) to do other tasks.

Report trigger I use, Sutex as the example. Making a trigger which reads the whole output, has not worked, so one for each.
(Sutex) reports: (%d)/(%d)H, (%d)/(%d)M, (%d)/(%d)V

Yet I'm unable to get this working, to get Sutex Harlix & Zarlix sessions to read the GroupHealth Window
Not even sure what I'm trying to do is possible , do I need to share variables, can you share variables in a Supersession ?

GROUP COMMAND.
As I running three Character at once I always have them grouped
Group command gives more information my prefer choice

The output below is how it appears in a window.

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

This is the Trigger I'm using, again all Characters get their own Trigger as with Report above.
~[ (%d)/(%d) ~]~[ (%d)/(%d) ~]~[ (%d)/(%d) ~] ~[ -(%d)~] ~[ (%d)~] ~[(%d) Mu~] (Sutex)

But how to keep those variable for each Character separate and each Character to be able to read and use those variables in their triggers to heal rescue ect

Capturing the prompt, the values is so finicky I even have trouble tying to capture this 3441hp 2467m 901mv > the normal prompt. Trigger on New line and Trigger on Prompt still not quite sure which is best, been switching between one and the other or both in testing.

Given there's no newline between any of the outputs Group or Report, it makes it even harder, getting 'single' triggers to read.

I'm enjoining once again tying to nut this stuff out. Yet my knowledge of what is possible is lacking, specifically when it comes to having One Super session and trying to get information to all three Characters or from one to another, any help you can give would be greatly appreciated


Hope Ive been clear in trying to explain all this.
_________________
Entropy rules
Reply with quote
shalimar
GURU


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

PostPosted: Wed Apr 11, 2018 12:57 pm   
 
Given that all three will be using this, you likely want the capture setting in the supersession or some other shared package, and it can assign the variables.
Scoping should ensure that each character window only has the variables relevant to that character.
You may need to stick it inside a module setting, as those have global scope by default.

#TR {%sessionid reports: (%d)/(%d)H, (%d)/(%d)M, (%d)/(%d)V } {
health=%1
healthMax=%2
mana=%3
manaMax=%4
vit=%4
vitMax=%6
}

This assumes that the individual character sessions are named for the character.
_________________
Discord: Shalimarwildcat
Reply with quote
shalimar
GURU


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

PostPosted: Wed Apr 11, 2018 2:05 pm   
 
For the prompt trigger (you definitely should prefer on prompt for a prompt trigger) your issue will likely be one of spacing, as the whitespace likely gets larger as your current value decreases, causing the pattern to no longer match.

#TR {~[%s(%d)/(%d) ~]~[%s(%d)/(%d) ~]~[%s(%d)/(%d) ~] ~[ ([-%d])~] ~[ (%d)~] ~[(%d) %w~] (%sessionid)} {set values as above}
_________________
Discord: Shalimarwildcat
Reply with quote
Sutex-Kindred
Apprentice


Joined: 26 Aug 2009
Posts: 141

PostPosted: Wed Apr 11, 2018 2:19 pm   
 
Ok something to work with great stuff.

To clarify this is My supersession, these 3 windows that's 3 pkg http://forums.zuggsoft.com/forums/viewtopic.php?t=39236

Which Sutex.pkg holds all the chat windows above Sutex. And Halix.pkg Zarlix.pkg
Just so I get this clear , What should be in those .pkg As you likely want the capture setting in the supersession or some other shared package

Is seems I need to move my Chat Tell etc Windows to their own .pkg ? In tying to clean it up before , I completely corrupted .pkg and backups , I have since made more backups

The inner workings of modules pkg windows and what should be 'where' is still giving me some confusion

Also this is my normal prompt 3441hp 2467m 901mv >

In using this trigger (&hp)hp (&mana)m (&move)mv > for each character, for a gauge it only works for Sutex, Halix the variables are empty, and Zarlix only mana shows up
at a loss as to why


EDIT , ha you had post in the making while I posted

Thank for letting me pick you brain :)
_________________
Entropy rules
Reply with quote
shalimar
GURU


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

PostPosted: Wed Apr 11, 2018 7:54 pm   
 
That shortcut method of defining variables is likely the issue, it might be defining them as local to the trigger (in the supersession) as opposed to local to the session causing it to fire.

Ideally yes, the supersession would take care of captures and stuff as well, as those are not intrinsically character specific, like class based powers.

I am mildly concerned about having 3 windows named Chat, but scoping should take care of that once the windows are created, if not, you may need to rename them to be more character specific:

#CAP %concat(%sessionid, "Chat")

This could be applied to variables as well, if needed:

#VAR %concat(%sessionid, "Health") {value}
_________________
Discord: Shalimarwildcat
Reply with quote
Sutex-Kindred
Apprentice


Joined: 26 Aug 2009
Posts: 141

PostPosted: Thu Apr 12, 2018 1:23 am   
 
You're loosing me in these definitions the language your using is specific to the knowledge I'm seeking

I madly searching reading the help files looking for explanation for 'shortcut method of defining variables' 'like class based powers.' 'scoping'

And the chat Windows, I posted link above showing it , are Called Chat Tell Clan Group GroupHealth

You have given me a lot to work with and read up about .. cheers
_________________
Entropy rules
Reply with quote
shalimar
GURU


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

PostPosted: Thu Apr 12, 2018 3:09 am   
 
Quote:
In using this trigger (&hp)hp (&mana)m (&move)mv

That is the method I speak of, where the variable definitions are in the pattern itself rather than in the body of the trigger

Scoping is what keeps the settings of one package from seeing the contents of another package.
In this case, it is what keeps the individual character settings from being seen by the others, even though the supersession can see them all.
It is a more generalized programming concept not unique to CMUD that is only relevant due to the nature of multi-package configurations.
Specifically in the case of similarly named settings.

And the class-based powers would be specific to whichever MUD you are playing.
Those abilities which make them an intrinsic part of the team.

I apologize for the confusion.
_________________
Discord: Shalimarwildcat
Reply with quote
Sutex-Kindred
Apprentice


Joined: 26 Aug 2009
Posts: 141

PostPosted: Thu Apr 12, 2018 11:22 am   
 
%sessionid Is this code or do I have to change it to the Name of whatever global window I drop this trigger into
What format is the below, Cmud ? tried saving it as a XML to import didn't work.
So just pasted the whole lot into a new Trigger. without the #TR

Trying to work out where it goes I asked above .pkg in what should be included

Sutex. pkg has Halix and Zarlix ticked , while Halix & Zarlix only have them self's, and do I need those English direction ?

#TR {%sessionid reports: (%d)/(%d)H, (%d)/(%d)M, (%d)/(%d)V } {
health=%1
healthMax=%2
mana=%3
manaMax=%4
vit=%4
vitMax=%6
}

(Sutex) reports: (%d)/(%d)H, (%d)/(%d)M, (%d)/(%d)V
_________________
Entropy rules
Reply with quote
shalimar
GURU


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

PostPosted: Thu Apr 12, 2018 11:32 am   
 
%sessionid is an internal function that returns the name of the session (Sutex Halex Zarlix or the super), it should expand as such as the trigger fires.

Each individual character window should see the super, itself and the english keypad and directions (yes you need those for the numpad compass movement macroes), but not the other characters.
The super should be the only one with all three characters ticked.

As to where to put the trigger initially... that is command line code, so it can be entered on the command line, and then physically moved where it needs to go (in the super) via the GUI.
_________________
Discord: Shalimarwildcat
Reply with quote
Sutex-Kindred
Apprentice


Joined: 26 Aug 2009
Posts: 141

PostPosted: Thu Apr 12, 2018 11:47 am   
 
There's No super I think you think I have Four when I have only three the links was above

"To clarify this is My supersession, these 3 windows that's 3 pkg http://forums.zuggsoft.com/forums/viewtopic.php?t=39236"
_________________
Entropy rules
Reply with quote
shalimar
GURU


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

PostPosted: Thu Apr 12, 2018 11:51 am   
 
As I said in that thread:
Quote:
As I recall, it takes one more session then the number of characters being used.

The Host session should be named for the game, and this is the session that will have the map and any shared settings. It should have no connection settings of its own.
Each of the Character sessions should be named for the character, and all it needs to worry about is character specific settings.
_________________
Discord: Shalimarwildcat
Reply with quote
Sutex-Kindred
Apprentice


Joined: 26 Aug 2009
Posts: 141

PostPosted: Thu Apr 12, 2018 12:03 pm   
 
Ok That's not been done as it corrupted the whole layout last time I tried to make this 'Fourth session' , clearly don't know what I'm doing

So Sutex is my Supersession as that has everything ticked you see in the above link
_________________
Entropy rules
Reply with quote
shalimar
GURU


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

PostPosted: Thu Apr 12, 2018 12:11 pm   
 
In that case, much of what I am trying to suggest doesn't apply to your setup, as I am trying to show the idealized method.
It can certainly be kludged to work with what you have, but referencing things becomes trickier, as you are discovering.
_________________
Discord: Shalimarwildcat
Reply with quote
shalimar
GURU


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

PostPosted: Thu Apr 12, 2018 12:13 pm   
 
You will want to create a fourth package, either way, to house any shared settings (like status and channel captures).
It doesn't need a session of its own to go with it, the supersession is just ideal for your situation, predefined regular multi-accounting.
_________________
Discord: Shalimarwildcat
Reply with quote
shalimar
GURU


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

PostPosted: Thu Apr 12, 2018 12:26 pm   
 
I assume the corruption came from the fact that one session already had two sessions attached to it (a false supersession if you will).
So them when you made the fourth, and then attached all three to it, two of them are technically attached twice (via the false supersession).
So, in this case, the false supersession needs to be broken apart (not sure if there are means for this), or recreated as a single session, before being included into the new true supersession.
...If that makes sense.
_________________
Discord: Shalimarwildcat
Reply with quote
Sutex-Kindred
Apprentice


Joined: 26 Aug 2009
Posts: 141

PostPosted: Thu Apr 12, 2018 12:41 pm   
 
shalimar wrote:
I assume the corruption came from the fact that one session already had two sessions attached to it (a false supersession if you will).
So them when you made the fourth, and then attached all three to it, two of them are technically attached twice (via the false supersession).
So, in this case, the false supersession needs to be broken apart (not sure if there are means for this), or recreated as a single session, before being included into the new true supersession.
...If that makes sense.


Yes it looked ( messed up multi windows everywhere) like how you describe

So at least I know why it wasn't working ( my triggers )It was an Import from Zmud all those moons ago, added too like the Chat windows so its a mess. lol
_________________
Entropy rules
Reply with quote
Sutex-Kindred
Apprentice


Joined: 26 Aug 2009
Posts: 141

PostPosted: Thu Apr 12, 2018 12:46 pm   
 
Will have a look at it again try and get it right If you look iat the link image above

I need to export
3 Char to XML
Chat windows to XML
Map to XML

Then ? make the no connection . Pkg
Then ? import to where ?

Will think on it work it out .. if your not up too step by step instructions :)
_________________
Entropy rules
Reply with quote
shalimar
GURU


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

PostPosted: Thu Apr 12, 2018 1:32 pm   
 
Map is a separate file, so it should be fine as is, just locate it so it can be renamed and moved
just need XML of the 3 characters, they likely all have redundant capture info at the moment which we can consolidate into the 4th package

Make each of the 3 new character sessions.
Import from XML.
Ensure they connect properly.

Make your new supersession named for the mud.
Connect to it offline.
Immediately open up settings and go into the advanced properties of the main window to turn off connection settings.
Open up the map (give it a second as it makes a new map file: SessionName.dbm).
Close CMUD.

Open file explorer.
Rename current good map to SessionName.dbm
Move renamed map file to: Documents/My Games/CMUD/SessionName (confirm replacement)

Reopen CMUD and the new SupperSession.
Start adding individual Character sessions.
Manually close out CMUD and reopen to ensure that all sessions are being loaded correctly.

I think that should do it.
_________________
Discord: Shalimarwildcat
Reply with quote
Sutex-Kindred
Apprentice


Joined: 26 Aug 2009
Posts: 141

PostPosted: Fri Apr 13, 2018 2:41 am   
 
When I open Cmud I have an Untitled window cant find anyway to import the XML , other than opening the editor, when I import the XML I then have an Check 'Untitled' empty as a.pkg

When You say make a session, what do you mean. Brand new Session, which means adding passwords name of Mud, when I do that I need to load a .pkg

Missing something here
_________________
Entropy rules
Reply with quote
shalimar
GURU


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

PostPosted: Fri Apr 13, 2018 5:34 am   
 
If you have a surplus window, you could always just delete it.
As to the package, you will have to edit whichever session it is attached too and remove it from the list shown on the packages tab.

In the case of the old false supersession that needs to be remade as a lone character session, yes.
The emphasis is on using the character name as the title so it makes CharacterName.pkg
_________________
Discord: Shalimarwildcat
Reply with quote
Sutex-Kindred
Apprentice


Joined: 26 Aug 2009
Posts: 141

PostPosted: Fri Apr 13, 2018 6:28 am   
 
Sorry still not understanding how to use the XML files

The way I'm doing it, the check 'Untitled' empty.pkg is greyed out, I cant delete it

..............

Do I click make a new session ?

Or do I open setting and import the XML. And then save that as a .pkg

So I would then have separate Named .pkg for each Chat window and the 3 Char. ( this way is giving me that Untitled window in the tree view and the greyed out empty.pkg I cant delete it )

When I first exported SUTEX , ( that's the sutex itself only, not everything in sutex , like the Chat and map )and then re-imported
it had this an Untitled window in the tree view. I deleted that and exported it again.
_________________
Entropy rules
Reply with quote
shalimar
GURU


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

PostPosted: Fri Apr 13, 2018 3:29 pm   
 
Individual windows are a component of a package, the various chat windows belong to their respective character.pkg files.
If the pkg file is greyed out then it likely thinks it is associated with the session itself.

Sounds like you forget to title the new supersession as you created it, which then forced the OS to use a default name of some sort.
Renaming it after the fact doesn't change the names of the files associated with it though.
Easy enough to fix, if a bit of a hassle to start the supersession over again.
_________________
Discord: Shalimarwildcat
Reply with quote
shalimar
GURU


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

PostPosted: Fri Apr 13, 2018 3:30 pm   
 
You make a new session and import from the file menu of the settings editor.
_________________
Discord: Shalimarwildcat
Reply with quote
Sutex-Kindred
Apprentice


Joined: 26 Aug 2009
Posts: 141

PostPosted: Sat Apr 14, 2018 12:02 am   
 
I don't have a supersession

Everything that can be exported to XML in this image has been Exported these 3 windows their 3 pkg http://forums.zuggsoft.com/forums/viewtopic.php?t=39236"

Plus each Chat window you see which was apart of Sutex.pkg
_________________
Entropy rules
Reply with quote
shalimar
GURU


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

PostPosted: Sat Apr 14, 2018 1:00 am   
 
Sutex had been your attempt at a supersession, no?
I assume that's why the other chat windows are clinging to it.

As far as the number of XML files, that is correct, one for each character.
_________________
Discord: Shalimarwildcat
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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