.


Welcome to Quake3World: Your World is waiting...



UBBFriend: Email This Page to Someone!
  Quake3World.com Forums
  Editing & Modifications
  The very first tutorial to be released on Q3A mods

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   The very first tutorial to be released on Q3A mods
UN-Peacekeeper
Insane Quaker

Posts: 1982
Registered: Jan 2000

posted 01-15-2000 05:44 AM     Click Here to See the Profile for UN-Peacekeeper   Click Here to Email UN-Peacekeeper     Edit/Delete Message Reply w/Quote   
Just kidding. try this one out for a funny effect.

open in the game project the g_client.c file. Go to the bodysink section. The code look like this

quote:
=============
BodySink

After sitting around for five seconds, fall into the ground and dissapear
=============
*/
void BodySink( gentity_t *ent ) {
if ( level.time - ent->timestamp > 6500 ) {
// the body ques are never actually freed, they are just unlinked
trap_UnlinkEntity( ent );
ent->physicsObject = qfalse;
return;
}
ent->nextthink = level.time + 100;
ent->s.pos.trBase[2] -= 1;
}



Change the
quote:
( level.time - ent->timestamp > 6500 )
to
quote:
( level.time - ent->timestamp > 65000 )
(just add a 0) and
quote:
ent->s.pos.trBase[2] -= 1;
to (cgange the - to a +)
quote:
ent->s.pos.trBase[2] += 1;
This will give you the following effect:
When you kill someone, instead of sinking into the ground it flies up in the air.


------------------
We are all just humans.


[This message has been edited by UN-Peacekeeper (edited 01-15-2000).]

UN-Peacekeeper
Insane Quaker

Posts: 1982
Registered: Jan 2000

posted 01-15-2000 05:48 AM     Click Here to See the Profile for UN-Peacekeeper   Click Here to Email UN-Peacekeeper     Edit/Delete Message Reply w/Quote   
Hey, watta you know. I think this IS the very first tutorial on mod making for quake3arena!

------------------
We are all just humans.


UN-Peacekeeper
Insane Quaker

Posts: 1982
Registered: Jan 2000

posted 01-15-2000 07:31 AM     Click Here to See the Profile for UN-Peacekeeper   Click Here to Email UN-Peacekeeper     Edit/Delete Message Reply w/Quote   
Check this one out. Doesn't everyone likes/hates tha stupid rocketlauncher because it does splash damage but is's so damn slow? Try this. Open the file bg_pmove.c goto line 1551. Change the value of addtime from 800 to 50. Now you'll be firing rockets like it's a machinegun!

------------------
We are all just humans.


hubnter-killer
Summoner

Posts: 215
Registered: Dec 1999

posted 01-15-2000 01:21 PM     Click Here to See the Profile for hubnter-killer   Click Here to Email hubnter-killer     Edit/Delete Message Reply w/Quote   
That's cool but is there any way to make the bodies stay there and pile up like a graveyard? Or would that hog too much memory?
UN-Peacekeeper
Insane Quaker

Posts: 1982
Registered: Jan 2000

posted 01-15-2000 01:39 PM     Click Here to See the Profile for UN-Peacekeeper   Click Here to Email UN-Peacekeeper     Edit/Delete Message Reply w/Quote   
You mean on the ground? That is possible. The line that sais
quote:
( level.time - ent->timestamp > 6500 )
is the line that tells q3a how long the bodies will stay. 6500 means 5 seconds. eg. if you want them to stay for 50 seconds you'd type 65000. But I think it consumes memory so I wouldn't let the bodies stay there too long.

------------------
We are all just humans.


Coriolis
Insane Quaker

Posts: 1464
Registered: Dec 1999

posted 01-15-2000 01:39 PM     Click Here to See the Profile for Coriolis   Click Here to Email Coriolis     Edit/Delete Message Reply w/Quote   
I don't know about memory, but can you imagine trying to render 100 corpses in one scene? That would be an awful slowdown of the game.
Coriolis
Insane Quaker

