Battlezone 98 Redux

Battlezone 98 Redux

RequireFix
Nielk1 6 Mar, 2024 @ 3:31am
Broken for GOG players
GOG workshop path is in this pattern (if not in a 2nd Galaxy path or custom install path)
C:\Program Files (x86)\GOG Galaxy\Games\Battlezone 98 Redux\mods
The important part here is the "mods" subfolder from the game folder.

Note, the folder for GOG is "mods" NOT "packaged_mods". The game explicitly uses "mods" in GOG for mods and "packaged_mods" has some other quirks and should not have additional mods added to it. If you really want to cover everything though you'd search all 3 paths, mods, packaged_mods, and steam workshop.

Untested:
local function getGoGWorkshopDirectory() return getGameDirectory().. "\\mods" end

You could also add a custom searcher function to package.loaders (package.searchers in LUA5.2 just in case that matters) if you want far more robust logic options but this is far more complex than just dumping more search paths in for the lowest priority default searcher.

https://www.lua.org/manual/5.1/manual.html#pdf-package.loaders

You're also going to cause issues where automatic mod downloading doesn't catch dependencies, but I can probably fix that.
Last edited by Nielk1; 6 Mar, 2024 @ 6:06am
< >
Showing 1-9 of 9 comments
GrizzlyOne95  [developer] 17 Apr, 2024 @ 7:56am 
We're not supporting GOG at this time, but if someone approaches us needing these features we can look at adding it in. The other issue is people can have this in a totally custom directory, unlike with Steam where it has the same workshop and item structure no matter what drive it's on (unless you did some really weird stuff). We have yet to find anyone who actively plays on GOG anyway.

RequireFix is to be included with any relevant mods, and currently it can be used without Steam dependencies. It can either point to the Extra Utilities mod requiring a dependency, or point to itself if you hardcode the steam ID of your own mod.
Nielk1 17 Apr, 2024 @ 8:27pm 
You should probably add support for GOG since it's so easy to do (as I noted with my scratch function above, dumb adding both the steam workshop and gog path would be an acceptable work around).

The truth about GOG is it's the best platform for developing advanced mods, though IDK if you guys have graduated to the methods that most benefit from using the GOG version for dev yet.
GrizzlyOne95  [developer] 17 Apr, 2024 @ 8:40pm 
Thanks for the opinion.
GrizzlyOne95  [developer] 18 Apr, 2024 @ 9:09am 
The other issue I found when I looked into this...there is no rhyme or reason to what name the mod may have. The only reason RequireFix works is because you can point it to a steam workshop ID. I guess we could assume the mod downloaded would keep the same ID as the folder name, but that is no guarantee at all. Especially if someone puts the mod on GOG/Moddb or whatever.

I don't see a clear way of doing this that wouldn't result in multiple issues.
GrizzlyOne95  [developer] 18 Apr, 2024 @ 9:10am 
I have bought a copy of GOG version so I can see what cpath actually returns, and if I can find a solution.
Nielk1 18 Apr, 2024 @ 10:12am 
I am pretty sure mod folders need to match between GOG and Steam to work properly. It should be safe to assume if a mod is workshop ID 12345 on Steam it will be in a folder called 12345 in the GOG mods folder. If it is not the user should not expect things to work properly. The code I was investigating while working on automatic mod downloading for GOG (proved the concept out but haven't solved the CRC needing to recalculate yet) showed that the folder name does matter in MP joining.

Edit: Non-numeric mod folders work too, in fact I strongly suggest that anything not on the workshop ensure it has at least one non-numeric character in its folder name when placed in the GOG mods folder or steam workshop folder to ensure it is not improperly thought of as a workshop mod.

Mods don't belong in the packaged mods folder but might work there. I still strongly advise against putting anything in that folder as it is intended purely for mods that are packed into the base game and the code around it is... interesting.
Last edited by Nielk1; 18 Apr, 2024 @ 10:16am
GrizzlyOne95  [developer] 18 Apr, 2024 @ 10:46am 
Originally posted by Nielk1:
I am pretty sure mod folders need to match between GOG and Steam to work properly. It should be safe to assume if a mod is workshop ID 12345 on Steam it will be in a folder called 12345 in the GOG mods folder. If it is not the user should not expect things to work properly. The code I was investigating while working on automatic mod downloading for GOG (proved the concept out but haven't solved the CRC needing to recalculate yet) showed that the folder name does matter in MP joining.

Edit: Non-numeric mod folders work too, in fact I strongly suggest that anything not on the workshop ensure it has at least one non-numeric character in its folder name when placed in the GOG mods folder or steam workshop folder to ensure it is not improperly thought of as a workshop mod.

Mods don't belong in the packaged mods folder but might work there. I still strongly advise against putting anything in that folder as it is intended purely for mods that are packed into the base game and the code around it is... interesting.

I've provided my in progress mod to several GOG users and they threw it into packaged mods and it ran fine...I don't know how or why it wouldn't work correctly but that has just been my experience. I'll just check against both folders (mods and packaged_mods).

Good to know about the folder ID...if I can "assume" it has the same folder name as the steam workshop item then this should be pretty simple to add.
Nielk1 18 Apr, 2024 @ 12:41pm 
Originally posted by GrizzlyOne95:
...
packaged_mods and mods are both scanned for mods, but packaged_mods appears in other places in the code too for reasons I have not yet determined.
GrizzlyOne95  [developer] 18 Apr, 2024 @ 1:25pm 
Very well, thanks for bringing this to our attention.
< >
Showing 1-9 of 9 comments
Per page: 1530 50