CS:GO Workshop For Server Operators: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Added to CS:GO category.)
No edit summary
Line 129: Line 129:


This is a common error (result 9, file not found) which can occur if a file is removed from workshop, or if the permissions are changed to friends-only or private. This error will also occur if there is a problem with your auth key.
This is a common error (result 9, file not found) which can occur if a file is removed from workshop, or if the permissions are changed to friends-only or private. This error will also occur if there is a problem with your auth key.
Another common error may show spew like this:
Fetched 1042 bytes via HTTP:
CDedicatedServerWorkshopManager: received file details for id 125499818: 'Collection Title'.
Skipping download for file id 125499818:'Collection Title' - version on disk is latest.
Setting mapgroup to '125613177'
CModelLoader::Map_IsValid:  No such map 'maps/workshop/125499818/1360205838_collection_branding.bsp'
changelevel failed: workshop/125499818/1360205838_collection_branding not found
This is caused by passing a collection id to 'host_workshop_map' instead of 'host_workshop_collection'. Be sure to only pass the ID for a map to 'host_workshop_map' and pass only collection IDs to 'host_workshop_collection'.


[[Category:Counter-Strike: Global Offensive]]
[[Category:Counter-Strike: Global Offensive]]

Revision as of 12:45, 7 February 2013

How to host workshop maps with a CS:GO dedicated server

Getting your web api authorization key

To download maps from the workshop, your server needs access to the steam web api. To allow this you'll need an authorization key which you can generate here:[1].

Once you have your key, you can either put your key in a text file named 'webapi_authkey.txt' in the game/csgo folder, or run your server with the commandline parameter '-authkey XXXXXXX' where XXXXXXX is your key.

Hosting workshop maps

Note.pngNote:Servers do not need to subscribe to Workshop maps. Instead, they load them directly using the concommands host_workshop_map and host_workshop_collection. Subscriptions are only relevant to clients.


The console command for hosting a workshop map is

host_workshop_map <file id>

Note that you can also add this to the srcds command line, in the form

+host_workshop_map <file id>

You can find the file id for a workshop map in its workshop page url. Workshopfileidurl.jpg

This command will download the latest version of the map, create a mapgroup with that map as a single entry and host it.

You can also host workshop collections the same way. Use the command

host_workshop_collection <collectionid>

where collectionid is the number found the same way as above but in the collection page's url. This command will then download all maps in the collection and create a mapgroup out of them, then host it.

Map updates

When changing level to a workshop map, your server will first check if a newer version is available and download it if needed. Clients will be notified with chat messages of the download and its progress. You can control these messages and their frequency with these convars:

sv_broadcast_ugc_downloads <0|1>
sv_broadcast_ugc_download_progress_interval <seconds>

Connecting clients will download the latest version of the hosted workshop map as a part of the connection process.

SE MAPS

CS:GO _SE maps have moved from the depot to the Maps Workshop. They are no longer distributed with CS:GO.

You can subscribe to them here

There are two pre-made collections that you can use in addition to any that are community created.



http://steamcommunity.com/sharedfiles/filedetails/?id=125499590

references

  • Dust II_se
  • Inferno_se
  • Nuke_se
  • Train_se

to use this collection, add

+host_workshop_collection 125499590

to your command line.



http://steamcommunity.com/sharedfiles/filedetails/?id=125499818

references the above and also includes Mirage_CSGO.

to use this collection, add

+host_workshop_collection 125499818

to your command line.

Troubleshooting

To enable verbose spew, set

sv_debug_ugc_downloads 1
developer 1

With these set, your server will spew the results it gets from steam. When working, you'll see output like this:

Fetched 1076 bytes via HTTP:
 response {
   result int( 1 = 0x1 )
   resultcount int( 1 = 0x1 )
   publishedfiledetails {
     0 {
       publishedfileid int( 123868347 = 0x76214BB )
       result int( 1 = 0x1 )
       creator 76561197975050072
       creator_app_id int( 745 = 0x2E9 )
       consumer_app_id int( 730 = 0x2DA )
       filename mymaps/de_aztec_proper.bsp
       file_size int( 26420720 = 0x19325F0 )
       file_url http://cloud-2.steampowered.com/ugc/XXX/XXXXXXX/
       hcontent_file 884098750744150125
       preview_url http://cloud-2.steampowered.com/ugc/XXX/XXXXXX/
       hcontent_preview 884098750744170633
       title De_Aztec_Proper
       description Aztec with adjusted visibility. A rebalanced underpass area,two new routes and many other changes   remove the map's CT bias.
       time_created int( 1359545920 = 0x51090640 )
       time_updated int( 1359545920 = 0x51090640 )
       visibility int( 0 = 0x0 )
       banned int( 0 = 0x0 )
       ban_reason
       subscriptions int( 3 = 0x3 )
       favorited int( 1 = 0x1 )
       lifetime_subscriptions int( 3 = 0x3 )
       lifetime_favorited int( 1 = 0x1 )
       views int( 13 = 0xD )
       tags {
         0 {
           tag Classic
         }
       }
     }
   }
 }

When an error occurs, you may see something like the below:

host_workshop_map 122439431
Fetched 140 bytes via HTTP:
  response {
    result int( 1 = 0x1 )
    resultcount int( 0 = 0x0 )
    publishedfiledetails {
      0 {
        publishedfileid int( 122439431 = 0x74C4707 )
        result int( 9 = 0x9 )
      }
    }
  }
Failed to parse file details KV for id 122439431. Result enum: 9
File id 122439431 not found. Probably removed from workshop

This is a common error (result 9, file not found) which can occur if a file is removed from workshop, or if the permissions are changed to friends-only or private. This error will also occur if there is a problem with your auth key.

Another common error may show spew like this:

Fetched 1042 bytes via HTTP:
CDedicatedServerWorkshopManager: received file details for id 125499818: 'Collection Title'.
Skipping download for file id 125499818:'Collection Title' - version on disk is latest.
Setting mapgroup to '125613177'
CModelLoader::Map_IsValid:  No such map 'maps/workshop/125499818/1360205838_collection_branding.bsp'
changelevel failed: workshop/125499818/1360205838_collection_branding not found

This is caused by passing a collection id to 'host_workshop_map' instead of 'host_workshop_collection'. Be sure to only pass the ID for a map to 'host_workshop_map' and pass only collection IDs to 'host_workshop_collection'.