Posts: 1464
Registered: Dec 1999

posted 01-15-2000 01:40 PM     Click Here to See the Profile for Coriolis   Click Here to Email Coriolis     Edit/Delete Message Reply w/Quote   
And I'm betting that the time unit in that statement is in milliseconds, like all other times in q3, so that bodies really stick around for 6.5 seconds*. If the comment says otherwise, then they just changed the value but didn't change the comment.

*edit: accidentally used ms here too...

[This message has been edited by Coriolis (edited 01-15-2000).]

UN-Peacekeeper
Insane Quaker

Posts: 1982
Registered: Jan 2000

posted 01-15-2000 01:58 PM     Click Here to See the Profile for UN-Peacekeeper   Click Here to Email UN-Peacekeeper     Edit/Delete Message Reply w/Quote   
I think you're right, didn't even notice that the values didn't match (6500 = 5 sec)

------------------
We are all just humans.


Terrax
Quaker

Posts: 21
Registered: Jan 2000

posted 01-15-2000 02:01 PM     Click Here to See the Profile for Terrax   Click Here to Email Terrax     Edit/Delete Message Reply w/Quote   
So peace keeper. When are you going to start a tutorial site...

Kind of like www.planetquake.com/qdevels/ only for quake3. It would be a great place to give a ordered list of all your little modifications, and it would really help stupid newbies like me out. I really think you should consider it, unless you already know of a site like this.

UN-Peacekeeper
Insane Quaker

Posts: 1982
Registered: Jan 2000

posted 01-15-2000 02:06 PM     Click Here to See the Profile for UN-Peacekeeper   Click Here to Email UN-Peacekeeper     Edit/Delete Message Reply w/Quote   
.... .... ....well actually i'm a newbie myself. This is the first time ever that I had a look to a game's sourcecode. I've been programming VB for some time now, but thats nothing compared to C. So I'm trying to hook up with C(++). What I showed you was N.O.T.H.I.N.G. It was just a matter of changing the value of a single variable, altough you get some pretty funny effects. Its easy to get effects like this. Just look for interesting names, try to find an explenation of it, change the value and see what happens.

------------------
We are all just humans.


R1CH
Caveman

Posts: 6
Registered: Dec 1999

posted 01-15-2000 02:19 PM     Click Here to See the Profile for R1CH     Edit/Delete Message Reply w/Quote   
Any idea how to get the cgamex86.dll working yet? I've shoved it in every place imaginable and Q3 refuses to use it. I modified the gibbing code for more gibs/blood/bounciness etc but it doesn't work :
UN-Peacekeeper
Insane Quaker

Posts: 1982
Registered: Jan 2000

posted 01-15-2000 02:35 PM     Click Here to See the Profile for UN-Peacekeeper   Click Here to Email UN-Peacekeeper     Edit/Delete Message Reply w/Quote   
Have you tried the quake3 root directory (eg. c:\quake3\), thats the only place they work for me.

------------------
We are all just humans.


Coriolis
Insane Quaker

Posts: 1464
Registered: Dec 1999

posted 01-15-2000 03:33 PM     Click Here to See the Profile for Coriolis   Click Here to Email Coriolis     Edit/Delete Message Reply w/Quote   
I had to put the dll in the quake3 root directory (e:\Program Files\Quake III Arena for me), and I also had to set sv_pure to 0 to get my cgamex86.dll to work. After I did that, I had no problems.
Terrax
Quaker

Posts: 21
Registered: Jan 2000

posted 01-15-2000 04:27 PM     Click Here to See the Profile for Terrax   Click Here to Email Terrax     Edit/Delete Message Reply w/Quote   
Damnit Peace... I thought u actually knew something! Well, we need to track down someone who knows what they are doing to throw together some real tutorials for us... like homing rockets or somethin'
Nusco
Quaker

