Server configuration: различия между версиями
Строка 9: | Строка 9: | ||
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. | 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 = | = 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 [http://steamcommunity.com/workshop/browse/?section=collections&appid=4000 Garry's Mod Steam Workshop "Collections" section] and clicking [http://steamcommunity.com/workshop/editcollection/?appid=4000 "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. | + | 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 [http://steamcommunity.com/workshop/browse/?section=collections&appid=4000 Garry's Mod Steam Workshop "Collections" section] and clicking [http://steamcommunity.com/workshop/editcollection/?appid=4000 "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: |
+ | * [http://steamcommunity.com/workshop/filedetails/?id=261801217 Metrostroi (Subway Simulator)] | ||
+ | * Metrostroi Subway Simulator - Content Pack part (1 to 6) | ||
+ | * Metrostroi Subway Simulator - Scripts | ||
+ | * A Metrostroi maps you want to use (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]) | ||
= Installing Mods = | = 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. | 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. | ||
Строка 15: | Строка 19: | ||
srcds.exe +maxplayers 20 -console +host_workshop_collection YOUR_COLLECTION_ID +gamemode sandbox +map NAME_OF_THE_MAP_YOU_WANT | srcds.exe +maxplayers 20 -console +host_workshop_collection YOUR_COLLECTION_ID +gamemode sandbox +map NAME_OF_THE_MAP_YOU_WANT | ||
</pre> | </pre> | ||
+ | You can find the names of most metrostroi maps [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] 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.'''<br> | '''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.'''<br> | ||
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 [https://wiki.garrysmod.com/page/Category:Server_Owners here]. | 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 [https://wiki.garrysmod.com/page/Category:Server_Owners here]. |
Версия 21:16, 24 ноября 2017
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:
- Metrostroi (Subway Simulator)
- Metrostroi Subway Simulator - Content Pack part (1 to 6)
- Metrostroi Subway Simulator - Scripts
- A Metrostroi maps you want to use (listed here)
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.