Special procedures to create a pk3?

I want to make a standalone game, and I want to progressively replace the assets from the demo. I tried unpackaging the assets from pak0, and it works fine, but when I repackage them (unmodified) with

mkdir pak0
cd pak0
mv pak0.pk3 pak0.backup.zip
unzip pak0.backup.zip
zip pak0.zip pak0/*
mv pak0.zip pak0.pk3

, it tells me:

$ pwd
(source code of ioquake3)/build/release-darwin-x86_6/
$ ./ioquake3.app/Contents/MacOS/ioquake3
./ioquake3.app/Contents/MacOS/ioquake3
tty console mode disabled
ioquake3 1.36_GIT_d28e667e-2018-03-04 macosx-x86_64 Apr 11 2018
SSE instruction set enabled
----- FS_Startup -----
We are looking in the current search path:
/Users/Famille_Pintado/Library/Application Support/ioquake3/baseq3
./ioquake3.app/Contents/MacOS/baseq3
./baseq3
./baseq3/pak0.pk3 (64 files)

----------------------
64 files in pk3 files
Couldn't load default.cfg

What am I doing wrong? Since the initial pak works, it must be that I’m repackaging it wrong, right?

You might need “zip -r” instead of “zip” to zip files in subdirectories.

1 Like

There is probably a top-level pak0 directory in the pk3 causing default.cfg to be named “pak0/default.cfg” and need zip -r as pointed out by Chomenor to add all files.

unzip pak0.pk3 -d pak0.pk3dir
cd pak0.pk3dir
zip ../pak0-rebuild.pk3 -r botfiles demos gfx icons levelshots maps menu models music scripts sound sprites textures video vm *.cfg
cd ..

For rapid editing and testing of assets it’s more convenient to run with the files unzipped in baseq3/ or baseq3/pak0.pk3dir/ and sv_pure cvar set to 0. Running the vid_restart command will reload updated graphics without having to restart the whole game.

Since it’s about reloading the default pak, is there a way to set cvars before launch?

You can add +coamand to the command line. ioquake3.x86_64 +set sv_pure 0 +map q3dm1

Also, strangely, it didn’t work even with -r.

It’s becoming even weirder. I tried re-using the original pak0 with

cp pak0.backup.zip pak0.pk3

and it doesn’t work. “Couldn’t execute autoexec.cfg”, and something about opengl extenstions, while it worked perfectly before. I’m going to try to recompile. Something’s wrong.

“User interface is version 3, expected 6.”

Any ideas what is happening? I haven’t modified the UI code. I have STANDALONE defined, though.

The demo’s qvms are not compatible with quake3 1.32 / ioquake3. You need to use the ones you compile with ioquake3.

That’s weird, though. It worked before. Something’s happened, but I don’t know what.

I guess the final qvms aren’t compatible with the demo, right?

Some files moved. Maybe delete the qvms from the pk3 because it’s taking precedence over qvms in build directory.

It’s not fully compatible but it’s usable if you replace botfiles/inv.h as I mentioned before. There is some bot chat issues with demoq3 botfiles so don’t botter trying to order them around in teamplay (though it’s possible to make your own compatible botfiles using the OpenArena botfiles). Some content will be missing as later versions renamed lightning trail and ctf icons and maybe others.