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
ChaosMind
Newbie


Joined: 18 Dec 2002
Posts: 3
Location: United Kingdom

PostPosted: Sat Feb 24, 2007 12:44 am   

My CMUD Adventure
 
I've just started mudding again after a break and decided to give CMUD a shot, having used ZMUD for the past 10 years or so. and I've been impressed with how nice the interface is compared to ZMUD. I have only been using CMUD for a week or so, but can readily see the potential for it becoming a fantastic replacement to the ageing ZMUD. I do, however, have a few issues with it. I realise some of these might just be specific to me, but I figured I'd post about them and other people will either confirm they have the same problem or point me helpfully in the right direction. I hope this is useful, and I hope it's the right place to be offering these thoughts.


Hanging CMUD

While I was importing many of my definitions from ZMUD into CMUD, via copying and pasting on the command line, I found a bug that consistently hung CMUD and forced me to restart it. This was done simply by having multiline #ALIAS definitions on the command line with an error (specifically, a missing parentheses). The error got picked up fine without hanging if it was just one definition per line - it is the multiple lines that appear to cause the big problem. The following will hang CMUD each time I try it (copy and paste entirely into the command line and press enter).

Code:
#ALIAS xx1 {x1}
#ALIAS xx2 {%if(%null(%1)x,;x2}
#ALIAS xx3 {x3}


Output sent to the MUD

Something I noticed creeped into later versions of ZMUD (in the 7.* series I think) was an extra blank line being added after each command, and it just annoys me that it didn't used to do it! Could there simply be a tick box in the preferences panel somewhere that said "Don't put new line on end of commands" or something, so that in the window itself no further newline was added. I realise that, ultimately, CMUD is doing the "correct" thing at the moment, but because the MUD itself assumes I'm on its prompt line it adds the newline for me whenever I send a command. To compensate for that the client needs to ignore the final new line/carriage return being DISPLAYED on the screen after sending a command (or many commands).

#KEY (macros)

In "Preferences->User Interface->Command line" there is a tick box for "Macros override menu shortcuts", which I have ticked. I am having problems with a whole number of #KEY definitions that I didn't have issues with in ZMUD. The first, and I suppose the most important one, is #KEY F10 which works once and then highlights the File menu. There are also other sets of #KEY definitions that worked in ZMUD but no longer in CMUD, such as SHIFT+(ALT or CTRL)+NUMx (that is, any numpad key). Those keys now appear to default back to their non-NUMLOCK enabled function. I haven't tried all key combinations, but it is a bit of a regression from ZMUD. I realise it's something to do with the new Delphi component being used for menus, or something, but it is a little restrictive!

Secondly, another change from ZMUD, and one I haven't found an explanation for in the documentation, is the use of aliases in macros. They don't seem to work? In ZMUD I'd have my macro definitions use an alias I'd defined, meaning that if I pressed the key or typed an alias I could be sure it'd be doing precisely the same thing (i.e. running the alias). My gripe with this is only minor, because it's easily worked around by putting #EXE at the start of each macro (although that's possibly a little more insecure, I don't fully know).

#VAR (functions)

More of a feature request than a real issue as such - being able to write bona fide user functions. I use a lot of variable functions and tend to get by, but they're tricky to maintain. It's not entirely trivial to write a function that may or may not return some string (based on some variable for example). It would be nice to have functions that I can write that can truly be used in places where something like %item might be used, without having to go around the houses a bit.


So that's it really, so far. I've been using CMUD exclusively, so I've been forced to investigate it a bit (rather than fall back on ZMUD). Hopefully some of the above is useful to someone (particularly Zugg). And thanks for continuing the development of this next generation MUD client!
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Sat Feb 24, 2007 12:57 am   
 
Code:
#ALIAS xx2 {%if(%null(%1)x,;x2}

I don't know what you are trying to do with this alias, but it's got some serious problems. First, you don't have matching parenthesis. Second, I don't know what the ; character is doing before the x2. My guess is that you probably wanted something like this:
Code:
#ALIAS xx2 {%if(%null(%1),x,x2)}

but you'll have to take a look at that.

Did you try the Compatibility Report in CMUD? It will go through all of your scripts and identify potential problems.

Output sent to MUD: Try turning on the GA/EOR option in the Emulation preferences and see if that helps. Many MUDs support the EOR option for marking the end of prompts and newlines. Someone else might also have some other suggestions. But I can't really kludge CMUD to just start removing lines...it really needs to display whatever the MUD sends. There are some tricks with triggers that might be used to use #gag to get rid of multiple lines. You might search the zMUD forum for that since it's the same between zMUD and CMUD.

#KEY: Yes, the problem with F10 is on the bug list. F10 is a Windows function to activate the menu bar, and CMUD isn't yet disabling that Windows function like zMUD did. However, the numpad macros *should* be working, so maybe you can post a specific example for us to try.

The problem with not executing aliases from macros sounds like a bug, so I'll look into it. I thought it was working.

Functions: Yes, this is planned. Can't promise which version, but real bona-fide functions are a pretty high priority for me.

Glad it's mostly working for you and that you like the direction CMUD is going. It should keep getting better and better!
Reply with quote
ChaosMind
Newbie


Joined: 18 Dec 2002
Posts: 3
Location: United Kingdom

PostPosted: Sat Feb 24, 2007 1:30 am   
 
Regarding my #ALIAS example, it was purely an example - I deliberately placed serious problems in it (the missing parenthesis) and wanted to keep it as generic as possible to not detract from the problem, I know the alias itself appears to do bugger all! Very Happy

My point was really that when I just try defining #ALIAS xx2 (for example, as above) CMUD happily reports an error as expected. But if I paste all three definitions into the command line from my first post and press return (so that they all get defined in one swoop) it causes CMUD to hang. Maybe it's just my system, which would make it a bit more confusing for anyone trying what I said and it not hanging. But that's what I was getting at.

