splewis / get5

CS:GO Sourcemod plugin for competitive matches/scrims
GNU General Public License v3.0
559 stars 176 forks source link

[Bug]: Map selection sometimes fails for workshop maps #1030

Open deLuXe83 opened 1 year ago

deLuXe83 commented 1 year ago

Documentation

Get5 Version

0.14.7

The Issue

Hi

Still having issues on playing workshop maps :)

From time to time after one workshoip map is finished, it won't switch to next workshop map. Manually change to e.g. dust2 is working. After that mapchange to workshop map works.

This console output: [Get5] The map will change once GOTV has finished broadcasting. Completed GOTV demo "2023-06-08_23_252_map4_de_abbey.dem", recording time 2657.5 StopRecording: 3360 frames flushed in 2.33 seconds Net channel ratelimit exceeded for 91.5.63.48:27005: 37 packets rejected. [Get5] The map will change once GOTV has finished broadcasting. [Get5] Changing map to de_DONOTBANPICK... [Get5] The map will change once GOTV has finished broadcasting. CHANGELEVEL: Looking for next level in mapgroup '1215935299' Looking for next map in mapgroup '1215935299'... CHANGELEVEL: Choosing map 'workshop/1215935299/de_abbey' (previous was workshop/1215935299/de_abbey) CHANGELEVEL: Not changing level, mp_match_end_restart is false, mp_match_end_changelevel is false and next is the same EVERYONE CAN BUY!

'mp_match_end_restart' is set to '1' in cfg file.

de_DONOTBANPICK ist just a fake name for the veto system (=> we have a pool of 9 maps, whereof 5 maps will be played. Each team picks 2 maps and the 5th map is "donotbanpick" ;-))

The issue with the log file is the last line: "CHANGELEVEL: Not changing level, mp_match_end_restart is false, mp_match_end_changelevel is false and next is the same"

Thank you Bests!

Match Configuration

