andrei-drexler / ironwail

High-performance QuakeSpasm fork
GNU General Public License v2.0
546 stars 50 forks source link

[Feature request] Custom dir for mods #129

Closed NightFright2k19 closed 1 year ago

NightFright2k19 commented 2 years ago

When having to deal with dozens of mods installed at the same time, I prefer to keep my Quake root dir as clean as possible and therefore place my mods in a subdir called "addons". It would be great if Ironwail was able to also search such subdirs for mods to load them from the ingame menu, just as if they had been placed in the root directory.

I could imagine this as an additional CVAR like "moddir" which accepts relative paths as parameter. Example for my situation (would search for any subdirs with .pak files in (Quake dir)\addons): moddir "addons"

(Of course, loading from root dir should always work, regardless whether this CVAR is used or not.)

timbergeron commented 2 years ago

I don't really use a lot of mods, but this seems like a good thing. Akin to the new screenshots directory. It's easy for the gamedir to get cluttered. I did this for demos. playdemo will play out of either gamedir or /demos

NightFright2k19 commented 1 year ago

This doesn't seem to work in 0.7.0. Any specific reason for this? Are certain names required for the additional directories or what? Assuming from the Jan 8 commit, this was supposedly implemented.

dumptruckDS commented 1 year ago

This doesn't seem to work in 0.7.0. Any specific reason for this? Are certain names required for the additional directories or what? Assuming from the Jan 8 commit, this was supposedly implemented.

Should work by setting -basedir <path to mods> on the command line. And you can do multiple -basedir if you want.

NightFright2k19 commented 1 year ago

Hmmm... I have my mod folders inside of an "addons" subdir within the Ironwail folder and the following won't work: ironwail -basedir addons

Message received is: The specified basedir is not a valid Quake directory: addons Doesn't have an id1 subdirectory containing pak0.pak

Same if I use ironwail -basedir id1 -basedir addons

Only difference is that it's complaining about "id1" instead of "addons", then.

It works if the addons folder contains the id1 dir. Is that how it's supposed to work? My assumption was that the id1 folder can remain where it is and you load any extra folder on top of it. Like this, one would always need to have the id1 data inside of the mod folder, which is a bit weird.

andrei-drexler commented 1 year ago

You need to specify absolute paths for -basedir, and the first one should always be the actual Quake dir (with id1/pak0.pak), but the following ones don't have this restriction. Settings, savefiles, screenshots etc. will be written in the last dir specified.

NightFright2k19 commented 1 year ago

Alright! What worked for me was this:

ironwail -basedir c:\games\quake -basedir addons

Maybe this should be documented somewhere, if it hasn't happened yet and I just didn't see it. Otherwise, the implementation of the feature is quite acceptable regarding the way it works.

Thanks a lot for clearifying the process!