Cài đặt Steam
Đăng nhập
|
Ngôn ngữ
简体中文 (Hán giản thể)
繁體中文 (Hán phồn thể)
日本語 (Nhật)
한국어 (Hàn Quốc)
ไทย (Thái)
Български (Bungari)
Čeština (CH Séc)
Dansk (Đan Mạch)
Deutsch (Đức)
English (Anh)
Español - España (Tây Ban Nha - TBN)
Español - Latinoamérica (Tây Ban Nha cho Mỹ Latin)
Ελληνικά (Hy Lạp)
Français (Pháp)
Italiano (Ý)
Bahasa Indonesia (tiếng Indonesia)
Magyar (Hungary)
Nederlands (Hà Lan)
Norsk (Na Uy)
Polski (Ba Lan)
Português (Tiếng Bồ Đào Nha - BĐN)
Português - Brasil (Bồ Đào Nha - Brazil)
Română (Rumani)
Русский (Nga)
Suomi (Phần Lan)
Svenska (Thụy Điển)
Türkçe (Thổ Nhĩ Kỳ)
Українська (Ukraine)
Báo cáo lỗi dịch thuật
What you have to do is write a Steam script and then execute it using SteamCMD. Here, I'll explain. So you start out with your many lines of code. In my case I was doing mod updates;
steamcmd +login n p +force_install_dir "C:\somewhere" +workshop_download_item # #
steamcmd +login n p +force_install_dir "C:\somewhere" +workshop_download_item # #
steamcmd +login n p +force_install_dir "C:\somewhere" +workshop_download_item # #
steamcmd +login n p +force_install_dir "C:\somewhere" +workshop_download_item # #
steamcmd +login n p +force_install_dir "C:\somewhere" +workshop_download_item # #
Doing it this way forces you to have to enter your authenticator for every single mod. It's quite a pain in the arse. Instead you simply put this in your bat file;
steamcmd +runscript "scriptname.txt"
You can name the text file whatever you want, I just use that as an example. Then you create a text file where SteamCMD is located on your computer called "scriptname.txt", again as an example. In that text file you put all the SteamCMD commands as if you were typing them into the console yourself. Only difference is, it won't have to login more than once. So your "scriptname.txt" file will look something like this;
@ShutdownOnFailedCommand 0 // stops it from exiting if an error happens
@NoPromptForPassword 1 // won't ask you for the password
login [username] [password]
force_install_dir "C:\somewhere"
workshop_download_item # #
workshop_download_item # #
workshop_download_item # #
workshop_download_item # #
workshop_download_item # #
workshop_download_item # #
workshop_download_item # #
workshop_download_item # #
quit
When doing workshop items it's important to know that the first # is normally the SteamID of the game, not the dedicated server. The second # is the Workshop ID of the specific mod you want to install. You also need the Force Install line to point to where the mods get installed for that specific game, since SteamCMD really doesn't know where to download them to on it's own.
Happy server managing!
Easy fix though. You just have to edit your bat file to move the folders manually to the proper location after they finish downloading. Just add this to your batch file after the +runscript line;
xcopy "C:\TheGameIDPath\*.*" "C:\WhereTheModsGo\" /Y /E
Some games yes, but a lot of games actually require you to provide "proof" you own the game before you can download workshop content. In addition, even some dedicated server downloads require you to prove you own the game by logging in.