Alright, so this is my first post here and I do know that this forum is more orientated around SourceMod and games like TF, CS:S, CS:GO and various mods. But my question is about FastDL which (I think) exists on every Source game. There might be a bit GLua things mentioned quite a bit, but this is the last place I can find help after FP's forums shut down (I tried Garry's Mod official Discord server before) and I hope I can find someone that could help me here.
Ok, so about my question.
I got my FastDL setup, the structure is correct, compressed maps are getting downloaded.
First occurrence of my problem appeared when I tried downloading a map ttt_glacier.
(
https://steamcommunity.com/sharedfil.../?id=228041314)
(I remember we had problems with this map before, so we ditched it)
I noticed this map contains materials, models, and sounds in separate folders, not compiled into the map (I think you can do something like that). So I compressed them and put them into the FastDL.
Then I noticed that the map is getting downloaded, but other stuff doesn't.
And here is where GLua kicks in.
Later I noticed that when I compress (some) addons' "resources" they get downloaded. That isn't true for all addons, though. This is thanks to
a/o
Code:
resource.AddSingleFile()
(Some addons used resource.AddWorkshop(), but I don't want that, because supposedly it's slow and that's the reason FastDL exists for Garry's Mod)
What I tried?
Okay, so ttt_glacier HAS A BIT OF FILES, heck even a normal weapon like
https://steamcommunity.com/sharedfil.../?id=646754302 has a lot.
Adding every weapon/player model/map could take forever and adding them manually to the resource.AddFile() won't do the job.
Also, I'm worried about the 8192 file limit for this function (but when I look at that number now, it might be way more than enough, who knows).
So I thought about automating that process and making a JSON file using bash (I'm using Ubuntu 18.04) containing all paths to the files and put them into resource.AddSingleFile() with a Lua script.
Also I thought about putting only maps on FastDL and using resource.AddWorkshop() (Or a host collection) for other stuff.
But it feels like that's not the right way to do it.. I don't know.
Tell me what you think. How do other gmod/non-gmod game servers approach this problem and what would you do or what should I do?
Also if you want more information, or you are unsure about how Garry's Mod handles things, feel free to ask.
Thanks in advance!