Open ghost opened 11 years ago
I would agree with this - that moddir_addon should take priority over moddir when accessed from other games
for example I play a 3rd party mod called science & industry and I wish to change some of the scientist sound files in valve directory, but each time the game is updated I have to change the files again. It would be nice if it defaulted to the moddir_addon folder so this wouldn't be a problem
I know i'm late, but there is a way to do this: https://developer.valvesoftware.com/wiki/GoldSource_SteamPipe_Directories#Fallback_directories
In addition, mods can use addon directories if they are launched with the -addons
command line argument. You can enable this for Science and Industry and add your custom content there.
@SamVanheer so do regular mods not use the _addons directory by default? Is setting fallback_dir to moddir or passing -addons the only way to get it work?
The addons directory is disabled by default. You can enable it with the command line argument or enable it with the setting in Options->Video (allow custom addon content). The latter option saves to the registry, so if you set the entry yourself you can force it on. Note that on Linux registry entries are saved to a file.
The key is "addons_folder"
.
On Windows, the registry path is "HKEY_CURRENT_USER\Software\Valve\Half-Life\Settings"
. I'm eventually going to reverse engineer their registry handling code so you can use that if you don't want to write your own code.
The console command "_setaddons_folder"
will also set it, "_setaddons_folder 1"
enables it, "_setaddons_folder 0"
disables it.
This will reinitialize the filesystem, so be aware that it can remove any search paths you've added. See https://github.com/ValveSoftware/halflife/issues/1760 for more information about that.
Is that a command that needs to be run on the client or server or both? Given that it changes file-system stuff it seems like it needs to be on the server but it is a per-client setting by the looks of it.
You'll need to run it on both the client and server.
Let me explain on a simple example. Suppose that we placed modified gameui_english.txt file to the valve_addon\resource folder. For now the only way to load it in, say, Half-Life: Blue Shift is to copy the file to the bshift_addon\resource folder.
It would be really not bad to implement sharing of [moddir]addon for games dependent on resources from [moddir] like it's done for [moddir][language] folders (e.g., HL:OF is sharing resources from valve_[language]).
So, the [moddir]addon resources searching priority would be higher than [moddir] and [moddir][language].