Getting Started Modding
From Quake Wiki
--MOVED FROM OLD WIKI NEEDS CLEANING--
Getting started with Quake modding
This is intended as a basic guide to getting the resources needed to start making a mod, some suggestions on first mods to make to learn the language and nature of Quake modding, and links to forums and IRC channels and other resources relevant to Quake modding.
N.B. there is a DarkPlaces bias to this page, as it is a good engine for developing mods, any other engine authors should feel free to add links to their ?extensions.qc files and other resources relevant to their engine, but please try to keep this page a managable size, as it is only a getting started guide, not the whole Wiki :)
Making your mod directory:
First you need to make a directory inside your quake directory, for instance leetrockets, or mymod (you can rename it later), all files and ?paks inside this directory will be loaded at a higher priority than the ones in the id1 directory, but files you did not replace will come from the id1 directory, so for instance if you make a mymod/?progs.dat (by compiling QuakeC code), it will override the ?progs.dat file contained in id1/pak0.pak, thus changing the gameplay behavior, but all other files come from the id1 directory (for instance progs/player.mdl in id1/pak0.pak). It is common for people and this wiki to refer to your mod directory as mymod, do not take this literally, it simply means whatever you named your mod directory, and most filenames mentioned in Quake modding discussion are inside a mod directory, so when people talk about ?progs.dat they are referring to quake/mymod/?progs.dat or similar files.
Then make a quake/mymod/qc directory to hold the QuakeC code you will be working on, you can name this directory something else if you prefer (id Software called it progs, some people call it src).
Pick a base source code: Quake 1.06 qc source: http://icculus.org/twilight/darkplaces/files/id1qc.zip (extract to mod/qc directory if you want singleplayer support) Quake 1.06 qc source with singleplayer removed: http://icculus.org/twilight/darkplaces/files/mponlyqc.zip (or extract this to mod/qc directory if you don't) (Question: where to get a good qw qc source zip?) hipnotic mission pack 1 source: http://public.www.planetmirror.com/pub/idgames2/more_idstuff/hipnotic/qc.zip (due to HUD differences you should run your mod with the commandline options -hipnotic -game mymod) rogue mission pack 2 source: http://public.www.planetmirror.com/pub/idgames2/more_idstuff/doe_qconly.zip (due to HUD differences you should run your mod with the commandline options -rogue -game mymod)
Take your pick of one of the two most popular compilers, or alternate whenever you feel like it:
FTEQCC compiler can be found here in commandline and Windows-GUI flavors: http://sourceforge.net/project/showfiles.php?group_id=116842 FrikQCC compiler can be found here in commandline and Windows-GUI flavors: http://www.inside3d.com/frikbot/projects.shtml
Engine specific addon files:
Latest DarkPlaces ?dpextensions.qc file: http://cvs.icculus.org/*checkout*/cvs/twilight/dpmod/qc/dpextensions.qc (place in mymod/qc directory, add ?dpextensions.qc after ?defs.qc in ?progs.src file, allows use of QuakeC extensions supported by DarkPlaces engine, some of these features are compatible with other engines also) Latest DarkPlaces ?effectinfo.txt file: http://cvs.icculus.org/*checkout*/cvs/twilight/dpmod/effectinfo.txt (place in mymod directory, allows modification of particle effects when running in DarkPlaces engine)
An important note on pak archives in the various Quake engines:
Quake behavior: paks override files (meaning if the ?pak contains a default.cfg, the user can not make their own default.cfg as it will be ignored), sequentially numbered packs named pak0.pak, then pak1.pak, and so on (if there is a gap it stops looking for higher numbered paks, so pak2.pak will not be loaded if pak1.pak or pak0.pak is missing), a limit of 7 open pak archives (this counts both id1 and your mod, so be careful not to have too many pak archives). DarkPlaces behavior: files override pk3 archives which override pak archives, anything with a .pak or .pk3 extension is loaded (.pk3 is a renamed zip archive and is smaller because it is compressed), no limit on number of paks. Most other engines use the Quake behavior.
A note about stealing content from other games:
First of all, please don't, it's better to see some originality in the art in Quake mods. Secondly, you can be sued for Copyright Infringement if you do this, as the owner of the copyright controls the distribution terms (formally known as the License Agreement), and these other games usually don't have License Agreements that allow use in other games. If you must borrow content, it is best to borrow it from legitimate sources such as Nexuiz http://www.nexuiz.com or ?OpenQuartz http://openquartz.sourceforge.net/ which use the GPL license which allows redistribution and modification under the terms of the GPL. You may also ask other mod teams if you can get a license agreement for use of some of their files that are not under GPL, chances are good that they will say yes (remember however that yes is not enough, you need to include a license agreement regarding their copyrighted works).
Recommended forums: http://inside3d.com/
Recommended IRC channels:
irc://irc.anynet.org/darkplaces (modding, darkplaces engine)
irc://irc.enterthegame.com/level_design (level design)
irc://irc.quakenet.org/terrafusion (level design)
irc://irc.anynet.org/quakedev (engine development)
irc://irc.anynet.org/venr2 (modding, venr2 engine)
irc://irc.anynet.org/mindart (modding, FrikaC's tools)
For a quick crash course in QuakeC modding, try modifying a weapon to fire something different, or at least change the damage values, the relevant code can be found in weapons.qc, for instance ?T_MissileTouch is the function called when a rocket hits something, spike_touch and superspike_touch are the functions called with nails or super nails hit things, ?launch_spike is the function that creates a nail... ?W_Attack contains refire times and calls the weapon fire functions, explore and have fun.
Basic tips about weapon code:
.touch is the function called when a projectile hits something (in this function self and other refer to the projectile and the hit entity, respectively), ?T_Damage and ?T_RadiusDamage are functions to call to do damage to other entities, sound plays a sound effect, the WriteByte and related function calls create network messages describing an explosion or other effect message that the client understands (however in DarkPlaces engine there are also functions to do these annoying WriteByte messages for you, such as ?te_explosion, ?te_gunshot, etc).
Good luck, and have fun :)