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
Scarn
Apprentice


Joined: 24 Jul 2005
Posts: 137

PostPosted: Thu Aug 09, 2012 12:58 am   

Button images/ CMUD GUI
 
Hey,

For once I'm not asking how to do something, how about that?

I thought I would share with you all my work in progess CMUD client (which I use to play The Two Towers MUD, a LotR based MUD - t2tmud.org:9999).

This shows what is possible by using multiple windows, with images loaded into buttons.

Note I have very very limited knowledge of scripting, so this is just the start.

Comments? Does anyone else do something simular?



Hope you enjoy,

Falgor
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Aug 09, 2012 1:20 am   
 
Buttons are really slow (or at least they were when I was doing massive coding work), so I've elected to go with an MXP-heavy UI

https://www.dropbox.com/s/wok0se9wuvjzgmt/cmud%20screen%20shot.bmp?m
_________________
EDIT: I didn't like my old signature
Reply with quote
Scarn
Apprentice


Joined: 24 Jul 2005
Posts: 137

PostPosted: Thu Aug 09, 2012 1:22 am   
 
Not sure how to use MXP, but as these buttons don't do anything they work okay.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Thu Aug 09, 2012 12:56 pm   
 
That's an excellent job.

There was a suggestion at one point of making a stickied thread where people showed shots of their rocking screen layouts. This would be a good example.
Reply with quote
Xerakon
Apprentice


Joined: 10 May 2011
Posts: 111

PostPosted: Sun Aug 12, 2012 5:55 pm   
 
Kudos on this! This is exactly the same sorta thing I was looking for earlier before I decided to go with a more simplistic approach. =)
Reply with quote
Scarn
Apprentice


Joined: 24 Jul 2005
Posts: 137

PostPosted: Tue Aug 14, 2012 6:51 pm   
 
Hmm, I have started having an issue. My gauges have stopped working, it is almost as if the variable they use will not export to a window seperate from my main one. However the clock still works, which also uses a variable made from the main window.

Any ideas?
Reply with quote
shalimar
GURU


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

PostPosted: Tue Aug 14, 2012 7:22 pm   
 
but the variables in a module, those share reguardless of window.
_________________
Discord: Shalimarwildcat
Reply with quote
Scarn
Apprentice


Joined: 24 Jul 2005
Posts: 137

PostPosted: Tue Aug 14, 2012 7:31 pm   
 
That's what I thought, but the gauges are not working unless I put them in my main window.
Reply with quote
shalimar
GURU


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

PostPosted: Tue Aug 14, 2012 7:38 pm   
 
did you try using the full variable path name on the gauge tab?
_________________
Discord: Shalimarwildcat
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Tue Aug 14, 2012 7:42 pm   
 
Could you explain exactly what the situation is? You implied at first that it was _not_ working when
the variable was defined in the main window, then you said it was not working unless you put
the variable in the main window.

A window cannot see variables that are defined in a different window. A window can see variables
that are defined in a module, provided that the module is set as global, and the window is set to
see that module.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue Aug 14, 2012 9:43 pm   
 
Quote:

A window cannot see variables that are defined in a different window. A window can see variables
that are defined in a module, provided that the module is set as global, and the window is set to
see that module.


1)windows cannot change what modules they can see. Windows can only include/exclude packages. Apart from the differences explained in #2, modules are an all or nothing affair for windows.

2)Global means that any module/window from any package can see into that module. External means that only the windows/modules from other packages can see into that module. Local means that only the windows and other modules in the same package as this module can see into the module (think along the lines of private properties in object-oriented programming).

3)CMud uses a logic tree to go looking for variables if you reference said variables using @varname syntax. The process is like so:

--first look in the window that has context
--next look in any modules in the contexted window's package that are defined as global or internal
--next look in any modules in other packages that are defined as global or external
--if still not found, create new variable in contexted window at the root level (or, if assignment is not appropriate to the activity, return a null value)

When you use @//window or module/class/.../varname, CMud does not use that logic tree and will only look at the location you specified. If the location is valid but the variable doesn't exist there, either a null value will be returned or a new variable will be created (depending on what you were doing with the variable). If the location is invalid (ie, a typo in a window/module/class name or a class was disabled), a new variable with the specified path as its name is created at the window's root level.
_________________
EDIT: I didn't like my old signature
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Tue Aug 14, 2012 11:58 pm   
 
Right, sorry. What I meant was that the _package_ had to be enabled for the window.
Reply with quote
Scarn
Apprentice


Joined: 24 Jul 2005
Posts: 137

PostPosted: Wed Aug 15, 2012 9:08 pm   
 
I'm using a variable that the MUD makes for me, an MXP variable for my Health/Energy.

It only updates if the button gauge is part of the main window, not when I put it in one of my graphical side windows.
Reply with quote
Scarn
Apprentice


Joined: 24 Jul 2005
Posts: 137

PostPosted: Wed Aug 15, 2012 9:10 pm   
 
Therefore I can't set a trigger that picks up the variable as global or anything, as I am not in control of the variable... the MUD is.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Aug 15, 2012 10:55 pm   
 
@variables are global to the session, which means it doesn't matter from which window you are referencing the variable. %mud (used for mxp variable references), %gmcp (GMCP variables), and %gsl (the old Simutronics protocol) are specific to the window, so if they are not defined in that window context you get a null value returned.

The mapper and SQL functionality operate under the same principles, as well, though in the case of SQL that means you generally get an AV error instead of a null value.
_________________
EDIT: I didn't like my old signature
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Thu Aug 16, 2012 1:38 am   
 
Perhaps you could copy the MXP variable into a global variable and use that in your button?
Reply with quote
Scarn
Apprentice


Joined: 24 Jul 2005
Posts: 137

PostPosted: Wed Oct 10, 2012 10:39 pm   
 
An update, rather than use seperate windows I just send the buttons to seperate toolbar locations. Also made a bit more space (in this instantance I am just sending the buttons to toolbar 4, vertical toolbar on the right). As this is part of the main window there is no problem with the MXP variables updating!

Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Thu Oct 18, 2012 1:19 pm   
 
Here is what I did just with buttons alone. You can see the x-ray graphic I use for my target. I can light up the limb joints with different colors showing when I break the targets limb or prep it to break and so on.

Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Thu Oct 18, 2012 1:22 pm   
 
I'm not connected obviously. I manually set it to display the red and green lights for the purpose of showing it here. Razz When I connect, the information would also be displayed in the lower toolbars as well that are showing blank right now.
Reply with quote
Scarn
Apprentice


Joined: 24 Jul 2005
Posts: 137

PostPosted: Wed Oct 24, 2012 10:45 pm   
 
Nice, that looks like a complex combat system!
Reply with quote
Scarn
Apprentice


Joined: 24 Jul 2005
Posts: 137

PostPosted: Wed Oct 24, 2012 10:49 pm   
 
Does your MUD use a lot of mxp variables, mine only uses HP and EP therefore I have to get the rest of the stuff off triggers.
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Wed Oct 24, 2012 11:03 pm   
 
It uses GMCP. Everything is updated through GMCP and triggers. I haven't played it in more than a year or so, but was trying to show what you can do with buttons. None of what I show uses MXP however.
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Wed Oct 24, 2012 11:06 pm   
 
By the way, it is a complex system. The combat in Achaea and other IRE games is very complex.
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