Absurd Minds

More than 100 years without a motto.
It is currently 24 Nov 2024 13:06

All times are UTC-04:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
PostPosted: 10 Feb 2013 17:46 
Offline
User avatar

Joined: 25 Mar 2010 19:07
Posts: 8392
Valve is moving away from mapgroups in CS:GO and moving towards map collections. Map collections are superior to using mapgroups because they allow map updates to be downloaded to the server automatically whenever a mapmaker updates a map; they do not require a fastdl server; and they ensures that clients and servers don't have mismatched maps (eliminating the ever-frustrating "your map differs from the server's" error). Unless you're running really obscure maps that aren't in the workshop or personal maps that you don't want to upload to the workshop, I highly recommend using workshop collections.

(If you do choose to use mapgroups instead of workshop collections, check out this thread for information.)

Generating a web api authorization key
In order to use a workshop collection on your server, it must first have a web api authorization key.

Creating a workshop collection
First off, go to the CS:GO workshop (Note: You must be logged in to steam to continue.)

Find maps you like and click on them. I prefer opening them in a bunch of different tabs so as to avoid having to page back and forth all the time.

Go to the Collections tab in the CS:GO workshop.

Click on "Create Collection".

Add maps you like to your collection from the Collections page or from the map page.

While creating your collection, you will be determining the map order. (Remember, mapcycle.txt doesn't work in GO.) You can move maps up or down in the list by dragging and dropping.

Once you add items, on the very last page of the walkthrough for creating your collection there will be a button called "Publish". This will be towards the top of your window (even though all the "Continue" buttons were at the bottom). Don't forget to click this button.

Once you do that, you'll get a URL that looks like this:
Code:
http://steamcommunity.com/sharedfiles/filedetails/?id=125645871
The string of numbers at the end is your host workshop collection id. You must add this to your command line using the command +host_workshop_collection ############.

Specifying a start map
You can now choose to specify a startup map for the server. If left blank, the server will start on a random map from your collection. You do this by using the startup command +workshop_start_map #########. The number for each map can be found in the URL for the map in the workshop. For example, dust_se can be found at the URL http://steamcommunity.com/sharedfiles/f ... =125498851, so 125498851 is the ##########.

Summary
You should now have a startup command line that includes these three commands:
Code:
+host_workshop_collection ############# +workshop_start_map ######### -authkey #################
Restart your server, and it will go through a process of downloading all the maps from your collection onto the server. Depending on the number of maps in your collection, this may take a while. Don't be alarmed if your server doesn't appear online for a few minutes. You should be able to see it in the console output to make sure it's working correctly.

Troubleshooting

If you are trying to use a workshop but your server always starts on de_dust no matter what you have in your collection or start line, you need to delete these files from the /csgo directory.

subscribed_collection_ids.txt
subscribed_file_ids.txt
ugc_collection_cache.txt

_________________
Server list
Donate


Top
   
PostPosted: 08 Apr 2013 06:43 
Offline
User avatar

Joined: 25 Mar 2010 19:07
Posts: 8392
Valve has added a really cool feature to the workshop. Once you have created a collection, you can open any map's workshop page and simply click the button "Add to Collection". This will open a pop up allowing you to choose which collection to add it to. It's much quicker than having to favourite everything and then add them one at a time to each collection.

_________________
Server list
Donate


Top
   
PostPosted: 13 Jun 2014 18:26 
Offline
User avatar

Joined: 25 Mar 2010 19:07
Posts: 8392
One thing the workshop lacks is a function that deletes maps from your server after you delete them from your collection. I have created a script that can be used to automatically delete the maps from your folder by deleting files that haven't been accessed in N days.

Create a new script in a directory of your choice:
Code:
nano delete.sh
Within this script, you'll first tell your server to delete any files that haven't been accessed for N days (in this example, I use 14). Then it will delete any empty directories. (Note: Change any directories to the directories of the locations of your servers' workshop maps. You'll notice that I have multiple servers running, so I used the /*/ directory to tell the script to search in any directory.)
Code:
#!/bin/bash

find ~/go/*/csgo/maps/workshop -atime +14 -exec rm {} \;
sleep 5
find ~/go/*/csgo/maps/workshop -empty -type d -delete
Make this script executable.
Code:
chmod +x delete.sh
Next you'll want to add it your crontab to have it execute every so often. You can have it execute every time the machine restarts, every day, once a week, whatever. Here is a walkthrough of how to use crontab. For my purposes, I'm going to have this script run every time the server reboots.

Open crontab
Code:
sudo nano /etc/crontab
Then add this line (replace "user" with whatever username you have chosen to run your servers under.
Code:
@reboot user /home/user/delete.sh
(For more info on how I made this script, check here.)

_________________
Server list
Donate


Top
   
PostPosted: 13 Jun 2014 19:05 
Offline
User avatar

Joined: 20 Jul 2013 19:51
Posts: 648
Location: Ontario, Canada
Well this is a good thing. Valve's stepping it up on the content creater side of things by making it faster and safer.

_________________
i forgot to put a signature when i first joined

so this is my signature now


Top
   
PostPosted: 04 Sep 2014 11:49 
Offline
User avatar

Joined: 25 Mar 2010 19:07
Posts: 8392
If you are trying to use a workshop but your server always starts on de_dust no matter what you have in your collection or start line, you need to delete these files from the /csgo directory.

subscribed_collection_ids.txt
subscribed_file_ids.txt
ugc_collection_cache.txt

_________________
Server list
Donate


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 posts ] 

All times are UTC-04:00


Who is online

Users browsing this forum: No registered users and 27 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited