Joined: 07 Sep 2002
|Posted: Sun Sep 28, 2003 5:24 pm Post subject: FuhQuake QC Extension System
Disclaimer : Most ppl won't be interested by this.
FQ v0.30+ implement the Darkplaces QC extension system. Basically its a set of extensions to the server that gives more power to mod authors. I chose the DP system because its the most widely used/implemented system, and in fact pretty much 'the thing' amongst netquake engines.
I have uploaded a small demonstration :
It is the latest frogbot clan arena (made by paraboil) with a small example of what is made possible by the QC extensions in FQ v0.30 and above.
Using the qwprogs.dat in the above zip, you can now change frogbot skill with "/cmd skill 5" or whatever. If you've ever played frogbot you know that it is a bit hard to change skill. Now it's pretty easy.
The zip above contains both the qwprogs.dat, and files I modified from the frogbot source. All changes to source are marked with //FUHQUAKE EXTENSIONS .
A list of the extra QC functions is given below. The name of the DP extension that defined the QC function is given above it. For example if the DP_QC_MINMAXBOUND extension is supported, you can use the min/max/bound functions. A description of what the QC functions do is given in the dpextensions.qc file in the above zip.
void(entity from, entity to) copyentity = #400;
string(entity ent) etos = #65;
entity(string field, string match) findchain = #402;
entity(string field, float match) findchainfloat = #403;
entity(entity start, float fld, float match) findfloat = #98;
float(float a, float b) min = #94;
float(float a, float b) max = #95;
float(float minimum, float val, float maximum) bound = #96;
vector() randomvec = #91;
float(float f) sin = #60;
float(float f) cos = #61;
float(float f) sqrt = #62;
float(float f, float f) pow = #97;
void(vector dir) vectorvectors = #432;
float(string s) strlen = #114;
string(string s1, string s2) strcat = #115;
string(string s, float start, float length) substring = #116;
vector(string s) stov = #117;
void(entity e, string s) clientcommand = #440;
float(string s) tokenize = #441;
string(float n) argv = #442;
float(string extension) checkextension = #99;
You check if an extension is supported like so:
The first check checks to see if the server supports the DP extension system. If it does, it means the checkextension bultin is available. The second checks to see if it specifically supports the "KRIMZON_SV_PARSECLIENTCOMMAND" extension.
Read dpextensions.qc for more info.
Note that the DP system isnt perfect, but it is the system most mod authors are familiar with.