Modding on Linux - Am I missing a step?

I am new to modding, have some basic proficiency in C, and am trying to mod baseq3 on a Linux x86_64 machine.

In my ioq3 directory, I try a simple test mod by changing the second argument in the call to VectorScale (in the fire_rocket function) from 900 to 200 to reduce the its speed. i.e.,
VectorScale( dir, 900, bolt->s.pos.trDelta ); -> VectorScale( dir, 200, bolt->s.pos.trDelta );
I go back to the main ioq3 directory and run make. I assume it compiles correctly because I see “GAME_CC code/game/g_missile.c” in the output and there are no errors. But much to my chagrin, when I run the game, the rocket does not move any slower. I’ve tried launching the game by doing
ioquake3,
going to ioq3/build/release_linux_x86-64 and directly executing ./ioquake3.x86_64,
creating a copy of /game called /MyMod in the main ioq3 directory, making the changes there and running
ioquake3 +set fs_game MyMod, and
./ioquake3.x86_64 +set fs_game MyMod

I assume I’m missing a step in compilation? I really appreciate the help!

PS: Forgive me if the solution is very trivial or obvious, I can’t seem to find a ioq3 modding guide for Linux anywhere

PPS: Not sure if this is relevant, but I discovered that whenever I run with the ‘+set fs_name MyMod’ option, the console spits out

It states this for every pak file excluding pak0.pk3. Note that I retrieved the pak files 1-8 from https://ioquake3.org/extras/patch-data/

Mod directories (fs_game) don’t need to include pak[0-8].pk3, baseq3/pak[0-8].pk3 is still used.

MyMod should be along side baseq3 and contain vm/qagame.qvm.

baseq3
   - pak0.pk3
   - pak1.pk3
   - pak2 to 8.pk3
mymod
   - vm
       - qagame.qvm
ioquake3.x86_64

qagame is a special case that it loads unzipped when sv_pure cvar is 1 (the default). To override cgame and/or ui QVM you need to set sv_pure 0 in the console or place the files (vm/*.qvm) in a zip file (still in vm directory in zip) and rename it to .pk3.

To help debug why the wrong file is loaded; which vm/qagame.qvm console command will tell you where the file would be loaded from and path command will tell you the load order of the search path.

Thanks for the info, I really appreciate the help

Fixed the MyMod pk3 issue, and made sure ioq3/build/release-linux-x86_64/MyMod contains vm/qagame.qvm. I’m learning!

Now, upon further tinkering I discovered that alongside my ioq3 directory (in home/art-prtls), I have a .q3a directory also containing both MyMod/ and baseq3/, but these do not contain any qvm files, not even a vm/ directory within. IIRC this directory was created either by the engine download or data installer from https://ioquake3.org/get-it/. Could this be causing some sort of confusion?

Upon running ./ioquake3.x86_64 +set fs_game MyMod +map q3dm1 sv_pure 1 ,
the console contains:
We are looking in the current search path:
/home/art-prtls/.q3a/MyMod
./MyMod
/home/art-prtls/.q3a/baseq3
and then proceeds to load the pk3 files.

Then, regarding the qvm files, it states
Loading vm file vm/ui.qvm...
File "vm/ui.qvm" found at "./MyMod"

Loading vm file vm/qagame.qvm...
File "vm/qagame.qvm" found at "./MyMod"

Loading vm file vm/ui.qvm...
File "vm/ui.qvm" found in "/home/art-prtls/.q3a/baseq3/pak8.pk3"

Loading vm file vm/cgame.qvm...
File "vm/cgame.qvm" found in "/home/art-prtls/.q3a/baseq3/pak8.pk3"
(all of these are followed by statements that they compiled and loaded on the hunk)

No change in game.

I then made the missile change in code/game (instead of MyMod/game), ran ./ioquake3.x86_64 +set fs_game baseq3 +map q3dm1 sv_pure 0 and on runtime the console says it successfully loaded File "vm/ui.qvm" found in "/home/art-prtls/.q3a/baseq3/pak8.pk3" and the same for vm/cgame.qvm and vm/qagame.qvm, yet no change in game. (did the same with the files vm/*.qvm zipped into the file named .pk3 in the vm directory just to see what happens; Same result).

Also, forgive my ignorance, but I’m not sure where I’m supposed to run which vm/qagame.qvm. I tried running it in baseq3, MyMod (which both contain vm/qagame.qvm, and even in the base ioq3 directory, all of which return vm/qagame.qvm not found. Same thing for path, which is why I referred to the runtime console to try and get that info for you. Thanks again!

/home/$USER/.q3a is created by the engine to store saved files.

First the engine checks for files in /home/art-prtls/.q3a/MyMod and then proceeds to ./MyMod, and then finally baseq3 (in ~/.q3a and ./). So it’s fine to override QVMs by placing (only) in ./MyMod.

On the command line each cmd/cvar need to be separated by +. So sv_pure isn’t being set. Should be: ./ioquake3.x86_64 +set fs_game MyMod +map q3dm1 +set sv_pure 0.

did the same with the files vm/*.qvm zipped into the file named .pk3 in the vm directory just to see what happens;

It sounds like the pk3 file is in vm directory? It should be directly in “MyMod” directory but in the pk3 there should be a vm directory containing the qvm files.

I’m not sure why which can’t find it. I just mean running which vm/qagame.qvm and path when running with +set fs_game MyMod; main menu or in-game should be fine.

I then made the missile change in code/game (instead of MyMod/game )

Did you edit the Makefile to compile code in MyMod/game? Typically one would edit code/game as that’s what make compiles.

Got it, thanks. I ran ./ioquake3.x86_64 +set fs_game MyMod +map q3dm1 +set sv_pure 0 correctly, still no change. With MyMod’s vm/ inside the zipped .pk3 file instead, which vm/qagame.qvm returns
File "vm/wagame.qvm" found in "./MyMod/.pk3"

and when I run path it indicates that it is looking in .q3a/MyMod, ./MyMod, then says ./MyMod/.pk3 (4 files).

with MyMod’s vm/*.qvm files moved back to the default position, which vm/qagame.qvm returns File "vm/qagame.qvm" found in "./MyMod" and path is the same except without the indicator that it found anything in ./MyMod/.pk3 of course.

So could it be opening the wrong qvm file? And just so I understand, when I compile the changes in code/game they should be seen in these qvm files, correct?

No, I had overlooked this. But I also just did the same procedure without using MyMod at all, verified the code change in code/game, verified that it loaded the qvms and pk3’s from baseq3 instead of MyMod, and still no change in game.

Also, pk3 files solely contain game media right? I ask because before setup I had misplaced my Q3 disc, so I am using a pak0.pk3 file I found online until I find it. I assume this would have no bearing on the issue at hand, but I wanted to mention it just in case it possibly could…? At this point I’m basically grasping at straws trying to figure out what part of my setup could be causing this.