PhlexPlexico / get5-web

[END OF LIFE] Webpanel for servers using the get5 CS:GO server plugin
GNU General Public License v3.0
21 stars 10 forks source link

[Feature Request] Add Minimum players to Ready up Cvar #128

Closed TandelK closed 4 years ago

TandelK commented 5 years ago

As per match config file we can define how many minimum players require to start the match, with this addition on panel it can be easily manageable with 1 vs 1 and other modes also.

PhlexPlexico commented 5 years ago

Can you not just !forceready when the match is setup?

TandelK commented 5 years ago

Bascially everytime the Admins or Casters have to keep on telling all the Users in each and every Server to type that command

PhlexPlexico commented 5 years ago

Fair point, but this isn't in my use-case since I only deal with leagues that are 5v5. PRs are welcome, but I won't be working on this.

PhlexPlexico commented 4 years ago

Question about this - do you want it defined per-match, or would you want it defined on a global basis? If the latter, this should be easy enough to implement without touching the database, even.

TandelK commented 4 years ago

I think per Match should be better option.

PhlexPlexico commented 4 years ago

Merge request #179 should solve this now

PhlexPlexico commented 4 years ago

Confirmed working in testing yesterday.

TandelK commented 4 years ago

i did test today with 1vs1 and it was not working for me.

PhlexPlexico commented 4 years ago

Go to your match config, (append /config at the end of a match URL) and provide the output, please.

TandelK commented 4 years ago

{"cvars": {"get5_check_auths": "1", "get5_web_api_url": "http://panel.gg/"}, "min_players_to_ready": 1, "matchid": "3", "veto_first": "team1", "team2": {"players": {"76561198299881117": ""}, "flag": "IN", "tag": "EK", "name": "EvolutionKnights"}, "match_title": "Map {MAPNUMBER} of {MAXMAPS}", "maplist": ["aim_redline"], "min_spectators_to_ready": 0, "side_type": "standard", "maps_to_win": 1, "team1": {"players": {"76561198112911540": ""}, "flag": "IN", "tag": "TAN", "name": "TandelK"}, "spectators": {"players": ["76561198299881117"]}, "skip_veto": true}

Webpanel is hosted locally on LAN system and routed via hosts file properly.

PhlexPlexico commented 4 years ago

And does this config work if you just set it with get5 as a match template and load it through JSON with get5? It could be a get5 bug.

TandelK commented 4 years ago

i tried creating 1vs1.cfg and added maximum players per team as 1 instead of minimum players to ready up and it worked at that time. I think it requires maximum players per team to be the correct option instead of minimum players getting ready up.

"Match"
{
    "matchid"       "1"
    "num_maps"      "1" // Must be an odd number or 2. 1->Bo1, 2->Bo2, 3->Bo3, etc.

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

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

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

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

    "players_per_team"      "1"
    "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.

    "team1"
    {
        "name"      "EnvyUs" // 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"       "EnvyUs"  // Short tags replace the "clan tag" on the scoreboard. They are optional.
        "flag"      "FR"
        "logo"      "nv"
        "players"
        {
            // Any of the 3 formats (steam2, steam3, steam64 profile) are acceptable.
            // Note: the "players" section may be skipped if you set get5_check_auths to 0,
            // but that is not recommended. You can also set player names that will be forced here.
            // If you don't want to force player names, just use an empty quote "".
            "STEAM_0:1:52245092"        "splewis"
            "[U:1:104490185]"       ""
            "76561198064755913"     ""
            "STEAM_1:1:....."       ""
            "STEAM_1:1:....."       ""
        }
    }

    "team2"
    {
        "name"      "Fnatic"
        "tag"       "fnatic"
        "flag"      "SE"
        "logo"      "fntc"
        "players"
        {
            "STEAM_1:1:46796472"        ""
            "STEAM_1:0:78189799"        ""
            "STEAM_1:0:142982"      ""
            "STEAM_1:1:....."       ""
            "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"      "Match server #1"
        "get5_check_auths"      "0"
        "get5_demo_name_format"     "scrim_{TIME}_{MAPNAME}" // Set to "" to disable recording
        "get5_kick_when_no_match_loaded"        "0"
        "get5_print_damage"     "1" // Enabling will print damage on round-end.
        "get5_live_cfg" "get5/live_1v1.cfg"
    }
}
PhlexPlexico commented 4 years ago

That's what I was figuring. Didn't want to add it in, but I guess it may be required. I'll probably swap the text of "Min players to ready" and change to "Max player per team" on the match creation page, and call build_match_dict with both keys. Not sure why that's intended for get5 itself, but oh well I suppose. I'll change this during lunch.

PhlexPlexico commented 4 years ago

Okay, should be fixed in the dev branch now. Cheers!