Raised This Month: $51 Target: $400
 12% 

Dedi Server: where should I be changing round cvars?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CottonTheMoth
New Member
Join Date: Dec 2018
Old 12-19-2018 , 16:39   Dedi Server: where should I be changing round cvars?
Reply With Quote #1

In the past my jumbled mess of a server had cvars like mp_buytime and bot_quota pasted in multiple areas, the "cross my fingers and hope for the best" method.

I would like for my Sourcemod-enabled Free For All Deathmatch LAN server to feature the following settings:

mp_teammates_are_enemies 1
mp_solid_teammates 1
mp_autoteambalance 0
mp_limitteams 0
mp_endmatch_votenextmap 0
mp_endmatch_votenextleveltime 20
mp_endmatch_votenextmap_keepcurrent 0
mp_match_end_restart 0
mp_match_end_changelevel 1
mp_buytime 25
mp_autokick 0

In the past, I've had all of the above in my server.cfg plus the following:

hostname "Cotton's Place"
sv_broadcast_ugc_downloads 1
sv_broadcast_ugc_download_progress_interval 5
sv_hibernate_ms "20"
sv_hibernate_ms_vgui "20"
sv_hibernate_postgame_delay "5"
sv_hibernate_punt_tv_clients "0"
sv_hibernate_when_empty 0
host_players_show 2
sv_max_queries_sec 6

Important to note, my START_SERVER.bat hosts a workshop collection of maps, so I don't need map groups at all afaik?

As far as I can tell, the proper way to do this is to rename and edit gamemode_servers.txt and pick an existing gamemode, edit it with my cvars, but then the question is what game_mode and game_type variables should I be putting into my server.cfg?

Last edited by CottonTheMoth; 12-19-2018 at 16:45. Reason: Added additional info
CottonTheMoth is offline
Maxximou5
AlliedModders Donor
Join Date: Feb 2013
Old 12-19-2018 , 17:24   Re: Dedi Server: where should I be changing round cvars?
Reply With Quote #2

You didn't mention the game but could guess it's CS:GO, if it is...

The process is much more simple then you're making, you don't need to "cross my fingers and hope for the best", simply follow the instructions CS:GO gives you. If you're playing on Casual (game_type 0 & game_mode 0), you create the gamemode_casual_server.cfg. This is where you put all your mp_* values you want. Same process if you're using competitive, or whichever game_mode + game_type combo.

https://developer.valvesoftware.com/...ual_server.cfg

Your server.cfg is correct and really that's you should be having in there, not any values of mp_*. You don't add in game_type or game_mode into your server.cfg, you should have that in your start parameters when launching the server.

Use gamemode_servers.txt to add in your mapgroup if you are NOT using a workshop collection. Since you ARE using a workshop collection, add it to your server start parameters.
Code:
+host_workshop_collection 1337 +workshop_start_map b3475
Where 1337, you add your workshop collection
Where b3475, you add the workshop map you want to start with
Maxximou5 is offline
CottonTheMoth
New Member
Join Date: Dec 2018
Old 12-19-2018 , 18:00   Re: Dedi Server: where should I be changing round cvars?
Reply With Quote #3

Thank you for taking the time to respond, I knew I was missing obvious stuff!
Quote:
Originally Posted by Maxximou5 View Post
You didn't mention the game but could guess it's CS:GO, if it is...

...you create the gamemode_casual_server.cfg. This is where you put all your mp_* values you want. Same process if you're using competitive, or whichever game_mode + game_type combo.
Yes CS:GO, whoops! Great, so I've got in my STARTSERVER.bat
Code:
+game_type 1 +game_mode 2
as this is deathmatch mode. Would the new .cfg I need to create be titled exactly "gamemode_deathmatch_server.cfg"? Do I need to reference it to execute somewhere? In the past I'd title my own "gamemode_dm.cfg" and could not get it to execute. This must be because CSGO was looking for a specifically-named cfg file, yeah?

