improved

CS2 Match-API: Week 40 Updates

Changelog:

  • Fixed an issue where demo recordings weren't stopped if a match was canceled
  • Fixed an issue where players losing their internet connection were not detached correctly, hindering reconnection.
  • Fixed an issue with server crashes at the end of the match, hindering the match_end webhook from being sent in some cases.
  • Fixed an edge case where players weren't authorized correctly, which affected their ability to connect.
  • Servers now restart on Match POST to ensure the server is not in a locked state.
  • Added executes of warmup_server.cfg and live_server.cfg to allow for custom config edits.

 

Detailed information:

Over the last week following the CS2:s launch, we've worked hard to provide users with a seamless experience with our CS2 Match API. Our primary focus has been on match stability before we move forward with building out more features (we're getting there as well, so stay tuned)!

We have received several requests regarding custom configurations during specific match phases. In response, we've now introduced a way to accommodate this as we evaluate other potential solutions.

Our Warmup Config is applied immediately upon receiving a Match POST (after the server has booted) while awaiting player connections. We recommend keeping this as is for the moment, as the current setup with an FFA DM is designed to optimize the user experience.

The Live Config is initiated just before the start of a match when the players have been assigned to their teams. It is at this point that match modifications, if any, should be made.

To override any of these configs, place the following files on the server:

  • For changes during the warmup phase, use cfg/warmup_server.cfg
  • For changes when the game starts, use cfg/live_server.cfg

Check out our configs below to understand what is done by our API, and when your overrides will be executed.

 

mp_teamname_1                         "${match.team1.name || ""}"
mp_teamflag_1                         "${match.team1.flag || ""}" 
mp_teamname_2                         "${match.team2.name || ""}" 
mp_teamflag_2                         "${match.team2.flag || ""}" 
sv_vote_kick_ban_duration             "0"
mp_warmuptime_all_players_connected   "0"
mp_limitteams                         "0"
mp_autoteambalance                    "false"
mp_warmuptime                         "${match.settings.connect_time}" 
mp_warmup_start
mp_force_pick_time                    "0"
mp_ct_default_melee                   "weapon_knife"
mp_ct_default_secondary               "weapon_deagle"
mp_ct_default_primary                 "weapon_m4a1"
mp_t_default_melee                    "weapon_knife"
mp_t_default_secondary                "weapon_deagle"
mp_t_default_primary                  "weapon_ak47"
mp_randomspawn                        "1"
mp_randomspawn_los                    "1"
mp_teammates_are_enemies              "1"
mp_maxmoney                           "0"
exec                                  "warmup_server.cfg" // Make custom edits in this file
mp_force_pick_time                    "60"
mp_ct_default_melee                   "weapon_knife"
mp_ct_default_secondary               "weapon_hkp2000" 
mp_ct_default_primary                 ""
mp_t_default_melee                    "weapon_knife"
mp_t_default_secondary                "weapon_glock"
mp_t_default_primary                  ""
mp_randomspawn                        "0"
mp_randomspawn_los                    "0"
mp_teammates_are_enemies              "0"
mp_maxmoney                           "16000"
mp_backup_round_file_pattern          "${match._id}_round%round%.txt" 
mp_limitteams                         "1"
tv_record                             "${match._id}"
mp_warmup_end
mp_team_intro_time                    "0"
mp_backup_restore_load_file           "cs2-match-api-config-${match._id}.txt"
exec                                  "live_server.cfg" // Make custom edits in this file
mp_restartgame                        "1"
say                                   ">>> LIVE LIVE LIVE <<<"
say                                   ">>> LIVE LIVE LIVE <<<"
say                                   ">>> LIVE LIVE LIVE <<<"

If you encounter any issues with the Match-API or have any feedback in general, reach out to us at [email protected]