Pages: [1]
  Print  
Author Topic: How to force the referencement of a pak for autodownload?  (Read 4390 times)
GrosBedo
Member


Cakes 20
Posts: 710


« on: March 24, 2012, 07:50:56 pm »

I'm trying to find a way to force the engine to reference a pk3. Normally, all you have to do is drop it inside fs_game folder, but when you use a server-side mod, and your pk3 only contains vm, it seems that your pk3 is not referenced at all (of course it's not used since it's the server-side mod that is loaded, but why isn't this pk3 referenced too?).

Here's an excerpt from the code:
Code:
if (!(pak->referenced & FS_GENERAL_REF))
{
if(!FS_IsExt(filename, ".shader", len) &&
   !FS_IsExt(filename, ".txt", len) &&
   !FS_IsExt(filename, ".cfg", len) &&
   Q_stricmp(filename,"qagame.qvm") != 0 && //Never reference qagame because it prevents serverside mods
   !FS_IsExt(filename, ".config", len) &&
   !FS_IsExt(filename, ".bot", len) &&
   !FS_IsExt(filename, ".arena", len) &&
   !FS_IsExt(filename, ".menu", len) &&
   !strstr(filename, "levelshots"))
{
pak->referenced |= FS_GENERAL_REF;
}
}

//Do not reference qagame.qvm, it need not be part of pure check, because te
//if(strstr(filename, "qagame.qvm"))
// pak->referenced |= FS_QAGAME_REF;
if(strstr(filename, "cgame.qvm"))
pak->referenced |= FS_CGAME_REF;
if(strstr(filename, "ui.qvm"))
pak->referenced |= FS_UI_REF;

So it seems that qagame.qvm is explicitly not referenced on purpose to allow server-side mods to work.

Anyway my pk3 contains a cgame.qvm and I tried to add a .txt, but to no avail.

Can someone enlighten me on a way to force the engine to reference my pack?
Logged
GrosBedo
Member


Cakes 20
Posts: 710


« Reply #1 on: March 24, 2012, 08:20:40 pm »

To answer my own question, I had to remove cgame.qvm and ui.qvm, to leave only qagame.qvm in the vm/ folder. This way, the cgame.qvm inside my pk3 gets referenced, and is autodownloaded. Unfortunately, this produces an infinite autodownloading loop bug because the engine cannot then find a way to match a different cgame.qvm and qagame.qvm. So I think that I'll have to give up.

For those who wonder why I am trying to do such a thing, I was in fact trying to provide a compatfix.pk3 on my servers to play with a server-side mod. This would have avoided to use the other alternative, which is to repack a whole pak088.pk3 with the fixed vm, which would not only be cumbersome for clients but also could lead to conflicts. I guess I'll have to wait for the hotfix to be able to use server-side mods again.

However this is weird, because the OA 088 vm gets referenced, but then it doesn't conflict with the server-side mod. I wonder why it doesn't work with my own pk3...
Logged
GrosBedo
Member


Cakes 20
Posts: 710


« Reply #2 on: March 24, 2012, 09:06:27 pm »

DID IT!

It was simply a problem of mirroring: my mirrored file in sv_dlURL wasn't the exact same as the one provided on my server, so that the checksum could not match.

So that was it: simply only unzip the mod's qagame.qvm, do not unzip the others, and you can drop the compatfix.pk3 in the fs_game(modname) folder

So now it's already possible to use server-side mods again with this compatfix.pk3 !

For those who also would like to implement a server-side mod on their server while using the latest OA assets, you can find attached the compatfix pk3, and here's the included readme instructions:

Quote
This pk3 is a quick compatibility patch for OA 0.8.8 to restore the compatibility with server-side mods.

Instructions:

1/ You should only unzip the qagame.qvm of your mod into a fs_game/vm/ folder (do NOT unzip cgame.qvm nor ui.qvm on your server, they are useless, and they will prevent the referencing of this pk3).
Note: failing to do this step will prevent the server from referencing the compatfix pk3 (you won't see it when typing sv_referencedPakNames)

2/ Place this file in fs_game to avoid future incompatibilities with the next releases of OA (can be either basepath/fs_game(modname)/ or homepath/fs_game(modname)/, doesn't matter).

3/ If you use sv_dlURL, please check that you have the exact same version of this package on your mirror.
Note: failing to do this step will make your client encounter the "infinite autodownload bug": when they will connect, they will try to download this compatfix pk3 infinitely, even if they succeed in download it!

4/ Set sv_allowDownload 1. You can also set sv_pure 1 or 0, as you prefer.

5/ Check-up: launch your server and type /sv_referencedPakNames and check that pak6-patch0881-compatfix is referenced

If everything's ok, then you can now have fun with your favourite server-side mod and with OA 0.8.8 assets.

Please refer to the forums for more infos:
http://openarena.ws/board/index.php?topic=4514.0
http://openarena.ws/board/index.php?topic=4443.msg43061#msg43061

The compatibility patch is attached to this post (you must be loggued to see it), or you can download it from this mirror:
http://zsensible.free.fr/openarena/oa088-compatfix/pak6-patch088--compatfix.pk3
« Last Edit: May 20, 2012, 12:09:50 pm by GrosBedo » Logged
Gig
In the year 3000
***

Cakes 45
Posts: 4369


WWW
« Reply #3 on: March 25, 2012, 04:41:12 am »

A curiosity... when did serverside mod compatibility disappeared?
Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
grey matter
Member


Cakes 8
Posts: 381

>9k


« Reply #4 on: March 25, 2012, 07:50:24 am »

You should not mess with baseoa/. Put your mod pk3 into basepath/modname/ and server-side mod into homepath/modname/vm/qagame.qvm on the server.
Logged

This space is for rent.
GrosBedo
Member


Cakes 20
Posts: 710


« Reply #5 on: March 25, 2012, 11:34:14 am »

@Grey Matter: thank's mate for the idea Smiley anyway it was simply a mistake of mirroring on my side, not related at all to the pak loading order.

I have updated the post above with the new instructions and the new package (in fact it's the same except for the readme contained inside :p).

Quote from: Gig
A curiosity... when did serverside mod compatibility disappeared?

Compatibility was broken since v0.8.5, and not only with server-side mods but also with demo playback. This patch now restore the compatibility between server-side mods and all OA versions (see here for the sources).
Logged
Pages: [1]
  Print  
 
Jump to: