PDA

View Full Version : Command prefix


steve
08-02-2009, 09:18 PM
Something that's always bugged me about the emulator is that you need to hit enter before you can type the # sign, then the command. I realize this is needed because you can't alter the /commands the client understands.

However, what about using the left bracket [ key instead? You can use that without having to press enter first... it's actually used for chat server commands on Live and was curious if [ could be used for all of the emulator commands?

RichardoX
08-03-2009, 10:04 PM
I can't imagine this would be a hard alteration to the existing code. All you'd need to do is to physically change the prefix(s) for all of the commands in commands.cpp I think. I haven't looked at it in a bit but I'm sure that's all you'd need to do. I don't know about you but a lot of commands for me are hotkeyed so I don't have to type anything. (other than #spawn, etc.)

Go onto the Wiki and look up the tutorial that teaches you to compile with Visual Studio 2010 Express or 2009.. I forget.. It's free by Microsoft and everything you need to get started is in the tutorial. After you get a basic feel-about where everything is; in the explorer, navigate to "Zone" and open up commands.cpp. Everything you want to do should be in there. Simply change it and play around with that. I'm sorry if I've offended you by telling you to learn to compile, I am assuming... I probably know much less. I hope I helped.. in some way..

RichardoX
08-04-2009, 12:43 AM
Actually correction, I looked into it and I am unsure. Sorry to have misguided you in any way if I have.

Rogean
08-04-2009, 12:51 AM
Won't work. Client is hardcoded to use [ as a chat channel command. The server never sees it.

Secrets
08-04-2009, 08:05 PM
You could look into /cmd. I know Shards of Dalaya has it, I don't know if it is in Titanium, though.

steve
08-04-2009, 08:39 PM
/cmd doesn't even appear to be in Live... not sure how it could work without intervention by a certain external, illegal program.

steve
08-04-2009, 08:45 PM
Upon further investigation, they use a custom patcher that downloads modified client files. Without a doubt, they hacked in that command into their modified client.

Won't help us :(

I don't see why [ can't be used though. Certainly the client is passing off those commands somewhere. If the emulator had some sort of listener of incoming commands, certainly they could be used by the server to perform the same thing?

It looks like ; and ' work the same way. ; is an alias of [, and ' just makes you say it. Seems like ' could work?

trevius
08-04-2009, 09:51 PM
Why do you need to enter commands without pressing the enter key?

Any command build into the client most likely won't work, as the client will examine what command was issued and decide what to send the server, if anything at all. It doesn't send it directly to the server like a /say message does.

I am not sure what good /cmd would be to you anyway, as I can only guess you are wanting to not need to hit the enter key to save yourself from having to press 1 more button when entering commands. If that isn't the case and all you care about is not needing the enter key for some random reason (I dunno, maybe your enter key is broken :P), then you can always type press ' for say and then the # command, like '#help. You could also do it the long way by typing "/say #help".

If all you are wanting is to save yourself the 1 extra keystroke, then just either buy a keyboard that can have hotkeys programmed into it and set one to do "/say #", so it works no matter what chat you are in, or you can probably download some free 3rd party hotkey app somewhere to do the same thing with your current keyboard and then just set it to something like \ or something.

Rogean
08-04-2009, 11:18 PM
' is a link to /say

[ and ; are chat channels. The client makes a seperate connection to the chat channel server that is completely seperate from the emulator server. Those commands are never seen by the emulator server

steve
08-05-2009, 12:32 PM
It's not just one extra keystroke, it's enter, hold shift and then hit #, then the command. I was looking to abbreviate it to 'command. The shift key slows things down and is hard on the hands with my carpal tunnel.

Anyway, I don't see why the 'chat channel server' (do we even have this working?) can't pass commands off to the emulator server to process if it's not recognized. Seems like it would be trivial to have it listen to commands being sent and then pass them off elsewhere. But I guess that's why I'm not a programmer ;)

Rogean
08-05-2009, 02:30 PM
Anyway, I don't see why the 'chat channel server' (do we even have this working?) can't pass commands off to the emulator server to process if it's not recognized.

/facepalm

The Game Server and Chat Channel Server do not communicate with eachother. Clients make seperate connections to each of them, and they run completely seperately

steve
08-05-2009, 02:33 PM
Thanks, but you can lose the attitude next time.

Rogean
08-05-2009, 02:44 PM
Wow and I was even restraining myself. If you think thats attitude then you must get offended easily.

steve
08-05-2009, 03:01 PM
Sorry, this is the Feature Request forum after all, so that's why I posted here about it, thinking it could be changed. I just didn't understand why it couldn't be changed to pass commands back and forth.

realityincarnate
08-05-2009, 05:53 PM
For whatever it's worth, if you compile your own source, there's a define for COMMAND_CHAR near the top of command.h. You can change it from # to whatever you want, including [. You'd still need to type '[, but it eliminates the need to press enter first or hit the shift key.

gaeorn
08-05-2009, 06:45 PM
Sorry, this is the Feature Request forum after all, so that's why I posted here about it, thinking it could be changed. I just didn't understand why it couldn't be changed to pass commands back and forth.

Even if that were done, how does the chat server know when it's a command rather than just more chat? We would still have to have a special character at the beginning of the chat text for it to recognize. Since that is true, how is it an advantage using the chat server rather than say? Say goes directly to the process that executes the commands. Regardless of where the command gets sent, it has to be identified as a command. The # sign is what does that under the current system. As realityincarnate said, you can change the character used to some other character, but in any case, you would always have to type at least two characters. One for the EQ shortcut to say or chat and the other to identify the text as a command.

Given that there is no advantage to using the chat server, why would a developer want to invest the time to get interprocess communication going between the chat server and the zone process? Add to that the chat server may or may not be on the same machine as the zone process and it gets to be a bit of work.

I hope I didn't offend with this post. I simply wanted to explain why your insistence could be frustrating since there was no advantage to what you were asking for. It isn't that it couldn't be changed. It's that there is no advantage gained by doing so.

trevius
08-05-2009, 07:12 PM
If all you are wanting is to save yourself the 1 extra keystroke, then just either buy a keyboard that can have hotkeys programmed into it and set one to do "/say #", so it works no matter what chat you are in, or you can probably download some free 3rd party hotkey app somewhere to do the same thing with your current keyboard and then just set it to something like \ or something.

I think in this particular case, the best option for steve is quoted above. Most gaming keyboards even have special keys (and software) for making such macro strokes (mine has a ton of them), and if he doesn't have a keyboard that supports it, I am sure there is 3rd party software out there that can easily do it. I think it might even be built into some versions of windows under accessibility options or somewhere like that.

Maybe something like this would work:
http://www.autohotkey.com/

So_1337
08-05-2009, 07:35 PM
AutoHotkey will absolutely work, as you can script it to do anything you'd like. I use it for many, many tasks that it isn't really required for. I'm just lazy.

However, the time it'd take you to write a proper script is less than the amount of time it'd take to do the extra strokes =P