JvIasterMind Posted September 28, 2011 Share Posted September 28, 2011 Here's something that has always bugged me when providing a custom pk3 that overwrites files such as sounds, textures, and other stuff... When I create a pk3 file, say, to override the default hitsounds, I need to name the file in a way that it is opened later than any other that might use the same filenames (and paths). I believe that the pk3s are currently just loaded in alphabetical order, so I noticed that a lot of clans start resorting to prefixing the pk3 name with the letter 'z'. In more extreme cases, since z<filename>.pk3 is already common, I have been seeing many files prefixed with multiple z's. It kind of feels like a little battle because you want your files to always load last to make sure that everything works as intended on your server. Anyways, I think it would be great if there could be a server-side cvar such as "sv_pk3priority" that would ensure that the specified pk3 loads after all of the others. This would be really helpful on my server because I try to prefix all of the custom files with my clan's tags so they are all grouped and easy to pick out both on the server and in the client's folder. In this specific example, I would like to have a line in my server config that reads... set sv_pk3priority "IoW_Required.pk3"(Currently, my IoW_Required.pk3 file (that is attempting to overwrite the hitsounds) loads before silent-0.3.3.pk3 and the hitsounds get reverted back to the ones in the silent pk3.) Quote Link to comment Share on other sites More sharing options...
Management gaoesa Posted September 28, 2011 Management Share Posted September 28, 2011 I agree that there should be a proper fix for this and it has bugged me too. There are many things that should be done regarding the custom packages. But that is all engine side and I don't know if that could be changed in the mod. However, for custom packages working on your server, you don't need to beat all the custom packages installed by various other servers. Because the client game will only load those pk3 files that the server references. In other words, it will not load the pk3 file contents from other servers pk3 files at all. It is generally problematic only when placing custom pk3 files in the etmain directory, when players load the mod before connecting to the server and when players are watching demos. If players do directly connect to your server, they will not get problems from other clans pk3 files. Dragonji 1 Quote Link to comment Share on other sites More sharing options...
JvIasterMind Posted September 28, 2011 Author Share Posted September 28, 2011 (edited) I was afraid that would be the case. I think we had a problem with this a little while back, but it was probably from somebody that came from another server running the same mod. Did you guys take out the "g_hitsound_" cvars to specify the hitsound paths? I kind of assumed that you did because the references were removed in the server manual. Those cvars kind of helped to bypassed this problem (although it only worked for hitsounds). Could you guys kind of do something similar, but instead have a cvar that specifies a preferred directory (instead of the individual files)? What I mean is to create the (normally top level) file structure within the directory specified by the cvar. Perhaps the mod could check the directory first (if the cvar was specified) and fall back to the main directory if it doesn't find the file. So, I would set the cvar, for example...set sv_preferredDir "IoW" Then, I would put the standard named hitsounds in IoW/sound/hitsounds/ instead of sound/hitsounds. If the game doesn't find the IoW/sound/hitsounds/ directory, it would just load the hitsounds from the sound/hitsounds/ directory that it loaded from silent-0.3.3.pk3. Would something that that be possible? Edited September 28, 2011 by JvIasterMind Quote Link to comment Share on other sites More sharing options...
Management gaoesa Posted September 29, 2011 Management Share Posted September 29, 2011 Yes we removed the g_ cvars for the paths. We did that because they were redundant as it is possible to just replace the sounds. This is how every other mod does this. With the exception of ETPub. You are right that if someone connects from server to server without disconnecting, he will maintain the old loaded customizations at least to some extent. The g_ server cvar system doesn't help with this problem, however. You may observe the same problem with the watermarks which do have the g_watermark server cvar. We have to think about the proposition for a moment. Technically it is possible. Creating an optional root folder for the sounds folder. This root would of course include all the possible sounds including the firstblood and so. My biggest concern with this is that it creates complicated system for the admins to use while using any character after the s would be just as effective for the pk3 file. And that has become kind of a standard to use also. I do warn at this point that if you have menu files, you may need to redo them a little in the next version. The version 0.4.0 provides new UI and to get the UI and the aspect ratio fixes done, we needed to make little changes to the menu definition files. This is if you have made custom menus. Quote Link to comment Share on other sites More sharing options...
JvIasterMind Posted September 29, 2011 Author Share Posted September 29, 2011 (edited) Thanks for your quick responses, gaoesa! I really am enjoying this community and think you developers are doing an exceptional job! On our ETPub server, we put our hitsounds in a custom folder similar to sound/IoW/hitsounds/. Then we used the path cvars to point to those files. Doesn't that force the client to reload the new files when they connected to our server (even from another server), since the new paths are specified in the server config? That is what I meant for helping to bypass the problem. Still, I do like the idea of not having all those path cvars. It is much cleaner replacing the standard sounds in the pk3. Now, I understand that using a pk3 that starts with a character after 's' allows for modifying the files fairly easily. But, since the client would be using the exact same path on the new server as the server that they arrived from, wouldn't that be part of the problem? By having a specified path (or preferred directory), it seems like it would force the client to reload the files when they connect since it is not referencing the same path anymore (assuming that the preferred directory is not named the same). Hope that clears up what I was thinking. Please correct me if any of that is wrong... I do enjoy hearing your insights on how all of this stuff currently works! Thanks for considering the suggestion! Edited September 29, 2011 by JvIasterMind Quote Link to comment Share on other sites More sharing options...
phantasm Posted September 29, 2011 Share Posted September 29, 2011 Perhaps you could embed a pk3 cleaner in the mod for players. Put a button in the HUD called "FILE CLEANER" (something simple like that) where it would wipe all the custom pk3s from the silent folder and in etmain. People would love that and it would be unique. Then allow server owners to define an exception list for their pk3s. Or, instead of a pk3 cleaner, maybe you could just have a function that allows admins to make a list of deprecated pk3s to be removed. So a server admin could just remove his own pk3s that are no longer being used. Clean up last month's menus so players don't get confused. This would allow us to clean up our own old files without messing with anything custom the player himself may want in his folders (like maps). Quote Link to comment Share on other sites More sharing options...
phantasm Posted September 29, 2011 Share Posted September 29, 2011 On second thought that would be a bad idea, even if you could program it to remove loaded pk3s. A bad admin or hacker could exploit it to add critical files to the list and then mess up all the players. Please disregard the idea. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.