Posts: 12
Registered: Dec 1999

posted 01-15-2000 04:59 PM     Click Here to See the Profile for Nusco   Click Here to Email Nusco     Edit/Delete Message Reply w/Quote   
If you want to leave dead bodies around for a long time, you should probably make a longer body que - as it is, it's only 8 slots long (if I remember correctly). Just look for an array called BODYQUE (or BODY_QUE, or something similar) and make it longer.
DivideByZero
Caveman

Posts: 8
Registered: Jan 2000

posted 01-15-2000 05:34 PM     Click Here to See the Profile for DivideByZero   Click Here to Email DivideByZero     Edit/Delete Message Reply w/Quote   
Peacekeeper is right. VB is nothing like VC++. It can emulate some of the functionality, like classes and structures. You can even feign inheritance and polymorphism, but it is NOT the same as VC++. I've done a little bit of coding in c, C++ and Java, but I'm new to VC++ (especially wit h the Q3 code.)

Anyway - anyone get the vm tools working? I keep on getting a "bad command or file name" error when I run game.bat.

I use a batch file to set up my VC++ environment (thanks Publius) with the following lines:
SET PATH=%PATH%;c:\QUAKEI~1\BIN_NT
"C:\Program Files\micros~3\vc98\bin\VCVARS32.BAT"

I have Q3 installed in c:\quale iii arena\.

Anyone have ideas? A step-by-step would be really helpful.

Thanks.

DivideByZero

------------------
Black Holes were created where God Divided by Zero.

Orion CI
Soldier

Posts: 61
Registered: Dec 1999

posted 01-15-2000 07:54 PM     Click Here to See the Profile for Orion CI   Click Here to Email Orion CI     Edit/Delete Message Reply w/Quote   
hey peacekeeper, did you try putting the dlls in "maygame/dlls" you said you tried "mygame/dll" but not the above. =]

------------------
Why the hell do I even bother?

Coriolis
Insane Quaker

Posts: 1464
Registered: Dec 1999

posted 01-15-2000 08:01 PM     Click Here to See the Profile for Coriolis   Click Here to Email Coriolis     Edit/Delete Message Reply w/Quote   
mygame/dlls doesn't work either, at least for my cgame mod.
UN-Peacekeeper
Insane Quaker

Posts: 1982
Registered: Jan 2000

posted 01-16-2000 03:31 AM     Click Here to See the Profile for UN-Peacekeeper   Click Here to Email UN-Peacekeeper     Edit/Delete Message Reply w/Quote   
Nope, don't work.

------------------
We are all just humans.


-=Jazz=-
Commander

Posts: 83
Registered: Jan 2000

posted 01-16-2000 03:48 AM     Click Here to See the Profile for -=Jazz=-   Click Here to Email -=Jazz=-     Edit/Delete Message Reply w/Quote   
To get the vm compiler working... make sure your bin_nt dir is in the path... as well as the visual c stuff.

------------------
-= Jazz =-

PfhorSlayer
Caveman

Posts: 4
Registered: Jan 2000

posted 01-16-2000 08:17 PM     Click Here to See the Profile for PfhorSlayer   Click Here to Email PfhorSlayer     Edit/Delete Message Reply w/Quote   
has the mac source been released? are there any pages on this kinda stuff... Damn I AM a newbie...
-=Jazz=-
Commander

Posts: 83
Registered: Jan 2000

posted 01-17-2000 03:22 AM     Click Here to See the Profile for -=Jazz=-   Click Here to Email -=Jazz=-     Edit/Delete Message Reply w/Quote   
The source code is actually the same, as it runs in a virtual machine (like Java), but you'll have to use Virtual PC or something like that to actually compile to VM... VPC will be needed to extract the SDK too.

------------------
-= Jazz =-

All times are PT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | Quake3World

Powered by: Ultimate Bulletin Board, Version 5.43b
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 2000.