Quote:
Originally Posted by Maxximou5 View Post
Use gamemode_servers.txt to add in your mapgroup if you are NOT using a workshop collection. Since you ARE using a workshop collection, add it to your server start parameters.
Code:
+host_workshop_collection 1337 +workshop_start_map b3475
Where 1337, you add your workshop collection
Where b3475, you add the workshop map you want to start with
Good to know, my server uses workshop maps exclusively so I will avoid touching gamemode_servers.txt.example!
CottonTheMoth is offline
Maxximou5
AlliedModders Donor
Join Date: Feb 2013
Old 12-19-2018 , 22:06   Re: Dedi Server: where should I be changing round cvars?
Reply With Quote #4

Quote:
Originally Posted by CottonTheMoth View Post
Thank you for taking the time to respond, I knew I was missing obvious stuff!
You're most welcome!

Quote:
Originally Posted by CottonTheMoth View Post
Yes CS:GO, whoops! Great, so I've got in my STARTSERVER.bat
Code:
+game_type 1 +game_mode 2
as this is deathmatch mode. Would the new .cfg I need to create be titled exactly "gamemode_deathmatch_server.cfg"? Do I need to reference it to execute somewhere? In the past I'd title my own "gamemode_dm.cfg" and could not get it to execute. This must be because CSGO was looking for a specifically-named cfg file, yeah?
Correct, simply create the gamemode_deathmatch_server.cfg (../csgo/cfg folder, same as gamemode_deathmatch.cfg). You do not need to execute it, as it is executed automatically every time the map changes. It executes last, in terms of (server.cfg -> gamemode_deathmatch.cfg -> gamemode_deathmatch_server.cfg). If you noticed in your server console, it will have been saying (because it was missing):
"exec: couldn't exec gamemode_deathmatch_server.cfg"

Quote:
Originally Posted by CottonTheMoth View Post
Good to know, my server uses workshop maps exclusively so I will avoid touching gamemode_servers.txt.example!
Correct, you do not need to make or use gamemodes_server.txt or gamemodes_server.txt.example, since you are using a workshop collecting.
Maxximou5 is offline
CottonTheMoth
New Member
Join Date: Dec 2018
Old 12-20-2018 , 16:42   Re: Dedi Server: where should I be changing round cvars?
Reply With Quote #5

That completely solved my issues, thanks so much!

Instead of having a second downloaded server of 6GB I'm commenting out/cutting out the LAN/IP configurations like sv_lan 1 to swap it back and forth between LAN and a normal online-accessible server!

I feel like I actually know what I'm doing now bahaha, cheers!

I pointed Sourcemod's map lists for all forms of voting/map changing to mapcycle.txt which has my .BSP's (without extension) and that seems to be working perfectly too.

Should I want to remove a map from the rotation, what would be the best practice to do so?
1) Delete a map from the steam collection
2) Search through 50 folders to find out which string of numbers folder contains the workshop map file, and delete that?
3) Delete the map name from mapcycle.txt
CottonTheMoth is offline
Maxximou5
AlliedModders Donor
Join Date: Feb 2013
Old 12-20-2018 , 23:24   Re: Dedi Server: where should I be changing round cvars?
Reply With Quote #6

Glad it's working so well for you and that you're feeling more confident with using these servers!

As for your question, if it's running with the workshop collection and you don't want the servers to download it anymore or cycle through it you would want: 1 & 3, 2 is unnecessary.

Depending on your setup, if it's Linux, you could do 2 & 3 simply by executing a command. You could do the same on Windows but it locks files that are in use, as long as the map isn't in use you should have no problem removing it also by a powershell or batch script. Overall, stick with 1 & 3 for now, as that is the easiest to start with.
Maxximou5 is offline
CottonTheMoth
New Member
Join Date: Dec 2018
Old 12-21-2018 , 11:22   Re: Dedi Server: where should I be changing round cvars?
Reply With Quote #7

