Shader overriding (PAK search order)
Posted: Mon Feb 23, 2009 6:44 pm
Hi,
Currently I am working on a Q3A texture replacement pack for Openarena (i.e. the creation of GPL versions of the textures used by the original Q3A game, to make custom maps with these textures usable under Openarena).
I have a problem with shader usage. The OA team created replacements for some of the original Q3A textures and put the textures and associated shaders in a file called PAK0.PK3. I made new versions for some of these textures and put the new stuff (graphics and shaders) into a file called 'zgpl-q3a2oa-textures.pk3'. When I test the new stuff, I find that the texture itself is replaced, but the shader used is the old one located in the PAK0.PK3 file.
Now, AFAIK when the Q3 engine is looking for a file, the PAK files are searched in descending alphabetical order, and the first version (of the file) found is used. That's why I have put my stuff into a file the name of which starts with 'z'. I also tried using the file PAk7-Q3A-TEXTURES.PK3 (the last OA pack is PAK6) but it did not work either. And before you ask: the folder tree is correct, my shaders are in the 'scripts' subfolder.
If I manually edit the old shader file in PAK0.PK3 (comment out the old entry to disable it), my stuff works correctly. However, it is not a reasonable option to edit a PAK0.PK3 of a distro, so I need another solution. I would appreciate receiving suggestions.
Thanks,
Speaker
Currently I am working on a Q3A texture replacement pack for Openarena (i.e. the creation of GPL versions of the textures used by the original Q3A game, to make custom maps with these textures usable under Openarena).
I have a problem with shader usage. The OA team created replacements for some of the original Q3A textures and put the textures and associated shaders in a file called PAK0.PK3. I made new versions for some of these textures and put the new stuff (graphics and shaders) into a file called 'zgpl-q3a2oa-textures.pk3'. When I test the new stuff, I find that the texture itself is replaced, but the shader used is the old one located in the PAK0.PK3 file.
Now, AFAIK when the Q3 engine is looking for a file, the PAK files are searched in descending alphabetical order, and the first version (of the file) found is used. That's why I have put my stuff into a file the name of which starts with 'z'. I also tried using the file PAk7-Q3A-TEXTURES.PK3 (the last OA pack is PAK6) but it did not work either. And before you ask: the folder tree is correct, my shaders are in the 'scripts' subfolder.
If I manually edit the old shader file in PAK0.PK3 (comment out the old entry to disable it), my stuff works correctly. However, it is not a reasonable option to edit a PAK0.PK3 of a distro, so I need another solution. I would appreciate receiving suggestions.
Thanks,
Speaker