resource.AddWorkshop does not make clients download workshop items
7 replies, posted
I am currently able to get my server to download files for itself via a collection with +host_workshop_collection. Here is what my starting script looks like. Also note im on a dedicated server.
/srv/gmod/server_1/srcds_run \
-authkey (my auth key) \
-console \
-condebug \
-debug \
-game garrysmod \
+maxplayers 12 \
+host_workshop_collection (my collection id) \
+gamemode darkrp
+map rp_evocity2_v5p
And for client side downloads I have a workshop.lua inside of garrysmod/lua/autorun/server:
garrysmod/lua/autorun/server/workshop.lua
resource.AddWorkshop("######")
resource.AddWorkshop("######")
resource.AddWorkshop("######")
...
However when a client joins they just don't download anything. To my understanding each call of resource.AddWorkshop should make the client download that addon from the steam workshop for use on my server. For safe measure ive put only one addon in the collection and workshop.lua. it downloads fine on the server end but for the client it just does nothing. My authkey is also set to the raw ip of my server.
Is there anything I'm missing?
For one why is your authkey an IP.
it should be from here
https://steamcommunity.com/dev/apikey
Also resource.AddWorkshop is for forcing the downloads of (Models,Materials,Etc)
The collection only uses the Lua files from the Addons, Doesn't download Models, Etc
The authkey part was a typo, i meant to say i created it from the raw ip.
Also I didn't realize that it doesnt download the models, that must be the problem.
Yeah, Collection just uses the addon, AddWorkshop downloads the resources.
Took me a while at first to figure that out lol.
You do not need authkey anymore.
So i've been using resource.AddFile in place so that i can have clients download models and textures. However, on the wiki page it says "There's a 8192 downloadable file limit. If you need more, consider using Workshop addons - resource.AddWorkshop" Why is it stating this as if these functions accomplish the same thing? With a map and a few addons im well past the 8192 limit states here and am not sure what to do.
resource.AddFile is for forcing downloads from your own server to the client.
resource.AddWorkshop is for forcing downloads from workshop to the client.
resouce.addworkshop also made the clients download everything from my server I have added. So they never had errors because of missing models or materials as far as I know.
Sorry, you need to Log In to post a reply to this thread.