Compiling, but code changes not applying


On linux, im using ioquake3 souce code with quake3 arena pak files in baseq3.

in cg_main.c: { &cg_zoomFov, “cg_zoomfov”, “22.5”, CVAR_CHEAT }
and changed 22.5 to 30, I compiled in game the default value is still

Also I added { &gen_drawWeapon, “gen_drawWeapon”, “2”,
CVAR_ARCHIVE} and in cg_local.h I added extern vmCvar_t
In-game cmd /gen_drawWeapon not recognized.

compile, in the main dir where makefile is, I use terminal command
"make" and I run ioquake3.x86_64, from

Are my changes
getting replaced by code in the quake3 pak3 files? Or am I not compiling
correctly (I didnt do any changes to makefile)?

Thank you reading


Problem got solved. I didnt know anything about modfolders.


Hey, would you mind sharing some more details on the solution? I am facing exactly the same problem (i.e. modifying cvars in cg_main and not seeing any changes). I would really appreciate if somebody could shed some light on this. Cheers!


Ok, I am somewhat beginning to understand. If you copy the *.pk3 files from Q3A, the game runs the qvm code inside them. In order to see changes from the modified dlls, you have to provide the following command line arguments:

ioquake3.x86_64.exe +set sv_pure 0 +set vm_cgame 0

Feel free to correct me or suggest alternatives. I am only starting to figure this stuff out.


Disclaimer: I have neither compiled nor played with ioquake3/quakeIII yet, my recommended solution is based on my experience with working on another game that is based on ioquake3 (i.e. Tremulous). I have an idea on what the issue might be based on @MrSenatorial 's & @kloffy 's comments, and from browsing the ioquake3 code a bit.

If I’m wrong about anything related specifically to ioquake3, someone who is more experienced with it should feel free to correct me.

If you are working on just modding the game logic, and this is meant for compatibility with Quake III Arena, try the following:

  1. Take note of the values of you have set for the cvars fs_basepath, fs_homepath, and fs_game. You can find their current values by entering those cvar names in the console while you have the game running without any arguments. Note that if any of those paths have for a value . that means the path is set to the current path your client binary (or if you are running the dedicated server binary, the current path of that file) is located.

  2. You would want to keep all your default Quake III pk3 files inside the directory baseq3 which should be inside your basepath directory (indicated by fs_basepath), and not located in any other folder.

  3. Make up an fs_game name. As I understand it, it can be alphanumeric and it can contain - or _. This is would be the name of your “mod directory”. Inside the location of your homepath (found from fs_homepath), create a new folder that has the name you chose for the fs_game. You would place all your modded files inside this directory.

  4. Load your fs_game, one way this can be done is by setting its value at startup. As an example (based on a post above by kloffy), if you picked the fs_game name awesome-name, and you are using windows, it would be:

ioquake3.x86_64.exe +set fs_game "awesome-name"

The above steps should still load all your default assets, and any modded files you might include (like modded QVMs) would override the corresponding default files.

Side note: makefiles can be tricky at times when you rebuild, and if it seems that code is not being updated, another possible source of the issue might be with previous build artifacts, in which case you would want to execute: make clean (that would rebuild everything from scratch when you run make next time).


Ah, that sounds like a much cleaner way of doing things! Many thanks for taking the time to write that up.