Server configuration: различия между версиями

Материал из Metrostroi
Перейти к: навигация, поиск
м
Строка 19: Строка 19:
 
* [http://steamcommunity.com/workshop/filedetails/?id=261801217 Metrostroi (Subway Simulator)]
 
* [http://steamcommunity.com/workshop/filedetails/?id=261801217 Metrostroi (Subway Simulator)]
 
* Metrostroi Subway Simulator - Content Pack part (1 to 6)
 
* Metrostroi Subway Simulator - Content Pack part (1 to 6)
* Metrostroi Subway Simulator - Scripts
+
* Metrostroi Subway Simulator - [https://steamcommunity.com/workshop/filedetails/?id=1095130789 Scripts]
 
* A Metrostroi map you want to use (mostly listed [https://wiki.metrostroi.net/wiki/%D0%A1%D0%BF%D0%B8%D1%81%D0%BE%D0%BA_%D0%BA%D0%B0%D1%80%D1%82 here])
 
* A Metrostroi map you want to use (mostly listed [https://wiki.metrostroi.net/wiki/%D0%A1%D0%BF%D0%B8%D1%81%D0%BE%D0%BA_%D0%BA%D0%B0%D1%80%D1%82 here])
  

Версия 21:44, 24 ноября 2017

Available languages: Русский · English



Installing SteamCMD

SteamCMD is a command line tool that makes setting up servers for Garry's Mod (and most other Source engine based games) very easy. You can download it for Windows and Linux from the Valve Developer Wiki.

Installing the Server (Windows)

To download and install your server enter the following script into command prompt or save it as a batch file (paste it into notepad, click "Save As..", set the "Save as type" to "All Files (*.*)" and append ".bat" or ".cmd" to the filename).

"PATH_TO_STEAMCMD\steamcmd.exe" +login anonymous +force_install_dir "PATH_FOR_SERVER" +app_update 4020 validate +quit
pause

Running the batch file will start to download a Garry's Mod to the "PATH_FOR_SERVER" directory you specified. This process may take some time depending on the speed of your internet connection.

Creating a Collection

The most straightforward way to add mods to your server is to create a steam workshop collection. You can do this by navigating to the Garry's Mod Steam Workshop "Collections" section and clicking "Create Collection". When you've named and branded your collection head over to the Workshop pages for any of the mods you want to add and click "Add to Collection" then choose the name of your server collection. To install Metrostroi you add the following mods to your collection:

Installing Mods

Using command line arguments you can configure your server to automatically install/ update all of the items in a collection. Save the following script as a batch file in the same path as your Garry's Mod server is installed.

srcds.exe +maxplayers 20 -console +host_workshop_collection YOUR_COLLECTION_ID +gamemode sandbox +map NAME_OF_THE_MAP_YOU_WANT

You can find the names of most metrostroi maps here to replace "NAME_OF_THE_MAP_YOU_WANT". Please note that the "gm_metrostroi_b50" has a lighting issue that may cause your server fail when starting up due to a "Engine hunk overflow!". To fix this simply add " +r_hunkalloclightmaps 0" to the end of your command line arguments.
If you have followed the above steps correctly you should now have a fully functional Metrostroi server. If you don't, for whatever reason, the Garry's Mod wiki has a more general (but more detailed guide) on how to set one up here.

Tips

Server.cfg

You can set the name, password, wagon limit and other important things by editing the "server.cfg" in "garrysmod\cfg". Below are some useful lines to put in this file:

  • hostname "SERVER_NAME_HERE"
  • metrostroi_maxwagons "WAGON_LIMIT_HERE"
  • metrostroi_maxtrains "TRAIN_LIMIT_HERE"
  • metrostroi_maxtrains_onplayer "MAX_TRAINS_PER_PLAYER_HERE"

ULX

Add ULX to your server. ULX is an admin tool that will make dealing with players and changing maps much easier.

Garry's Mod Wiki

Check out the "Server Owners" section on the Garry's Mod Wiki. It has some helpful tutorials on setting a loading screen and other more advanced topics not covered here.

Turbostroi

You can download the "Turbostroi" binary from here. Without it your server will perform quite poorly. Unzip the downloaded file and then place the ".dll" into your "garrysmod\lua\bin" directory as the README directs.