View previous topic :: View next topic |
Author |
Message |
Baker

Joined: 14 Mar 2006 Posts: 1538
|
Posted: Mon Jan 25, 2010 11:43 am Post subject: qcexec: Execute qc functions from the console |
|
|
Not new. But I don't hear it mentioned often -- err at all -- and want to draw attention to this this old tutorial.
Qcxec Tutorial --- execute QuakeC from the command line:
http://www.quake-1.com/docs/quakesrc.org/143.html
By the way, if anyone can shed like on great uses for this feature .... _________________ Tomorrow Never Dies. I feel this Tomorrow knocking on the door ... |
|
Back to top |
|
 |
mh

Joined: 12 Jan 2008 Posts: 910
|
Posted: Mon Jan 25, 2010 11:58 am Post subject: |
|
|
Hmmmm - I'd totally forgotten about that one. It would need to be extended to take function params of course, but otherwise it seems quite a neat little feature to have and if we could get a standardised version of it implemented in all engines we might have something useful for modders to take advantage of.
I'm thinking no more need to use impulses, just bind a key to a "qcexec" command. _________________ DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines |
|
Back to top |
|
 |
Spike
Joined: 05 Nov 2004 Posts: 944 Location: UK
|
Posted: Mon Jan 25, 2010 12:09 pm Post subject: |
|
|
most of the uses for this are superceeded by KRIMZON_SV_PARSECLIENTCOMMAND.
the remaining uses are for server admins only, but it generally doesn't permit remote admins.
it could be used for loading, say, frikbot waypoints, if the frikbot code was modified to use it.
as a tutorial, it demonstrates how to invoke QC code from the engine, and how to register new console commands. _________________ What's a signature? |
|
Back to top |
|
 |
Baker

Joined: 14 Mar 2006 Posts: 1538
|
Posted: Mon Jan 25, 2010 12:18 pm Post subject: |
|
|
I figured most uses of this would be as a QuakeC testing tool, never thought of the substitution for impulses idea (although I'm not sure that is a good substitute, heh). _________________ Tomorrow Never Dies. I feel this Tomorrow knocking on the door ... |
|
Back to top |
|
 |
Downsider

Joined: 16 Sep 2008 Posts: 478
|
Posted: Mon Jan 25, 2010 7:09 pm Post subject: |
|
|
Just wondering, Quake only allows for one impulse per frame, if I were to use this, could I do multiple? And does it work online? |
|
Back to top |
|
 |
Teiman
Joined: 03 Jun 2007 Posts: 309
|
Posted: Mon Jan 25, 2010 8:04 pm Post subject: |
|
|
Downsider wrote: | Just wondering, Quake only allows for one impulse per frame, if I were to use this, could I do multiple? And does it work online? |
I suppose it works serverside. I don't think it works online.
humm... as a substitute for impulse is sound.. unfortunally, compatibility > all. and since impulse is compatible everywhere, maybe qcexec for that only make sense on total conversions...
I dont know of any user case for this thing. |
|
Back to top |
|
 |
mh

Joined: 12 Jan 2008 Posts: 910
|
|
Back to top |
|
 |
Team Xlink
Joined: 25 Jun 2009 Posts: 320
|
Posted: Mon Jan 25, 2010 8:26 pm Post subject: |
|
|
I have used that tutorial and it is worth it. It makes it very easy to test case specific occurrences in the qc code. Such as a function that says dominating when a player kills 6 other players with his boomstick in 3 seconds. I know it is a very unlikely case but it is an example.
I thought this was considered a standard already in the sense that most engines have it.
It is really useful. _________________
Anonymous wrote: | if it works, it works. if it doesn't, HAHAHA! |
|
|
Back to top |
|
 |
Downsider

Joined: 16 Sep 2008 Posts: 478
|
Posted: Mon Jan 25, 2010 9:53 pm Post subject: |
|
|
mh wrote: | I think it should work because the command is forwarded to the server, but I haven't tested. |
I thought that too.. But aren't only certain commands passed? No need for +mlook or "help" to be passed.
Either way the modification to get it to work should be nominal. |
|
Back to top |
|
 |
mh

Joined: 12 Jan 2008 Posts: 910
|
Posted: Mon Jan 25, 2010 9:58 pm Post subject: |
|
|
According to the tutorial this one is. There's a Cmd_ForwardToServer in the function itself, and it gets a call from SV_ReadClientMessage. It would need to be forwarded to the server anyway as QC (aside from CSQC of course) only exists on the server. _________________ DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines |
|
Back to top |
|
 |
Lardarse

Joined: 05 Nov 2005 Posts: 243 Location: Bristol, UK
|
Posted: Tue Jan 26, 2010 11:35 am Post subject: |
|
|
Baker wrote: | I figured most uses of this would be as a QuakeC testing tool, never thought of the substitution for impulses idea (although I'm not sure that is a good substitute, heh). |
That seems to be the biggest use of it. Would be very useful to have just for that purpose. Especially for testing edge cases... _________________ <ekiM> Son, you're writing data structures your CPU can't cache. |
|
Back to top |
|
 |
|