Greg Dolley’s Weblog

A Blog about Graphics Programming, Game Programming, Tips and Tricks

How to Install a Quake 3 Mod – Common Problems and Solutions

Posted by gregd1024 on January 15, 2008

I’m assuming you’re reading this post for one of two reasons:

  1. You downloaded a mod from a third party, followed the installation instructions, and nothing actually changed in the game.
  2. You programmed your own mod but couldn’t get it to actually run.

This post can be applied to solve both problems, but I’m not going to cover how to actually make a mod; I’m just going to explain what common pitfalls exist and how you can overcome them. (I will be writing a post about how to create a mod in the near future, but that’ll be after I’m done with the Quake III .NET port.)

OK, let me start off by saying if you are having trouble installing a Quake III mod, you’re not alone. I had massive problems with the first mod I tried. It was a very simple mod where I changed the rocket launcher’s trigger rate and rocket speed – so it could rapid fire like the plasma gun. ๐Ÿ˜‰ And, in the end, I was only able to install it via the compiled DLL’s – the QVM files, even though they all compiled successfully, just refused to load. Since Quake III will behave the same way regardless of whether a mod is installed via DLL(s) or QVM(s) (although DLL’s are a bit faster), I didn’t see the point in continuing to beat my head against the wall over those QVM files. Therefore in this post I’m going to explain the installation of mod DLL’s only, not QVM’s. If you have successfully installed QVM’s on the v1.32 point-release, please contact me here or leave a comment on this post.

This is the main problem: when you run Quake III using command line options, some parameters in the q3config.cfg file (under /baseq3) get overwritten in order to remember what was last set. Then, the next time you run the game, even if you don’t set the same arguments as in the last instance, the game will still run as if they had been set. For example, if you launch the game with, “quake3.exe +set vm_game 0” and later use just “quake3.exe,” those two instances will behave no differently. This can be very confusing and naturally results in methods never getting tested.

Not all command line parameters behave this way, but most do. The one’s which affect you when making mods are the following three:

  1. vm_game
  2. vm_cgame
  3. vm_ui

As you probably already know, these three correspond to the three “mod’able” game DLL’s or QVM’s (qagamex86, cgamex86, and uix86 – if you’re running on a non-Intel platform, the suffix will be different than “x86”).

There’s another big problem with installing mods and it has to do with the server’s operating mode. There are two modes the Quake 3 server can run under – “pure” and “non-pure.” A pure server can only run modified versions of qagamex86, while a non-pure server can run all three modules. Trouble is, even if you tell the game to use a module other than qagamex86, it will simply ignore your request if the server is in pure mode. You won’t even see an error message.

OK, by now I’m sure you’re wondering how to set up things properly so let’s get to it! I’m going to show you a series of steps, but first keep in mind that I’m running the 1.32 Point Release. If you don’t already have this version I would highly recommend installing the patch so we’re both on the same page. I don’t know whether the steps I’m going to list will work in other versions of the game. Now here goes…

Mod install steps:

  1. Copy the mod DLL(s) into the same directory where “quake3.exe” is located. Update (1/21/2008): actually, it’s safer to copy them to the “baseq3” directory under the root because only a Debug build of Quake III will scan both the root and “baseq3” while the Release build will only scan “baseq3.”
  2. Open a DOS command prompt.
  3. Type “cd <drive>:\<quake3_install_dir>\” and hit <Enter> (on my computer the path is “c:\quake3\”)
  4. Type “quake3.exe ” and append one or more of the following command line options:
    • “+set sv_pure 0” (this one is not optional)
    • If you’re installing qagamex86 add: ” +set vm_game 0″
    • If you’re installing cgamex86 add: ” +set vm_cgame 0″
    • If you’re installing uix86 add: ” +set vm_ui 0″
  5. Press <Enter> and the game will load.
  6. Once you see the Quake 3 menu go ahead and start a new single player game.
  7. Press tilde (“~”) to drop down the Quake 3 console.
  8. In the console you’ll see a ton of status text. Scroll through it via the <PageUp> and <PageDown> keys looking for lines that say your DLL’s were loaded successfully. The status text for qagamex86 is quite a few pages up, while the status of cgamex86 and uix86 are near the bottom. The lines look like, “LoadLibrary qagamex86.dll ok.” 
  9. If the console indicates your DLL(s) loaded correctly, then congratulations! Your mod should now be running in the game!

That’s about it. If you have any questions about installing DLL mods, feel free to email me via my Contact page.

-Greg Dolley

*Get new posts automatically! Subscribe via RSS here . Want email updates instead? Click here.

