In 1997 Quake II was released ending the Strogg's collective leader the Makron being killed. Quake III moves away from the Strogg, but the universe's worst cybernetic foes return in Quake IV, ready to be destroyed yet again by Earth's forces. Quake II left the Strogg home planet without its planetary defenses, leaving it open for your attack as part of Earth's new armada. You help deliver the final assault to the Strogg as Matthew Kane, member of an elite squad fighting along squadmates with vehicles and advanced weaponary. Quake IV is based on the Doom III engine, although it is apparent that Quake IV will be a superior modding platform thanks to iD and Raven's efforts in optimizing the netcode, adding vehicles, and general fixes made to the engine since Doom III's release.

Report article RSS Feed Quake 4 Modding for Dummies: Part 1

A simple guide for people totally green to modding Quake 4, or even modding in general. I started modding with almost no knowledge about computers, and since no one has made a single tutorial for Quake 4 modding, I thought I would.

Posted by Slayer_2 on Mar 31st, 2009
Basic Starting a mod.

Quake 4 Modding for Dummies: Part 1

A note from the author, I assume you know nothing about modding, but if you do, this tutorial may help you learn some new things or brush up on old, forgotten ideas, so, lets get down to the basics. You'll need the base files before you can do anything. Now normally, you'd search the ".pk4" files for what you need when you need it, but today we're gonna change things up for the sake of simplicity. In case you're wondering what'll happen if un-modified files are copied out of your ".pk4" files and added to your q4base, the answer is absolutly nothing. Quake 4 will continue to act "vanilla" (meaning the same as the actual unmodded game). If you didn't understand any of what I just went on about, its ok, I'll simplify it and go over it thoroughly later.

The next thing I want to discuss is modding style. I know this'll sound cheesy, but every modder has their own modding style. Some prefer to work in the q4base folder, so they don't have to load their mod up every time they wanna test it. Others start with a new folder in the Quake 4 directory (a different way of saying "folder") and add a ".pk4" file which they modify as they go along. I'm sure some people have developed other ways of going about it. The bottom line is we're going to start using my way, as this is a tutorial subjective to my personal style and knowledge. I prefer to make folders in the q4base directory and add in files as I go. Not only is it quicker and easier, it seems to be less problematic.

File/Folder Structure and Layout

Lets get started then, ok?

First thing to do is learn the layout of Quake 4 and it's file system. This is critical to your success as a modder. If you can't properly locate and edit files, how are you going to mod? First lets find the main Quake 4 directory, this is usually in your "Program Files\id Software" folders on Windows. Mine is located at: "C:\Program Files\id Software\Quake 4". Inside this folder you'll see a folder which will be the one most focused on in this tutorial: "q4base". In short, "q4base" is the base of Quake 4, the foundation, if you will. It contains the ".pk4" files with all the content seen and used in Quake 4 as well as various other important files.

"q4base" is where we start this modding adventure. First I want you to create a new folder, name it "def". Not too hard yet, right? Thats about how hard this tutorial will get, so if you're worried about messing it up, don't sweat it. I'd like to point out that if you're following my directions properly, the worst case scenario is you will have to delete this "def" folder and your Quake 4 will be back to normal. If this folder already exists, open it up and go the the next step. Now that you're inside your "def" folder, I want you to create a folder called "weapons", if it exists, check to see if it has anything it it, if it has 11 or so ".def" files named after Quake 4 weapons, you can skip the next step.

Now that we have mastered folders it's time to move on to bigger fish. Navigate back to your q4base folder and open up "pak001.pk4". This folder contains most of the Quake 4 ".def" files as well as various other files. Let me take a moment to explain ".def" files for you: ".def" files are like simple script files which anyone can modify safely with no fear of permanently damaging their Quake 4 game. All you need to edit them is Notepad or some Linux/Mac equivalent. They amount to .txt files that tell your Quake 4 game how to do certain things. However, with their simplicity comes a lack of true, unlimited modding power. Don't expect to change certain things scripted into the engine such as amount of hitscans or fire-modes. Anyhow, back to the topic at hand. With your "pak001.pk4" open in front of you, navigate to the "def" folder, then to the "weapons" folder, then copy the contents into your "weapons" folder you made in your "q4base\def" directory. You should now have 11 weapon files in your "q4base\def\weapons folder", if you do, congrats, you're on your way to your first Quake 4 weapon mods. A hint: there may be 10 or 12 ".def" files in your weapons folder, don't panic if this is the case, as it varies depending on whether the Gauntlet and Napalm gun ".def" files are present.

Simple Weapon Mods

Alright my fellow modders, time to make that final push. We (hopefully) have now nailed folder layout and ".def" files, now that we have the chick-chick, it's time for the boom: weapon mods. Lets start with every marines favorite: the Machinegun. I'd start with the Blaster, but the Machinegun is easy to mod and has more options (clip-size, ammo count, reloading, etc). Open up the "machinegun.def" folder and marvel at the lines of meaningless code. I'd like you to learn a very important feature: the search box. Hit control + f to bring it up on Windows, Linux and possibly Mac. This search feature is like a lifeboat during the sinking of the Titanic... you can't live without it! Now that we're suited up and ready for action, lets do this!

In your search box, type in "clipsize" and then press enter. Watch as your computer seeks out the clipsize parameter for you. "clipsize" may be highlighted, but I want you to pay attention to something a few inches hortizontal of this word, the number "40" in quotes. The brighter crayons in my box of pupils may have figured out that indeed, this number controls the amount of bullets in your clip. Now I'm going to get all sentimental on you guys again and readdress the issue of modding styles. I'm willing to bet a lot of you went "OOO! Goody!" and changed the number 40 to 100, making a super-Machinegun or something (I did that once, I'll admit it). But lets just say this somehow didn't work out and Quake 4 crashed and your mod had to be deleted to fix it. To make it worse, you didn't test your changes until a week later when you wanted to frag some squibs. You're left scratching your head with no recollection of what you modifed a week ago and how you modifed it. Obviously if you did this modification correctly thats not going to happen, but roll with it for a second, as it will happen later with bigger and more ambitious modding attempts. It's happened to me, and I'm sure it's happened to others.


Documenting Your Work

Something critical in preventing head-through-monitor syndrome as well as helping other modders understand how your mod functions is documenting your work. Here is an example of a documented adjustment to my machinegun's clipsize:

"clipSize" "30" //was 40

Hint: forget grammar, make it short and sweet, and never more than a single line. To document your work, all you need to do is write two right-tilting slashes and anything after that is gone, the game engine skips right over it. Be careful though, putting slashes like this:

//"clipSize" "30" was 40

Will probably crash your game or at best, mess up your machinegun. Another mistake is forgetting the slashes completly, forcing the game enging to try and read your documentation (hint: thats bad). Here is a demonstration of a good way to mess up your game:

"clipSize" "30" was 40

By now, you're probably rolling your eyes thinking "OK Adam, we get it, tell me how to make a fully-auto DMG now!" but I can't stress proper documentation's importance enough. Just today I was wracking my brain for half an hour wondering why my game crashed upon picking up a nailgun, the answer: I had written "/was 50" instead of "//was 50". One slash missing: 30 minutes of torment. You've been warned.

Conclusion

By now, you should be comfortable with going through your weapon ".def" files and changing the clipsizes. A hint for you eager modders: "0" (zero) in the clipsize parameter means it doesn't reload (lightning gun, DMG, etc) giving these weapons a clipsize could be a very dumb idea. However, giving the Railgun, for example, a clipsize of "0" would allow you to make a Railgun that didn't require reloading. Simply put: you can take away reloading, but without a fair bit of skill, you can't add it in. Stay tuned for part 2, covering fire-rate and damage values. Take care guys,

Adam

Post comment Comments
Dafama2k7
Dafama2k7 Apr 7 2009, 5:27am says:

Great, thank you Slayer_2 !

It's a very good idea and i am sure many new Q4 mod makers will be very happy to learn from you. :)

+2 votes     reply to comment
Dafama2k7
Dafama2k7 Apr 7 2009, 5:34am says:

Also for everyone reading and learning from this Quake 4 tutorials that can be used in most parts for working on new Doom 3 and even Prey mods, i want to let you know that also a good place that will help to create good mod makers are at least this two, that i know at least...:

Iddevnet.com

Modwiki.net

Well, and also Doom3world.org would be very interesting to read and the of course, the actual Moddb.com

Thank you Slayer_2 for making this tutorials, i am sure i will learn many things also ! :)

+2 votes     reply to comment
Slayer_2 Author
Slayer_2 Apr 10 2009, 7:42pm says:

No problem David. It's good to remember everyone starts as a noobie then advances with time.

+1 vote   reply to comment
Post a Comment
click to sign in

You are not logged in, your comment will be anonymous unless you join the community today (totally free - or sign in with your social account on the right) which we encourage all contributors to do.

2000 characters limit; HTML formatting and smileys are not supported - text only

Icon
Quake 4
Platforms
Windows, Mac, Linux
Developer
Raven Software
Publisher
Activision
Engine
id Tech 4
Contact
Send Message
Official Page
Ravensoft.com
Release Date
Released Oct 14, 2005
Game Watch
Track this game
Tutorial
Browse
Tutorials
Report Abuse
Report article
Related Games
Quake 4
Quake 4 Single & Multiplayer First Person Shooter
Related Engines
id Tech 4
id Tech 4 Commercial Released Aug 2, 2003
Related Groups
Activision
Activision Developer & Publisher
Raven Software
Raven Software Developer & Publisher