FuhQuake Forum Index FuhQuake
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FuhQuake QC Extension System

This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    FuhQuake Forum Index -> FuhQuake Docs
View previous topic :: View next topic  
Author Message
Almighty King

Joined: 07 Sep 2002
Posts: 2086

PostPosted: Sun Sep 28, 2003 5:24 pm    Post subject: FuhQuake QC Extension System Reply with quote

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;

//FRIK_FILE (incomplete)
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:

   if (!cvar("pr_checkextension"))

   if (!checkextension("KRIMZON_SV_PARSECLIENTCOMMAND"))

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.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    FuhQuake Forum Index -> FuhQuake Docs All times are GMT + 10 Hours
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

Powered by phpBB © 2001, 2005 phpBB Group

hosted by ausgamers