Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Morten
Apprentice


Joined: 17 Feb 2001
Posts: 119
Location: Denmark

PostPosted: Thu Sep 28, 2006 12:21 am   

Zmud Variable COM for G15 keyboard
 
i have created a small mod for the G15 keyboard to display the value from zmud variables. I use it for displaying health, spellpoints and such.
It is written in python so you need that installed check this tread on what you need:
http://www.g15forums.com/forum/showthread.php?t=955&highlight=python

get the mod here:
http://zmudtutorials.homepage.dk/python/ComZmud.py
_________________
Yugo Sangori

www.islandsofmyth.org
telnet: islandsofmyth.org port 3000
Reply with quote
shalimar
GURU


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

PostPosted: Thu Sep 28, 2006 12:49 am   
 
Okay.. i grabbed the various stuff it said was needed, (your link opened it in the browser instead of downloading direct, btw).
Now then how do i apply this?
_________________
Discord: Shalimarwildcat
Reply with quote
Morten
Apprentice


Joined: 17 Feb 2001
Posts: 119
Location: Denmark

PostPosted: Thu Sep 28, 2006 12:57 am   
 
well first open your zmud and connect to your mud, then create the variables you want, i made 7 (health,spell,energy,hunger,maxhealth,maxspell,maxenergy).

to start the mod just double click the py file

you most likely have to edit the py file otherwise you have to create the same variable as i have.

ps. yeah i know about the py file getting open just save the file
_________________
Yugo Sangori

www.islandsofmyth.org
telnet: islandsofmyth.org port 3000
Reply with quote
shalimar
GURU


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

PostPosted: Thu Sep 28, 2006 1:11 am   
 
Are you aware that pressing the fourth long button under the lcd closes the mod?

As does (ctrl +TAB)ing between mud sessions.


For added functionality, would it be possible to have the four long buttons call mud aliases?
_________________
Discord: Shalimarwildcat
Reply with quote
Morten
Apprentice


Joined: 17 Feb 2001
Posts: 119
Location: Denmark

PostPosted: Thu Sep 28, 2006 2:15 am   
 
yeah im aware the fouth button close the mod i made it that way, about tabbing (creating new windows) close the mod that is an bug an im not sure how to get around it i will do some research (beg someone to look at it Rolling Eyes )

about making the buttons able to run aliases...yup it is possible, i already made it so, just download the py file again and edit the buttons (you edit the py file) so they are match your aliases (if you dont want the fouth button check the other 3 and just rewrite the code abit to make it run aliases)

Edit: i think i solved the issue with the mod closing when ctrl-tabbing and when creating a new window, download py file again to fix it.
_________________
Yugo Sangori

www.islandsofmyth.org
telnet: islandsofmyth.org port 3000
Reply with quote
shalimar
GURU


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

PostPosted: Thu Sep 28, 2006 4:28 am   
 
I tried making the same variables in both sessions, but the variables arent updating when you switch sessions.
_________________
Discord: Shalimarwildcat
Reply with quote
Morten
Apprentice


Joined: 17 Feb 2001
Posts: 119
Location: Denmark

PostPosted: Thu Sep 28, 2006 4:52 am   
 
no that is right, this mod only works with 1 session
_________________
Yugo Sangori

www.islandsofmyth.org
telnet: islandsofmyth.org port 3000
Reply with quote
shalimar
GURU


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

PostPosted: Thu Sep 28, 2006 5:16 am   
 
Would it be possible to have it update? I can see how it would be very useful for those who play multiple muds at a time
_________________
Discord: Shalimarwildcat
Reply with quote
Morten
Apprentice


Joined: 17 Feb 2001
Posts: 119
Location: Denmark

PostPosted: Thu Sep 28, 2006 6:02 am   
 
so if you changed session while keeping the other session in the background, the LCD change to the new session? im sure it can be done just not sure on how i look into it Smile
_________________
Yugo Sangori

www.islandsofmyth.org
telnet: islandsofmyth.org port 3000
Reply with quote
shalimar
GURU


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

PostPosted: Thu Sep 28, 2006 6:37 am   
 
Question is, can you detect a session change with the COM interface?

If you can its just a matter of calling the variabe definions again.
_________________
Discord: Shalimarwildcat
Reply with quote
Morten
Apprentice


Joined: 17 Feb 2001
Posts: 119
Location: Denmark

PostPosted: Thu Sep 28, 2006 7:05 am   
 
so far i havent found any way to detect a session change with COM but i will keep looking
_________________
Yugo Sangori

www.islandsofmyth.org
telnet: islandsofmyth.org port 3000
Reply with quote
shalimar
GURU


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

PostPosted: Thu Sep 28, 2006 7:15 am   
 
Maybe if instead of accessing a local variable you made a function call, and the function could check to see which session was current and return the zmud variable?
_________________
Discord: Shalimarwildcat
Reply with quote
Morten
Apprentice


Joined: 17 Feb 2001
Posts: 119
Location: Denmark

PostPosted: Fri Sep 29, 2006 6:33 am   
 
The mod should now work with multi sessions, the values will change as you change sessions and will display the current sessions values
Remember you have to make all the variables in all your sessions otherwise it will not work (i will try to figure out how to get around that)

as always download the py file again to get the lastest update
_________________
Yugo Sangori

www.islandsofmyth.org
telnet: islandsofmyth.org port 3000
Reply with quote
Morten
Apprentice


Joined: 17 Feb 2001
Posts: 119
Location: Denmark

PostPosted: Fri Sep 29, 2006 10:12 am   
 
a small advice to automatic start the mod when you start your connection to what ever mud you play make an alias called atconnect and put in
#launch {cmd /C comzmud.py}

(i have comzmud.py in the zmud folder)
_________________
Yugo Sangori

www.islandsofmyth.org
telnet: islandsofmyth.org port 3000
Reply with quote
Azerack
Beginner


Joined: 05 Nov 2007
Posts: 14

PostPosted: Mon Nov 12, 2007 5:04 pm   
 
Nice work Morten.
Any chance this will work with Cmud as well? :)
_________________
"I'd be more enthusiastic about encouraging thinking outside the box when there's evidence of any thinking going on inside it."

- Terry Pratchett
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Mon Nov 12, 2007 5:36 pm   
 
I think you can get it to work in CMUD by changing the text "Zmud.Application" in the py file to "Cmud.Application" also if you want it loaded at startup instead of using an alias called atconnect you will need to use an event called OnConnect.
_________________
Taz :)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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