Title: Pak load order Post by: sago007 on February 21, 2012, 11:02:06 AM I have noticed that the game has problem loading paks in the right order if they are distributed between homepath and basepath. One should especially notice that joining an 0.8.8 server with the 0.8.5 patch located in the homepath will fail even though all files are present.
The engine will load the 0.8.5 patch after the 0.8.8 patch in this case even though it should be loaded before. This was not noticeable as long as there was only one patch and that was the last file loaded anyway. In case of problems please check if pak6-patch085.pk3 is in the homepath. I personally believe files in homepath should take priority over files in basepath but only if they have the same filename. Have other noticed this too? Title: Re: Pak load order Post by: Gig on February 21, 2012, 11:40:54 AM I have not yet had time to try to connect to any 0.8.8 server.
I'm not completely sure about the sequence the game uses when loading files. AFAIK, files located in homepath are loaded after files located in basepath... but I thought about this while having two files with the same name (e.g. you have modt.cfg file in both basepath and homepath: homepath wins).... and I don't really know all of the possible cases (e.g. files in pk3 have higher priority than files outside?). Maybe it loads everything from basepath and only after that starts reading files in homepath. This way, in the situation you mentioned: 0.8.8 patch in basepath (manually installed) and 0.8.5 patch in homepath (probably autodownloaded).... would cause problems!!!!! And even if you have double 0.8.5 patch (in both basepath and homepath), but 0.8.8 in basepath only... I suppose it would be the same... problem! Title: Re: Pak load order Post by: grey matter on February 21, 2012, 11:50:57 AM You should read the comments in qcommon/files.c.
Quote from: code/qcommon/files.c e.g. the qpath "sound/newstuff/test.wav" would be searched for in the following places: home path + current game's zip files home path + current game's directory base path + current game's zip files base path + current game's directory cd path + current game's zip files cd path + current game's directory home path + base game's zip file home path + base game's directory base path + base game's zip file base path + base game's directory cd path + base game's zip file cd path + base game's directory home path + BASEGAME's zip file home path + BASEGAME's directory base path + BASEGAME's zip file base path + BASEGAME's directory cd path + BASEGAME's zip file cd path + BASEGAME's directory Homepath has priority over basepath (cd path is not of interest for OA). If there are multiple pk3s in one path, containing the same file, the one with its name later in the alphabet has priority (that's why there are so many zzz-*.pk3). Pk3 files have priority over "unzipped" files. Title: Re: Pak load order Post by: GrosBedo on February 21, 2012, 12:01:59 PM Maybe it loads everything from basepath and only after that starts reading files in homepath. This way, in the situation you mentioned: 0.8.8 patch in basepath (manually installed) and 0.8.5 patch in homepath (probably autodownloaded).... would cause problems!!!!! And even if you have double 0.8.5 patch (in both basepath and homepath), but 0.8.8 in basepath only... I suppose it would be the same... problem! Yes from my experience I concur with you Gig: all basepath files are loaded first, then homepath files "overwrites" the memory. So your hypothesis is probably the exact scenario that's happening. And that's bad, so there should be an announcement that people needs to delete the autodownloaded patch when updating manually their installation. Pk3 files have priority over "unzipped" files. From my experience that's not true: if you unzip a mod's vms in the basepath/vm folder, it takes precedence over any pk3 file (should it be in basepath, I don't know what happens if there's a pk3 in homepath, I guess it would overwrite again?). This is how server-side mods work. Title: Re: Pak load order Post by: Gig on February 21, 2012, 12:04:47 PM Yes, I did not mention alphabet order, but I know it.
It seems the alphabet order works only inside a specific folder, and not between folders: from what Sago said, it seems that a pk3 in homepath will always have priority over any pk3 in basepath, not counting their names. Right? PS: I'm not sure that pk3'd files had priority, but don't want to say something wrong, thus I should make more tests (e.g. creating custom killing sprees files and placing them in different folders). PPS: I'm not sure I get the difference between home path + base game's zip file and home path + BASEGAME's zip file Title: Re: Pak load order Post by: grey matter on February 21, 2012, 12:19:25 PM PPS: I'm not sure I get the difference between home path + base game's zip file and home path + BASEGAME's zip file Here's more of the quote. Just read the text in code/qcommon/files.c (http://svn.icculus.org/*checkout*/quake3/trunk/code/qcommon/files.c), it precisely answers all of your questions and assumptions. Quote from: code/qcommon/files.c Additionaly, we search in several subdirectories: "Base game" is controlled by the fs_basegame cvar, which defaults to "" - meaning none.current game is the current mode base game is a variable to allow mods based on other mods (such as baseq3 + missionpack content combination in a mod for instance) BASEGAME is the hardcoded base game ("baseq3") Title: Re: Pak load order Post by: sago007 on February 21, 2012, 12:23:14 PM You should read the comments in qcommon/files.c. I just did. Thank you.Pk3 files have priority over "unzipped" files. From my experience that's not true: if you unzip a mod's vms in the basepath/vm folder, it takes precedence over any pk3 file (should it be in basepath, I don't know what happens if there's a pk3 in homepath, I guess it would overwrite again?). This is how server-side mods work.I must admit I find this order of loading files rather unpleasant. It makes the filenames completly unreliable and the auto-download system rather annoying. I can understand why a mod will need to overrule everything but not homepath. Title: Re: Pak load order Post by: GrosBedo on February 21, 2012, 12:25:01 PM Very informative thread. It would have saved me a lot of testing time in the past!
@sago: I quite agree that the current pak loading order is rather unreliable, it would be touchy to modify it but quite rewarding if it works out well! Title: Re: Pak load order Post by: Gig on February 21, 2012, 01:58:18 PM Maybe it would be better to do not "fork" from ioquake3 in pak loading lists.. should we propose something to the ioquake3 team?
Title: Re: Pak load order Post by: GrosBedo on February 21, 2012, 02:08:18 PM Maybe it would be better to do not "fork" from ioquake3 in pak loading lists.. should we propose something to the ioquake3 team? I don't think they will accept such a big change when their engine is being used in many other games. And now OA engine is quite enough forked, as long as we keep a log of the changes, there shouldn't be any problem to update to the latest revision of the ioquake3 code. And it seems very unlikely that ioquake3 will ever touch this part of the code, so it should be safe, if done right, to change the pak loading order. Anyway we have the advantage when modifying the engine to have a complete game behind on which we can test and try the code. This isn't really the case for ioquake3 (do they still test over quake 3 arena assets? this does not sound very adapted...). Title: Re: Pak load order Post by: Gig on February 21, 2012, 05:59:58 PM As a first step, I placed a note here:
(DO NOT LINK) h t t p s : / / openarena . wikia . com/wiki/Download_Mirrors It's the "important note" in the first section. |