Advertisements

26 Responses to “How to Install a Quake 3 Mod – Common Problems and Solutions”

  1. […] 24, 2008 Now that the Quake III port is done, I can write about creating a mod instead of just installing one. Let’s get […]

  2. Roderick said

    Greg, a friend of mine is unable to get .dlls to load. He says qvms usually work fine, but I can’t get those to compile. I read the readme, but it’s a bit vague about compiling qvms. It says to run the .bats, which I did, but I can’t find an output anywhere. The /vm folder in each directory stays empty.

  3. gregd1024 said

    Roderick,

    Man, I wish your friend could help me get the qvm’s to load; they simply _never_ worked for me. That’s why I stuck with DLL’s.

    About your problem with the batch files – did you modify them? If you didn’t, that’s why they don’t work. Whoever made those batch files hard-coded a lot of the output directories. I made many changes to them before they started working. Check yours and mod them to the appropriate config.

    -Greg Dolley

  4. Roderick said

    I haven’t modified them, but I’m not sure exactly what I should modify inside them, or what the directories should be changed to. Right now, they just output a bunch of .asm files to their respective /vm folders.

  5. gregd1024 said

    Roderick,

    Sounds like you might not be running the right batch files. The one’s I ran output .qvm and .map files. Here are the three batch files I ran:

    1. “<codebase_dir>\code\game\game.bat”
    2. “<codebase_dir>\code\cgame\cgame.bat”
    3. “<codebase_dir>\code\ui\ui.bat”

    -Greg Dolley

  6. Roderick said

    Greg, I have been running those bat files. What did you have to modify in yours to get them to work?

  7. gregd1024 said

    Roderick – I don’t remember exactly every change; do you want me to email you my files? If so, use the Contact link on the top of this page to send me an email. Then I can reply to you with the files.

    -Greg Dolley

  8. Davy said

    Hello,

    I have a qagameapx.dll (Windows XP Home sp2). And it won’t load. Wat is wrong with my code?
    I need heeelp, i tried it the whole day. ๐Ÿ˜ฆ

  9. gregd1024 said

    Hi Davy,

    Please show me the command line you’re using to launch Q3 with that DLL. That DLL doesn’t follow the standard naming convention, so unless you’re forcing it to load through command line parameters, Q3 won’t pick it up. That DLL is normally named qagamex86.dll on Intel machines.

    -Greg

  10. Kedin Sander said

    Well, i downloaded the dll file from ttp://www.dll4free.com/qagamex86.dll.html and copies, but still its not working ???

  11. gregd1024 said

    Kedin,

    I need more info. Did you replace just that one dll, or all three? Depending on what mods were done to qagamex86.dll, you may need the others. Especially if some dependent functions were modified. What happens in the game? Do you get past the little blue dialog box in the beginning before the graphics load? If yes, do you see the correct menu options on the menu screen, or is it blank? If it’s blank, that means there’s a mismatch between the qasm byte code versions, or the qagamex86 is loading from the file system, but two others dll’s are being loaded out of the pak file (this case will give you problems for sure).

    -Greg Dolley

  12. joerg kuesters said

    hi there,i try to install a .umod file for ut in q3.
    setting path for .umod to q3.exe results error.
    without installing i see head in the models setup
    choose it, set only the name but place where
    model appears keeps blank.
    is there a way to install .umod files in q3 arena?
    rename to .pk3 (normal q3 model file) doesnยดt
    work.thx anyway : )

  13. gregd1024 said

    Joerg,

    Actually the .pk3 files are not model files, they contain model data but also include game maps, bitmaps, font data, byte-code for game logic, etc. Basically, a .pk3 file is the game’s master database of resources that includes everything it needs to run.

    Anyway, back to your question: I doubt you can run a .umod file directly in Q3. Maybe there are converter programs out there that will convert a .umod file into the model format Q3 expects. Might want to do a search. Sorry I can’t be of more help.

    -Greg Dolley

  14. joerg kuesters said

    Hi Greg,
    THX for quick answer.now it works.perhaps problem was i loaded only skin and no model or
    the other way : )) not well in this. just started to become addicted…
    is it possible to put the sound from one model to another? in my case the model seem be without
    own sound, it become sarges. i want bones but
    dont know where to copy from and where to put in.
    THX and Greets
    j

  15. gregd1024 said

    Joerg,

    Whoa, I didn’t know UT model files were the same format as in Q3. I guess they’re some 3rd party format like 3D Studio Max, or something. For your question, transferring sound – I know it is _possible_ because I’ve seen some stuff in the code that picks Sarge as the default, but as far as actually how to do it, I honestly don’t know. I haven’t done any modeling or bot modding work in Q3. However, here’s a link to a good tutorial on bot creation that will probably answer your question:

    http://planetquake.gamespy.com/View.php?view=GameInfo.Detail&id=6&game=4

    -Greg Dolley

  16. I have Quake 3 arena demo for pc. I wasn’t able to play it on a school computer until one of my friends who is way more computer savvy than me told me I had to change the name Quake 3 from Q3ad to iexplorer.
    I need help on an interesting mod.
    I know only a few compture languages.
    “.exe” executable
    “.map” map file/mod
    “.doc” document
    I know a few more, but not much. I found a mod, and I dunno how to install it to quake 3, and I haven’t downloaded the mod yet.

  17. Chevvy said

    I have downloaded “quake3-1.32b-source.zip” and I want to compile it on the windows. it is compiling fine but when I run the quake3.exe, one blue screen comes and its crashes and MS windows error message appears. I read the readme file and its saying that i have to run some batch files. I tried that option also but still the same error. Can you provide the complete steps for building and running it with the Visual Studio 2003?
    Do I need to change the batch files also? If yes then what changes?

    • gregd1024 said

      Chevvy – Visual Studio 2003 uses an outdated .NET version and the port was intended to be compiled in VS2008 with .NET 3.5. I can’t say for sure what’s wrong because I don’t have VS2003 to test. I suggest downloading VS2008 Express (it’s free, so why not) and forget trying to get it working in 2003. Sorry I can’t be more help.

      -Greg

  18. AppliedTech said

    You can always just mod the game engine to run a pure server and do size/md5 hash checks on the dll’s inside of a pak file instead of the qvm’s. It’s what RTCW/ET/ETQW/Doom 3/Quake 4 do…

    Then you can distribute the mod online real-time…only one problem, only Windows users will be able to use it…dll’s versus .so’s, but who cares anyhow. And I’m also not sure about the security of it.

  19. quandary said

    I have had no problems testing the modified qvm’s.
    The secret is: putting the qvms in the mod directory in the subdirectory vm
    then set vm_* to 2

    # 0: use OS shared libraries (dll/so) – fastest, useful for debugging.
    # 1: use interpreted qvm execution (qvm files are executed in realtime) – slow.
    # 2: use JIT compiled qvm execution (qvm files are compiled to native instruction set “just in time”) – reasonably fast

    quake3.exe +set fs_game lol +sv_pure 0 +set vm_game 2 +set vm_cgame 2 +set vm_ui 2

    • gregd1024 said

      Quandary – ah, good info. Thanks. ๐Ÿ˜‰ But I still don’t get which directory to put the modified qvm’s. If the game’s install directory was “c:\quake3” then would the qvm’s go under “c:\quake3\mod_name” or “c:\quake3\baseq3\mod_name”? Or somewhere else?

      -Greg

    • Torec said

      I have been messing around, trying to get my simple mod (slowing the rocket) working for a whole week!
      This finally did it!

      ” set vm_* 2 ” combined with qvm’s — thank you veeeery much!

  20. avejidah said

    Hey, thanks for the tips. You got me on the right path, and everything worked like a charm. Anyway, I got the .qvm file to work by creating a directory structure like this:

    c:\quake3\quake3.exe
    c:\quake3\Mod\vm\cgame.qvm

    Then I ran quake3.exe like this:

    quake3.exe +set sv_pure 0 +set fs_game Mod +map q3dm1

    That got my custom cgame.qvm file to work.

    As for creating the .qvm files, gregd1024 seemed to be having the same problems I was. The problem is the path to lcc and q3asm. You need to define the path in the bat files first. My lcc.exe and q3asm.exe file reside in: c:\Program Files\Games\Quake III Arena\source\bin. At the top of each .bat file (cgame.bat, game.bat, ui.bat) add this line.

    set PATH=%PATH%;c:\Program Files\Games\Quake III Arena\source\bin

    And that will make the .qvm file compile correctly. They will output by default to c:\quake3\baseq3\vm for game and cgame, and c:\quake3\missionpack\vm for ui.

    Lastly as a tip, .pk3 are actually just .zip files. If you change the extension to .zip you can play with the contents. This is where the standard .qvm files are, so if you want to distribute a mod for instance you can put it in one of the .pk3 files.

    Hope that helps someone. Sorry if I woke the dead on this thread.

    -avejidah

  21. Prateek said

    i just understand it and by the way mine quake is in c:\program file:\quake 3.Please make the explanation easier next time.^_^

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: