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

Solved CS2 server configuration files problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Toug
Junior Member
Join Date: Jan 2024
Old 01-21-2024 , 12:43   CS2 server configuration files problem
Reply With Quote #1

Hi,
I'm trying to configure properly the CS2 server my pc is running. The server runs and I'm able to connect from lan et internet. But I'm having issues on the game modes and their settings.

For example, when I set deathmatch, changing the parameters in the .cfg files change nothing. But I can see in the logs that the cfg file in loaded because the echo command at the end of the cfg file is shown.

I would like to configure my server with deathmatch but without bot.
So I tried:
bot_quota 0

I also tried to change the time limit for buying with these options
mp_buytime 20
mp_buy_anywhere 0

But nothing change. It's like my changes are ignored.

Here is how I start the server:
A bat file contains:
start cs2.exe -dedicated -insecure +map de_inferno +game_alias deathmatch +servercfgfile gamemode_deathmatch2.cfg +sv_setsteamaccount XXXXXXXXXXXXXXXXXXXXXXXX

you can see the configuration files here: https://github.com/Toug19/cs_server_cfg_file

Last edited by Toug; 01-27-2024 at 09:32.
Toug is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 01-21-2024 , 14:05   Re: CS2 server configuration files problem
Reply With Quote #2


About game modes link


Try create file ...csgo/cfg/autoexec.cfg
Add these in there
Code:
// execute permament bans in memory
exec banned_user
exec banned_ip


// game mode settings
//game_type 1
//game_mode 2
game_alias deathmatch

// mapgroup from gamemodes.txt or gamemodes_server.txt
// type in server console print_mapgroup_sv to see list maps
mapgroup mg_casualsigma
autoexec config file will work once when server start.
-Use server.cfg to reset console variables on every map change.


Then, you not edit Valve own gamemode config files, because next update will replace those back to default.
You create config override file and use that ...csgo/cfg/gamemode_deathmatch_server.cfg

inside gamemode_deathmatch_server.cfg
Code:
bot_quota 0
mp_buytime 20
mp_buy_anywhere 0
*edit
Seem CS2 not execute autoexec.cfg file like hl2 games.
Add in CS2 launch parameter
Code:
 -dedicated -insecure +map de_dust2 +exec autoexec.cfg +sv_setsteamaccount XXXXXXXXXXXXXXXXXXXXXXXX
__________________
Do not Private Message @me

Last edited by Bacardi; 01-21-2024 at 14:18.
Bacardi is offline
Toug
Junior Member
Join Date: Jan 2024
Old 01-22-2024 , 15:16   Re: CS2 server configuration files problem
Reply With Quote #3

What I do not understand from your answer is how the file gamemode_deathmatch_server.cfg would be used by the server?
Because nothing in the cs2 parameters
-dedicated -insecure +map de_dust2 +exec autoexec.cfg +sv_setsteamaccount XXXXXXXXXXXXXXXXXXXXXXXX

nor the autoexec.cfg file says that the gamemode_deathmatch_server.cfg will be used.

Shouldn't I put the content of the gamemode_deathmatch_server.cfg in the autoexec.cfg, or the opposite, put the content of the autoexec.cfg in the gamemode_deathmatch_server.cfg file?

Thanks.
Toug is offline
Toug
Junior Member
Join Date: Jan 2024
Old 01-22-2024 , 15:28   Re: CS2 server configuration files problem
Reply With Quote #4

I finally found the answer to my last question, some file are automatically loaded...
Toug is offline
Austin
Senior Member
Join Date: Oct 2005
Old 01-26-2024 , 23:03   Re: CS2 server configuration files problem
Reply With Quote #5

Put echo commands in ALL of your config files
Then watch the console as the server starts up / and also when it changes maps
and you will see EXACTLY what is going on

what config files are being execuited, the Order they are execuited, and also which ones are not.


PHP Code:
echo ------------------------------------------------------------------------------------------
echo ----------------------------------- 
Autoexec.cfg LOADING ---------------------------------
echo ------------------------------------------------------------------------------------------ 

Last edited by Austin; 01-26-2024 at 23:06.
Austin is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 01-26-2024 , 23:59   Re: CS2 server configuration files problem
Reply With Quote #6

Good advice.

In csgo, it can execute some cfg files were ECHO command not work.
https://forums.alliedmods.net/showthread.php?t=338774
__________________
Do not Private Message @me
Bacardi is offline
Wizzardoff
Senior Member
Join Date: Dec 2022
Old 01-28-2024 , 17:03   Re: CS2 server configuration files problem
Reply With Quote #7

you can delete command +servercfg and make gamemode_deathmatch_server.cfg only,and there put cvars. If you use deathmatch it will execute gamemode_deathmatch.cfg first automatically,then gamemode_deathmatch_server.cfg right after that on every mapchange.
Add one more cvar in gamemode_deathmatch_server.cfg after bot_quota : bota_quota_mode fill

Last edited by Wizzardoff; 01-28-2024 at 17:03.
Wizzardoff 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 03:30.


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