Regarding the output to the MUD, I turned the GA/EOR option off (it was already ticked in my case) and it's done what I wanted! Thanks for pointing that out; I had noticed it before and was sure I'd tried it, but I guess I messed up somewhere.

Regarding the numpad macros, when I do CTRL+K to define a macro I then try and do (with numlock on) CTRL+SHIFT+KEY7, however it defines the macro CTRL+HOME (i.e. KEY7 when numlock is off). I assume the SHIFT is acting in a similar way to numlock as it does to capslock, and "nullifies" its effect (although it doesn't work the opposite direction - I can't turn numlock off and have SHIFT temporarily turn it on). What I don't know is whether this is a CMUD thing or if it's a Windows (XP, btw) thing.

Thanks for your hard work on CMUD, really am impressed with it. And thanks for pointing me in the right direction for fixing the new line that had really irritated me for years!
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Sat Feb 24, 2007 3:38 am   
 
Ahh, ok, sorry I misunderstood. I just fixed some issues with the %if function today, so maybe that fixed it. I just entered your 3 lines into my latest development version and it didn't hang.

I see what you mean by the CTRL-SHIFT-KEY7 issue. Did this work in zMUD? Seems like it's just what Windows is reporting. The Shift key can be used to toggle the keypad functions. So I think it's Windows that is making the "SHIFT-KEY7" into the "HOME" key, and then calling it CTRL-HOME.

In any case, it seems to work. Even though it says "CTRL-HOME" in the settings editor, if I save the macro and then press CTRL-SHIFT-KEY7, then it seems to execute the macro correctly.

My guess is that it is just a problem with importing zMUD. I don't see any problem in actually defining and using the macros in CMUD. I just used Ctrl-K to assign different commands to KEY7, SHIFT-KEY7 (showed as HOME), CTRL-KEY7, and CTRL-SHIFT-KEY7 (showed as CTRL-HOME). All 4 macros worked fine with NumLock enabled. When numlock is disabled, then only the HOME and CTRL-HOME macros worked.
Reply with quote
ChaosMind
Newbie


Joined: 18 Dec 2002
Posts: 3
Location: United Kingdom

PostPosted: Sat Feb 24, 2007 4:46 am   
 
I've just reinstalled some old ZMUD versions to test out the macros on numpad keys, and they all function the same as CMUD is now doing, and just as you describe. It could be I'm getting a bit confused, but I'm sure it used to work once - perhaps it was different on Windows Professional 2000 or similar, some of my settings could easily go back to that period.

Ultimately, to put a more practical view on this, the whole reason I asked about the numpad keys is because I use the numpad for directional behaviour, with CTRL+KEYx doing "swim x" for example and ALT+KEYx doing "cast @target x", and that's my limit without adding the SHIFT modifier, but while CTRL+HOME might at least work (even though it clashes with a macro I might have on the actual CTRL+HOME), the SHIFT+CTRL+KEY8 grouping cannot even be defined (as this would presumably be CTRL+UP, which appears to do scrollback). It's not the end of my world to not have more numpad flexibility, but if it's doable sometime in the future; it'd be a bonus.

Incidentally, is there any way to utilise the "Start" key found on most keyboards as a modifier key? That would add at least another four or five groups of modifiers that could be used for, say, function keys. I mention this as I recall using (briefly) a client on Linux that allowed the "Start" key (I believe they gave it the title of META key) as a modifier in a similar way to CTRL, ALT and SHIFT. No doubt there's some valid technical reason why it isn't done like that on Windows, but it would open up more key combinations for those who like bashing buttons.
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Sat Feb 24, 2007 6:01 pm   
 
My Windows key is not in a useful place on my laptop keyboard - I have a Fn function key in it's place (for doing things like putting the computer into standby or changing the contrast). On a similar note, would it be possible to use this as part of a key combination?
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Feb 26, 2007 6:52 pm   
 
CMUD (and zMUD) can only respond to keyboard events issued by your keyboard driver in Windows. Windows assigns "virtual key codes" to the keys on your keyboard. CMUD/zMUD does not have low-level hardware access to your keyboard. If your keyboard driver sends a proper keypressed message to CMUD, then it should show up when you press the key combination in response to the Ctrl-K prompt. If you press Ctrl-K and then your keyboard combination and nothing happens, it means that your keyboard driver isn't sending that key combination to applications.

From what I understand, the "Start" key (also called the Windows key) is reserved by the Windows operating system itself and it used for global system shortcuts. I do not believe that this key or it's combinations are sent to applications as normal keypress events.

The Fn key on most laptops are hardware related and used to change various hardware settings. For example, on my laptop it can be used to enable/disable the VGA output, enable/disable the wireless antenna, change the speaker volume, etc. Again, I believe these functions are handled directly by the keyboard driver written by the computer manufacturer and are not sent to applications as normal keypress events.

I use a Logitech Media keyboard, for example. And when I press the keys for Play/Stop/FF/RW they do not get sent to applications. They are trapped by the Logitech keyboard driver and converted to various Windows system messages for controlling the active media player.

All of this is operating system dependent. Obviously another OS such as Linux is going to treat the keyboard completely differently since the keyboard drivers are completely different and Linux doesn't use the same "virtual key code" system that Windows does. So just because it can be done in Linux doesn't mean it can be done in Windows.

Yes, it's technically possible to get down deep into the low level hardware system, but Microsoft is making this harder and harder for non-Driver software and that would just make zMUD/CMUD less reliable and more hardware dependent. Not something that I plan to do.
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Tue Feb 27, 2007 12:24 am   
 
Yeah, that's what I figured. Sad
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