"Match"
{
    "match_title"   "S9E05"

    //######## Config laden
    //get5_loadmatch addons/sourcemod/configs/get5/s9e05.cfg
    //########

    "num_maps"      "5" // Must be an odd number or 2. 1->Bo1, 2->Bo2, 3->Bo3, etc.
    "clinch_series" "0" // If 0, the entire map list will be played, regardless of score. If 1, a series will be won when the series score for a team exceeds the number of maps divided by two.

    "skip_veto"     "0" // If set to 1, the maps will be preset using the first maps in the maplist below.

    // "veto_first" "random"  // Set to "team1" or "team2" to select who starts the veto. Any other values will default to team1 starting.
    "veto_mode"
    {   

    "team1_ban" ""
    "team2_ban" ""
        "team1_pick" ""
        "team2_pick" ""
    "team1_ban" ""
    "team2_ban" ""
        "team1_pick" ""
        "team2_pick" ""
    // nur 8 votes bei 9 maps => letzte map wird dann geknifed

    }

    "side_type"     "standard" // Either "standard", "always_knife", or "never_knife" 

    //Team Seiten festlegen (Mappool muss passend vorgegeben werden, side_type => standard; skip_veto => 1
    // "map_sides"
    //  {
    //      "team1_ct"      ""
    //      "team2_ct"      ""  
    //      "team1_ct"      ""
    //      "team2_ct"      ""
    //      "knife"     ""
    //  }

    "maplist"
    {

         "fromfile"     "addons/sourcemod/configs/get5/mappool4.cfg"    // Mappool 4v4
        // "fromfile"       "addons/sourcemod/configs/get5/mappool5.cfg"    // Mappool 5v5
        // "fromfile"       "addons/sourcemod/configs/get5/mappool6.cfg"    // Mappool 6v6

        // + weekly Wichsmap im Mappool ergänzen

    }

    "players_per_team"      "4"

    "min_players_to_ready"      "1" // Minimum # of players a team must have to ready
    "min_spectators_to_ready"       "0" // How many spectators must be ready to begin.

    // These values wrap mp_teamprediction_pct and mp_teamprediction_txt.
    // You can exclude these if you don't want those cvars set.
    "favored_percentage_team1"      "65"
    "favored_percentage_text"       "HLTV Bets"

        "team1"
    {
        "name"      "Team_A" // You should always set a team name, otherwise some chat messages will not make sense. If there is no true team name, use "Team1" at least.
        "tag"       "[A]"  // Short tags replace the "clan tag" on the scoreboard. They are optional.
        "flag"      "DE"
        "logo"      ""      // Als SVG Datei (<250kb; 64x64px) unter "csgo/materials/panorama/images/tournaments/teams" ablegen; wichtig, dass im SVG Header "width="64px" height="64px"" steht
        "players"
        {
            ....

        }       

    }

    "team2"
    {
        "name"      "Team_B"
        "tag"       "[B]"
        "flag"      "DE"
        "logo"      ""
        "players"

        {

...

        }
    }

"spectators" // players allowed in spectator (e.g., admins) should go here
    {
        "players"
        {
            "STEAM_1:1:....."       ""
        }
    }

    // These will be executed on each map start or config load.
    // You should not use this as a replacement for the cfg/get5/live.cfg config.
    "cvars"
    {
        "hostname"      "S905"

        "mp_maxrounds"              "28"                // Rundenzeit
        "mp_match_restart_delay" "10"                       // legt fest, wie lange pause nach der map
        "get5_auto_ready_active_players" "1"                // danach dann auto ready
        "cash_team_bonus_shorthanded" "0"               // Bonus bei Unterzahl ausschalten (default 1000)

        // ##### 7v7 #####
        //"mp_roundtime"                "2.05"                  // Für 7v7 Rundenzeit erhöhen
        //"mp_roundtime_hostage"        "2.05"                  // Für 7v7 Rundenzeit erhöhen
        //"mp_roundtime_defuse"     "2.05"                  // Für 7v7 Rundenzeit erhöhen

        // ##### 4v4 #####      
         "cash_team_loser_bonus" "1900"         // Loser Bonus startet mit 1900 (statt 1400)
         "mp_consecutive_loss_max" "3"          // Nach wievielen Runden maximaler Loser Bonus (Standard 4) => auf 3 geändert, weil mit 1900 gestartet wird

    }
}

Debug Info

Time: 06/08/2023 - 22:54:28
Plugin version: 0.14.7
sourcemod_version = 1.12.0.6928
metamod_version = 1.11.0-dev+1148V

Global state:
g_GameState = 7 (live)
g_MatchID = 252
g_RoundNumber = 11
g_MapsToWin = 5
g_LastVetoTeam = 3
g_MapPoolList (length 9) = 
  [0] -> workshop/1215935299/de_abbey
  [1] -> de_canals
  [2] -> workshop/126446777/de_seaside
  [3] -> workshop/2844508849/de_oceanfront
  [4] -> workshop/707503558/de_calamari
  [5] -> workshop/580446503/de_tulip
  [6] -> workshop/2459189885/de_marca
  [7] -> workshop/2105680462/de_firenze
  [8] -> workshop/2954659602/de_DONOTBANPICK
g_MapsToPlay (length 5) = 
  [0] -> workshop/2105680462/de_firenze
  [1] -> de_canals
  [2] -> workshop/2844508849/de_oceanfront
  [3] -> workshop/1215935299/de_abbey
  [4] -> workshop/2954659602/de_DONOTBANPICK
g_MapsLeftInVetoPool (length 0) = 
Defined map sides:
g_MapSides(0) = team1_t
g_MapSides(1) = team1_ct
g_MapSides(2) = team1_t
g_MapSides(3) = team1_ct
g_MapSides(4) = knife
g_MatchTitle = S9E05
g_PlayersPerTeam = 4
g_CoachesPerTeam = 2
g_MinPlayersToReady = 1
g_MinSpectatorsToReady = 0
g_SkipVeto = 0
g_MatchSideType = 0
g_InScrimMode = 0
g_SeriesCanClinch = 0
g_Wingman = 0
g_HasKnifeRoundStarted = 0
g_MapReloadRequired = 0
g_MapChangePending = 0
g_PendingSideSwap = 0
g_DoingBackupRestoreNow = 0
g_ReadyTimeWaitingUsed = 127
g_PausingTeam = 3
g_PauseType = 0
g_LatestPauseDuration = -1
g_PendingSurrenderTeam = 3
Team info for team1 (0):
g_TeamIDs = 
g_TeamNames = Team_A
g_TeamPlayers (length 4) = 
  [0] -> 76561197994752297
  [1] -> 76561198847241077
  [2] -> 76561198069687775
  [3] -> 76561197960300580
g_TeamTags = [A]
g_FormattedTeamNames = {LIGHT_GREEN}Team_A{NORMAL}
g_TeamFlags = DE
g_TeamLogos = 
g_TeamMatchTexts = 
g_SurrenderVotes = 0
g_TeamSide = T (2)
g_TeamSeriesScores = 2
g_TeamReadyOverride = 0
g_TeamStartingSide = 2
g_TacticalPauseTimeUsed = 0
g_TacticalPausesUsed = 0
g_TechnicalPausesUsed = 0
g_TeamGivenStopCommand = 0
g_TeamCoaches (length 0) = 
Team info for team2 (1):
g_TeamIDs = 
g_TeamNames = Team_B
g_TeamPlayers (length 4) = 
  [0] -> 76561198018584388
  [1] -> 76561197968336318
  [2] -> 76561198013444801
  [3] -> 76561197963572337
g_TeamTags = [B]
g_FormattedTeamNames = {PINK}Team_B{NORMAL}
g_TeamFlags = DE
g_TeamLogos = 
g_TeamMatchTexts = 
g_SurrenderVotes = 0
g_TeamSide = CT (3)
g_TeamSeriesScores = 0
g_TeamReadyOverride = 0
g_TeamStartingSide = 3
g_TacticalPauseTimeUsed = 67
g_TacticalPausesUsed = 1
g_TechnicalPausesUsed = 0
g_TeamGivenStopCommand = 0
g_TeamCoaches (length 0) = 
Team info for spec (2):
g_TeamIDs = 
g_TeamNames = casters
g_TeamPlayers (length 1) = 
  [0] -> 76561197960265729
g_TeamTags = 
g_FormattedTeamNames = {NORMAL}casters{NORMAL}
g_TeamFlags = 
g_TeamLogos = 
g_TeamMatchTexts = 
g_SurrenderVotes = 0
g_TeamSide = none (0)
g_TeamSeriesScores = 0
g_TeamReadyOverride = 0
g_TeamStartingSide = 0
g_TacticalPauseTimeUsed = 0
g_TacticalPausesUsed = 0
g_TechnicalPausesUsed = 0
g_TeamGivenStopCommand = 0
g_TeamCoaches (length 0) = 
Team info for none (3):
g_TeamIDs = 
g_TeamNames = 
g_TeamPlayers (length 0) = 
g_TeamTags = 
g_FormattedTeamNames = 
g_TeamFlags = 
g_TeamLogos = 
g_TeamMatchTexts = 
g_SurrenderVotes = 0
g_TeamSide = none (0)
g_TeamSeriesScores = 0
g_TeamReadyOverride = 0
g_TeamStartingSide = 0
g_TacticalPauseTimeUsed = 0
g_TacticalPausesUsed = 0
g_TechnicalPausesUsed = 0
g_TeamGivenStopCommand = 0
g_TeamCoaches (length 0) = 

Interesting cvars:
get5_allow_technical_pause = 0
get5_autoload_config = 
get5_auto_ready_active_players = 1
get5_check_auths = 1
get5_fixed_pause_time = 0
get5_kick_when_no_match_loaded = 0
get5_live_cfg = get5/competitive.cfg
get5_tech_pause_time = 0
get5_max_pause_time = 0
get5_max_pauses = 0
get5_max_tech_pauses = 0
get5_pause_on_veto = 1
get5_pausing_enabled = 1
get5_print_damage = 1
get5_print_damage_excess = 0
get5_damageprint_format = - [{KILL_TO}] ({DMG_TO} in {HITS_TO}) to [{KILL_FROM}] ({DMG_FROM} in {HITS_FROM}) from {NAME} ({HEALTH} HP)
get5_reset_pauses_each_half = 1
get5_web_api_url = 
get5_last_backup_file = get5_backup/get5_backup0_match252_map2_round11.cfg
mp_freezetime = 15
mp_halftime = 1
mp_halftime_duration = 15.0
mp_halftime_pausetimer = 0
mp_match_end_restart = 1
mp_maxrounds = 28
mp_overtime_enable = 1
mp_overtime_halftime_pausetimer = 0
mp_overtime_maxrounds = 6
mp_round_restart_delay = 7
mp_timelimit = 0
mp_warmup_pausetimer = 0
mp_warmuptime_all_players_connected = 0
sv_coaching_enabled = 1
tv_delay = 105
tv_enable = 1

Last log info from addons/sourcemod/logs/errors_20230608.log:
L 06/08/2023 - 21:10:48: Error log file session closed.
L 06/08/2023 - 21:05:15: [get5_apistats.smx] Failed to create logo directory: materials/panorama/images/tournaments/teams
L 06/08/2023 - 21:05:15: Info (map "de_dust2") (file "/home/container/csgo/addons/sourcemod/logs/errors_20230608.log")
L 06/08/2023 - 21:05:15: SourceMod error session started

sm plugins list:
sounds.smx: Sound Commands by AlliedModders LLC: Sound Commands (1.12.0.6928, http://www.sourcemod.net/)
adminmenu.smx: Admin Menu by AlliedModders LLC: Administration Menu (1.12.0.6928, http://www.sourcemod.net/)
basecomm.smx: Basic Comm Control by AlliedModders LLC: Provides methods of controlling communication. (1.12.0.6928, http://www.sourcemod.net/)
basecommands.smx: Basic Commands by AlliedModders LLC: Basic Admin Commands (1.12.0.6928, http://www.sourcemod.net/)
basetriggers.smx: Basic Info Triggers by AlliedModders LLC: Adds ff, timeleft, thetime, and others. (1.12.0.6928, http://www.sourcemod.net/)
basechat.smx: Basic Chat by AlliedModders LLC: Basic Communication Commands (1.12.0.6928, http://www.sourcemod.net/)
antiflood.smx: Anti-Flood by AlliedModders LLC: Protects against chat flooding (1.12.0.6928, http://www.sourcemod.net/)
funcommands.smx: Fun Commands by AlliedModders LLC: Fun Commands (1.12.0.6928, http://www.sourcemod.net/)
get5_mysqlstats.smx: Get5 MySQL stats by splewis: Records match stats collected by get5 to MySQL (0.14.7, https://github.com/splewis/get5)
playercommands.smx: Player Commands by AlliedModders LLC: Misc. Player Commands (1.12.0.6928, http://www.sourcemod.net/)
get5_apistats.smx: Get5 Web API Integration by splewis: Records match stats to a get5-web api (0.14.7, https://github.com/splewis/get5)
adminhelp.smx: Admin Help by AlliedModders LLC: Display command information (1.12.0.6928, http://www.sourcemod.net/)
nextmap.smx: Nextmap by AlliedModders LLC: Provides nextmap and sm_nextmap (1.12.0.6928, http://www.sourcemod.net/)
get5.smx: Get5 by splewis, nickdnk & PhlexPlexico:  (0.14.7, https://github.com/splewis/get5)
admin-flatfile.smx: Admin File Reader by AlliedModders LLC: Reads admin files (1.12.0.6928, http://www.sourcemod.net/)
clientprefs.smx: Client Preferences by AlliedModders LLC: Client preferences and settings menu (1.12.0.6928, http://www.sourcemod.net/)
reservedslots.smx: Reserved Slots by AlliedModders LLC: Provides basic reserved slots (1.12.0.6928, http://www.sourcemod.net/)
basevotes.smx: Basic Votes by AlliedModders LLC: Basic Vote Commands (1.12.0.6928, http://www.sourcemod.net/)
funvotes.smx: Fun Votes by AlliedModders LLC: Fun Vote Commands (1.12.0.6928, http://www.sourcemod.net/)
basebans.smx: Basic Ban Commands by AlliedModders LLC: Basic Banning Commands (1.12.0.6928, http://www.sourcemod.net/)
nickdnk commented 1 year ago

You are not supposed to put fake map names in the map list. Clearly this is causing a problem as the console prints "Changing map to de_DONOTPICKBAN..." which is never going to work.

Please elaborate on why you cannot achieve what you want without the use of dummy maps. I don't understand it from your explanation. If you want to play 5 maps from a pool of 9, just set num_maps: 5 and provide 9 maps with 4 pick options and 4 ban options. Last map standing will be played. Why doesn't this work for you?

deLuXe83 commented 1 year ago

Hi, get5 is working with "donotpickban" :) I tested it already multiple times and the "mapchange-error" appeared on different maps that were not the fakename (eg. above log file is only a example => de_abbey).... (for what i saw, the script works with the command "host_workshop_map xxx" (with extracting the matp id (xxx) from the map list) => therfor the mapname should be irrelevant...??)

yes, i know it would work the way you described... BUT :) we are playing kind of league (game day every friday, sometimes 4v4, 5v5 or even 6v6). depending on nr. of players we use different fixed map pools of 8 (!) maps. the 9th map every week is a changing new map that should be played certainly and not banned. To make this sure and not have one of the (weekly variable) captains accidentally pick/ban this 9th map, I renamed it :) And... as said... it worked... just randomly (?) not :D

nickdnk commented 1 year ago

I need a reproducible case in order to investigate this, unfortunately. If you see Changing map to ... and nothing happens, it's probably due to one of:

  1. The map fails to download from the workshop. You can set sv_broadcast_ugc_downloads 1 and sv_broadcast_ugc_download_progress_interval 1 to monitor download progress in the chat in-game.
  2. No players are on the server and it is hibernating, which pauses the timer that counts down to a map change. I recommend you set sv_hibernate_when_empty 0 in your server.cfg.
deLuXe83 commented 1 year ago

hmmm...

reg. 1: i will add those variables, but all the workshop maps are preloaded on the server (as we play them every week)

reg. 2: should not be the case, because we are in the middle of a matchday :)

but reg. 2: We are facing the issue that mapchange is lasting unnormally long. on the final screen the clock on the upper right side which indicates the time to next map is something arounx >2min.... although I put in my cfg: mp_match_restart_delay 10. as you can see in the debug file, tv_delay = 105... maybe this is causing an issue? But frankly speaking, I can not recall where I changed this... because it is not set in my get5_live_cfg = get5/competitive.cfg ...

nickdnk commented 1 year ago

The restart delay is automatically extended to allow the GOTV broadcast to complete. And then 15 seconds are added to that. So with a tv_delay of 105 you'll have 120 seconds before the map changes. This is intended. You do not need to set restart delay anywhere yourself unless you want it to be longer than the minimum required. See https://splewis.github.io/get5/latest/gotv/. If you want to avoid this, you must disable GOTV or use a shorter tv_delay.

I think the server will re-download the maps or check if they're up to date on workshop, so that may be why it only happens sometimes. As long as you see "Changing map to..." and no errors, it's likely not Get5's fault.

Workshop support is constrained by the fact that there is no way for Get5 to determine if the map downloaded successfully or not, so we can't fix this.

deLuXe83 commented 1 year ago

okay! thanks for your explanation! I will keep on observating this issue...