Welcome, Guest! Login | Register

Setting up your Quake 3 mod's sourcecode to work. [Print this Article]
Posted by: Deepflame
Date posted: Nov 03 2003
User Rating: 5 out of 5.0
Number of views: 8609
Number of comments: 0
Description: This should help you get your Quake 3 mod going in no time. :)
First download the latest source from ftp.idsoftware.com.
Then download the .zip at http://www.nofadz.com/blackened/q3stuff.
Also get my zip file if you're running on W9X_ME, since they have a different DOS. (Batfiles differ in the SET command.)
http://articles.thewavelength.net/uploads/...%20Batfiles.zip

Open up your Quake 3 directory, and make a new directory for your mod. I called my first mod Test. (It's how I call all my first attempts, so I called my dir like that. I also extracted my SDK in a dir called Test, etc. :))

In this directory, make these directories:
Required (Well, for this article anyhow):
1) "vm" - This is where your VMs go.

Optional:
2) "maps" - This is where all the levels and bot scripts go.
3) "models" - This is where all the models go.
4) "scripts" - This is where all the shader scripts go.
5) "sound" - This is where you put your sounds.
6) "music" - This is where you put the music.

Now, this is a coding related article, so from here on we'll only continue on the VM dir.

Extract the Q3 game source. Then extract the downloaded .zip(s) over your Q3 source directory. Make sure it overwrites the files and is extracted in the right directory. (Extract my zip file last if you're running on windows 95,98 or ME, otherwise Omega's batfiles will overwrite mine and it wont compile!!)

Open the Q3 game source directory, open the code directory, and open the cgame directory.
Then open cgame.q3asm in your favorite text editor, mine being notepad.

Change the first line from
-o "\quake3\baseq3\vm\cgame"
to
-o "\quake3\Test\vm\cgame"

Notice how I changed the directory? Repeat this for all the other subdirectories. This is where the compile process outputs the file+filename. In this case, it would be put on <drive source located>:\quake3\Test\vm\cgame.qvm. You can alter this to whatever you want, just change the mod dir path right, otherwise you might find your original Quake 3 to get.. odd behaviour if you alter stuff. ;)

Now, depending on your OS either run my bats or omega's bats, everything should compile fine.
You compile Game, CGame and either UI or Q3_UI. The difference between UI and Q3_UI is that UI is a scriptable UI, and Q3_UI is a hardcoded UI. Right now I prefer Q3_UI. You can just execute the full_ui.bat batfile that comes with the SDK, it defaults to q3_ui.

Providing everything compiled fine, little thought on that three paragraphs ahead, you should see a Test dir appearing in the Quake3 dir on the HD you have your sourcecode on. If this is not the same drive as where you installed Quake3, you can either copy the .VMs over all the time, or edit the .q3asm files and set them to the right path.

Next, make a .pk3 file. (Just make a new zip file and rename it to pk3) You don't have to put anything in it just yet. Just let it sit there. :)

Now boot Q3 and you should see your mod in the mods dir.
Load it, exit, and well, you still don't know if it loaded your mod or not because the UI is the same. :)
Just to test it open up ui_menu.c in q3_ui, and replace color_red with color_blue. Save, compile and test. The buttons should be blueish now. :)

Now, if everything didn't compile fine, open a MS-DOS prompt, it's likely that the path isn't set right. Go to your sourcecode dir, execute the right Setup batfile, then execute the one you like to compile, full, full_ui, or the bits on their own. If it still doesn't compile, you can always ask on the forum.

Happy modding! :)
- Deepflame

Additional notes:
You can also compile the Quake3 sourcecode as DLLs, but you don't place these DLLs in the VM directory, no, they go straight into your moddir. QVMs however do go into your VM dir. The QVMs are compiled with the batfiles, the DLLs are done through any C compiler you want. I use Visual Studio 6 (Mainly because I got that one, learned how to work in it and learned to love it because of HL ;))

If your quake3 folder does not have "quake" in it, use the executables included in omega's zip. He has patched them so that they can be executed from anywhere, without requiring a specific path. Ie; C:\games\q3a or C:\q3 etc.

To run your mod:
quake3.exe +set fs_game moddir
Or if you use DLLs:
quake3.exe +set sv_pure 0 +set fs_game moddir

Rate This Article
This article is currently rated: 5 out of 5.0 (1 Votes)

You have to register to rate this article.
Related Files
Zip FileFilename: Deepflames Batfiles.zip
File Size: 4.2 KB

User Comments

No User Comments

You must register to post a comment. If you have already registered, you must login.

Latest Articles
3rd person View in Multiplayer
Half-Life 2 | Coding | Client Side Tutorials
How to enable it in HL2DM

By: cct | Nov 13 2006

Making a Camera
Half-Life 2 | Level Design
This camera is good for when you join a map, it gives you a view of the map before you join a team

By: slackiller | Mar 05 2006

Making a camera , Part 2
Half-Life 2 | Level Design
these cameras are working monitors that turn on when a button is pushed.

By: slackiller | Mar 04 2006

Storing weapons on ladder
Half-Life 2 | Coding | Snippets
like Raven Sheild or BF2

By: British_Bomber | Dec 24 2005

Implementation of a string lookup table
Half-Life 2 | Coding | Snippets
A string lookup table is a set of functions that is used to convert strings to pre-defined values

By: deathz0rz | Nov 13 2005


Latest Comments
knock knock
General | News
By: omega | Dec 22 2016
 
knock knock
General | News
By: MIFUNE | Oct 10 2015
 
New HL HUD Message System
Half-Life | Coding | Shared Tutorials
By: chbrules | Dec 31 2011
 
knock knock
General | News
By: Whistler | Nov 05 2011
 
Particle Engine tutorial part 4
Half-Life | Coding | Client Side Tutorials
By: darkPhoenix | Feb 18 2010
 
Particle Engine tutorial part 2
Half-Life | Coding | Client Side Tutorials
By: darkPhoenix | Feb 11 2010
 
Particle Engine tutorial part 3
Half-Life | Coding | Client Side Tutorials
By: darkPhoenix | Feb 11 2010
 
Game Movement Series #2: Analog Jumping and Floating
Half-Life 2 | Coding | Shared Tutorials
By: mars3554 | Oct 26 2009
 
Particle Engine tutorial part 5
Half-Life | Coding | Client Side Tutorials
By: Deadpool | Aug 02 2009
 
Particle Engine tutorial part 5
Half-Life | Coding | Client Side Tutorials
By: Persuter | Aug 02 2009
 

Site Info
297 Approved Articless
8 Pending Articles
3940 Registered Members
0 People Online (6 guests)
About - Credits - Contact Us

Wavelength version: 3.0.0.9
Valid XHTML 1.0! Valid CSS!