Quote:
Originally Posted by Maxximou5 View Post
Glad it's working so well for you and that you're feeling more confident with using these servers!

As for your question, if it's running with the workshop collection and you don't want the servers to download it anymore or cycle through it you would want: 1 & 3, 2 is unnecessary.

Depending on your setup, if it's Linux, you could do 2 & 3 simply by executing a command. You could do the same on Windows but it locks files that are in use, as long as the map isn't in use you should have no problem removing it also by a powershell or batch script. Overall, stick with 1 & 3 for now, as that is the easiest to start with.
Okay, gotcha. Deleting the downloaded folder (Step 2) is only a thought just to preserve the drive storage space and keep the server footprint small, but if I'm only talking deleting a map or two then yeah, no need.

Last question, is there a quick way to determine what exactly a new workshop map's bsp name is for adding to mapcycle.txt? The Workshop name is almost never the bsp name verbatim-- I suppose I could sort the workshop file folders by date modified to see which was most recently downloaded and go from there?

Edit:
Also, is it possible to change the sourcemod map-change menu order so that I have my server's favorite maps first, rather than alphabetically?
Nevermind, realized it follows mapcycle.txt's order, sweet!

Last edited by CottonTheMoth; 12-21-2018 at 14:22.
CottonTheMoth is offline
Maxximou5
AlliedModders Donor
Join Date: Feb 2013
Old 12-21-2018 , 14:36   Re: Dedi Server: where should I be changing round cvars?
Reply With Quote #8

Quote:
Originally Posted by CottonTheMoth View Post
Last question, is there a quick way to determine what exactly a new workshop map's bsp name is for adding to mapcycle.txt? The Workshop name is almost never the bsp name verbatim-- I suppose I could sort the workshop file folders by date modified to see which was most recently downloaded and go from there?
The only way of determining the map you want to remove is by reference. Whoever wants the map to be removed can give you either the map name listed on Workshop (e.g. Aim Usp) or the server's status map name (e.g. aim_usp). If it's the Workshop map name, simply go to your collection page (e.g. Aim Maps) and look for the name and listed below it will be the maps id, from the id you can go to /csgo/maps/workshop and see the id and folder to delete. If it's the map name from status, you can just search the server, get the path which contains the map and remove the folder as suggested before containing the map.

If a user wants a map removed, have them type `status` in console and give you the full path of the workshop map (e.g. workshop/1337/awesome.bsp).

Quote:
Originally Posted by CottonTheMoth View Post
Edit:
Also, is it possible to change the sourcemod map-change menu order so that I have my server's favorite maps first, rather than alphabetically?
Nevermind, realized it follows mapcycle.txt's order, sweet!
Food for thought, sourcemod map plugins utilize the function (ReadMapList) to populate the list of available maps. So if it reads the mapcycle file, it will list it as it is; otherwise, it will read from the maps folder.
Quote:
If the maps end up being read from the maps folder (MAPLIST_FLAG_MAPSFOLDER), they are automatically sorted in alphabetical, ascending order.

Last edited by Maxximou5; 12-21-2018 at 14:37.
Maxximou5 is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 12-21-2018 , 21:13   Re: Dedi Server: where should I be changing round cvars?
Reply With Quote #9

Quote:
Originally Posted by CottonTheMoth View Post
Last question, is there a quick way to determine what exactly a new workshop map's bsp name is for adding to mapcycle.txt? The Workshop name is almost never the bsp name verbatim-- I suppose I could sort the workshop file folders by date modified to see which was most recently downloaded and go from there?
Last time I checked, you can add workshop maps to mapcycle.txt just using something like

workshop/123456789

where 123456789 should be replaced by the Workshop Map ID (i.e. Dust2_se would be workshop/125488374)

Edit: Almost forgot, this used to be platform specific, not sure if it still is. In other words, on Linux you'd need workshop\125488374 instead.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 12-21-2018 at 21:15.
Powerlord is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:09.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode