nickj609 / GameModeManager

A Counter-Strike 2 server plugin to help administrators manage custom game modes, settings, and map rotations.
MIT License
33 stars 2 forks source link

[Bug/Feature] Single map group compatibility issues #14

Closed Geant200 closed 1 month ago

Geant200 commented 1 month ago

Hello, I have completed the plugin configuration files. I can clearly see the map in the menu when I type the !maps command but when I validate the map which comes from the Workshop, it does not launch?.

Workshop map Assembly https://steamcommunity.com/sharedfiles/filedetails/?id=3071005299

Plugin liste. counterstrikesharp metamod CS2-CustomVotes CS2-SimpleAdmin CS2-Tags GameModeManager Map_Configs_Prefix RockTheVote

Maps Liste maplist.txt csgo\addons/counterstrikesharp/plugins/RockTheVote/maplist.txt

//Put your map list here
de_thera:3121217565
assembly:1703278880
de_vertigo
cs_italy
de_inferno
cs_office
de_mirage
de_ancient
de_nuke
de_anubis
de_overpass
de_dust2

Configuration GameModeManager csgo\addons\counterstrikesharp\configs\plugins\GameModeManager

// This configuration was automatically generated by CounterStrikeSharp for plugin 'GameModeManager', at 2024/06/15 09:50:05
{
  "Version": 3,
  "RTV": {
    "Enabled": false,
    "Plugin": "addons/counterstrikesharp/plugins/RockTheVote/RockTheVote.dll",
    "MapListFile": "addons/counterstrikesharp/plugins/RockTheVote/maplist.txt",
    "DefaultMapFormat": false
  },
  "MapGroup": {
    "Delay": 2,
    "Default": "mg_10Mans",
    "DefaultMap": "de_dust2",
    "Style": "center",
    "File": "gamemodes_server.txt"
  },
  "Settings": {
    "Enabled": true,
    "Folder": "settings",
    "Style": "center"
  },
  "GameMode": {
    "Rotation": true,
    "Interval": 4,
    "Delay": 2,
    "Style": "center",
    "ListEnabled": true,
    "List": {
      "comp": "Competitive",
      "1v1": "1 vs 1",
      "aim": "Aim",
      "awp": "AWP Only",
      "scoutzknivez": "ScoutzKnives",
      "wingman": "Wingman",
      "gungame": "Gun Game",
      "surf": "Surf",
      "dm": "Deathmatch",
      "dm-multicfg": "Deathmatch Multicfg",
      "course": "Course",
      "hns": "Hide N Seek",
      "kz": "Kreedz",
      "minigames": "Mini Games"
    }
  },
  "Votes": {
    "Enabled": true,
    "Map": true,
    "GameMode": false,
    "GameSetting": false,
    "Style": "center"
  },
  "ConfigVersion": 3
}

CS2-SimpleAdmin \csgo\addons\counterstrikesharp\configs\plugins\CS2-SimpleAdmin

// This configuration was automatically generated by CounterStrikeSharp for plugin 'CS2-SimpleAdmin', at 2024/06/17 03:55:17
{
  "ConfigVersion": 15,
  "DatabaseHost": "localhost",
  "DatabasePort": 3306,
  "DatabaseUser": "cs********n",
  "DatabasePassword": "Aj*******c",
  "DatabaseName": "cs********n",
  "EnableMetrics": true,
  "EnableUpdateCheck": true,
  "ReloadAdminsEveryMapChange": false,
  "UseChatMenu": false,
  "KickTime": 5,
  "DisableDangerousCommands": true,
  "BanType": 1,
  "TimeMode": 1,
  "MaxBanDuration": 10080,
  "MultiServerMode": true,
  "ExpireOldIpBans": 0,
  "TeamSwitchType": 1,
  "Discord": {
    "DiscordLogWebhook": "",
    "DiscordPenaltyWebhook": ""
  },
  "DefaultMaps": [
                "de_dust2",
                "cs_italy",
                "cs_office",
                "de_ancient",
                "de_anubis",
                "de_inferno",
                "de_mirage",
                "de_nuke",
                "de_overpass",
                "de_vertigo"
                 ],
  "WorkshopMaps": ["assembly"],
  "CustomServerCommands": [],
  "MenuConfig": {
    "Durations": [
      {
        "name": "1 minute",
        "duration": 1
      },
      {
        "name": "5 minutes",
        "duration": 5
      },
      {
        "name": "15 minutes",
        "duration": 15
      },
      {
        "name": "1 hour",
        "duration": 60
      },
      {
        "name": "1 day",
        "duration": 1440
      },
      {
        "name": "7 days",
        "duration": 10080
      },
      {
        "name": "14 days",
        "duration": 20160
      },
      {
        "name": "30 days",
        "duration": 43200
      },
      {
        "name": "Permanent",
        "duration": 0
      }
    ],
    "BanReasons": [
      "Hacking",
      "Voice Abuse",
      "Chat Abuse",
      "Admin disrespect",
      "Other"
    ],
    "KickReasons": [
      "Voice Abuse",
      "Chat Abuse",
      "Admin disrespect",
      "Other"
    ],
    "MuteReasons": [
      "Advertising",
      "Spamming",
      "Spectator camera abuse",
      "Hate",
      "Admin disrespect",
      "Other"
    ],
    "AdminFlags": [
      {
        "name": "Generic",
        "flag": "@css/generic"
      },
      {
        "name": "Chat",
        "flag": "@css/chat"
      },
      {
        "name": "Change Map",
        "flag": "@css/changemap"
      },
      {
        "name": "Slay",
        "flag": "@css/slay"
      },
      {
        "name": "Kick",
        "flag": "@css/kick"
      },
      {
        "name": "Ban",
        "flag": "@css/ban"
      },
      {
        "name": "Perm Ban",
        "flag": "@css/permban"
      },
      {
        "name": "Unban",
        "flag": "@css/unban"
      },
      {
        "name": "Show IP",
        "flag": "@css/showip"
      },
      {
        "name": "Cvar",
        "flag": "@css/cvar"
      },
      {
        "name": "Rcon",
        "flag": "@css/rcon"
      },
      {
        "name": "Root (all flags)",
        "flag": "@css/root"
      }
    ]
  }
}

RockTheVote \csgo\addons\counterstrikesharp\configs\plugins\RockTheVote

// This configuration was automatically generated by CounterStrikeSharp for plugin 'RockTheVote', at 2024/04/05 02:16:26
{
  "Version": 9,
  "Rtv": {
    "Enabled": true,
    "EnabledInWarmup": true,
    "NominationEnabled": true,
    "MinPlayers": 0,
    "MinRounds": 0,
    "ChangeMapImmediatly": false,
    "HideHudAfterVote": true,
    "MapsToShow": 6,
    "VoteDuration": 30,
    "VotePercentage": 60,
    "HudMenu": true
  },
  "Votemap": {
    "Enabled": true,
    "VotePercentage": 60,
    "ChangeMapImmediatly": false,
    "EnabledInWarmup": true,
    "MinPlayers": 0,
    "MinRounds": 0,
    "HudMenu": false
  },
  "EndOfMapVote": {
    "Enabled": true,
    "MapsToShow": 6,
    "HudMenu": true,
    "ChangeMapImmediatly": false,
    "VoteDuration": 30,
    "HideHudAfterVote": true,
    "TriggerSecondsBeforeEnd": 120,
    "TriggerRoundsBeforEnd": 2,
    "DelayToChangeInTheEnd": 6
  },
  "Timeleft": {
    "ShowToAll": false
  },
  "Nextmap": {
    "ShowToAll": false
  },
  "MapsInCoolDown": 0
}

Can you help me? I thank you in advance.

nickj609 commented 1 month ago

Hey @Geant200 , apologies on the delay in getting back to you, as I was out of town yesterday. Does this issue seem to only occur for the workshop map provided or do all workshop maps appear to be impacted? Also, does the issue only occur with the menu or does the following command work to change the map:

!map assembly 1703278880

This will help me understand if the issue is with how my ChangeMap function is behaving or if its an issue with the way the map is being parsed. Additionally, it may help if you could provide any logs from the csgo/counterstrikesharp/logs folder during the time the issue is reproduced. The files will be prefixed with GameModeManager.

Last thing, if this is a parsing issue, I would want to confirm that these workshop maps are defined in your gamemodes_server.txt file and associated with a specific map group. If so, I would want to see a snippet of where it is defined so that I can verify that file is formatted "properly".

Happy to assist with the collection of this data if needed as well. My discord is striker.nick

Geant200 commented 1 month ago

Good morning.

Thank you for taking your time to help me ^^.

So for the configuration of my gamemodes_server.txt file it's good.

But I have problems with the RockTheVote plugin when I activate the RTV option I can no longer open the following management menu (!admin! css_admin !maps).

When I activate this option no more menu. GameModeManager.json file

  "RTV": {
    "Enabled": false,
    "Plugin": "addons/counterstrikesharp/plugins/RockTheVote/RockTheVote.dll",
    "MapListFile": "addons/counterstrikesharp/plugins/RockTheVote/maplist.txt",
    "DefaultMapFormat": false
  },

Another thing when I have the voting option activated I am not all the workshop cards in the listing when the players have to make the choice for the next card.

GameModeManager.json file

  },
  "MapGroup": {
    "Delay": 2,
    "Default": "mg_perso",
    "DefaultMap": "de_dust2",
    "Style": "center",
    "File": "gamemodes_server.txt"
  },
  },
  "Votes": {
    "Enabled": true,
    "Map": true,
    "GameMode": false,
    "GameSetting": false,
    "Style": "center"
  },

My cycle maps work well thanks to the gamemodes_server.txt file. My group mg_perso

        "mg_perso"
        {
            "name"                  "mg_perso"
            "maps"
            {
                "ar_shoots"     ""
                "ar_baggage"    ""
                "cs_office"     ""
                "cs_italy"      ""
                "de_ancient"    ""
                "de_anubis"     ""
                "de_dust2"      ""
                "de_inferno"    ""
                "de_mirage"     ""
                "de_nuke"       ""
                "de_vertigo"    ""
                "workshop/3140763900/1v1_hospital"                      ""
                "workshop/3082113929/aim_ag_texture_city_advanced"      ""
                "workshop/3070348309/aim_theorem"                       ""
                "workshop/3074961197/aim_ag_texture2"                   ""
                "workshop/3095778105/aim_ag_texture_jungle"             ""
                "workshop/3082605693/1v1aim_map_longdustversion_d"      ""
                "workshop/3070253400/aim_redline_fp"                    ""
                "workshop/3090340064/aim_ancient"                       ""
                "workshop/3177201515/aim_anubis"                        ""
                "workshop/3165438553/aim_deaglepark"                    ""
                "workshop/3171874934/aim_inspire"                       ""
                "workshop/3222291463/aim_map_classic"                   ""
                "workshop/3070260370/aim_map_s2r"                       ""
                "workshop/3163827658/aim_refrag"                        ""
                "workshop/3157627939/aim_valerastan"                    ""
                "workshop/3222291463/aim_map"                           ""
                "workshop/3242420753/am_anubis_p"                       ""
                "workshop/3262582924/am_duels_mirage"                   ""
                "workshop/3179186642/am_garden"                         ""
                "workshop/3197575080/am_minecraft_pierdolnik"           ""
                "workshop/3180965466/am_zen"                            ""
                "workshop/3070291913/ar_churches_s2r"                   ""
                "workshop/3070553020/ar_dizzy"                          ""
                "workshop/3146122036/freebet_aim_map"                   ""
                "workshop/3104677430/as_oilrig"                         ""
                "workshop/3142070597/awp_bhop_rocket"                   ""
                "workshop/3081154235/awp_creek"                         ""
                "workshop/3166593524/awp_japan_neon_cs"                 ""
                "workshop/3088944650/awp_lego_2_winter"                 ""
                "workshop/3109027085/awp_minecraft"                     ""
                "workshop/3077596014/bhop_1derland"                     ""
                "workshop/3088973190/bhop_arcturus"                     ""
                "workshop/3077211069/bhop_at_night"                     ""
                "workshop/3082038560/bhop_cherryblossom"                ""
                "workshop/3118806244/bhop_dunedash"                     ""
                "workshop/3103286752/bhop_internetclub"                 ""
                "workshop/3095219437/bhop_kiwi_cwfx"                    ""
                "workshop/3079959870/bhop_omnitopia"                    ""
                "workshop/3077153735/bhop_ragnarok"                     ""
                "workshop/3247326328/bhop_vaporwave"                    ""
                "workshop/3078523849/bhop_whiteshit"                    ""
                "workshop/3077475505/bhop_zunron"                       ""
                "workshop/3215705579/cs_assult_classic"           ""
                "workshop/3070594412/cs_assault"                  ""
                "workshop/3112806723/cs_facingworlds-99"          ""
                "workshop/3089953774/cs_militia"                  ""
                "workshop/3212419403/cs_italy_classic"            ""
                "workshop/3144773563/cs_militia_classic"          ""
                "workshop/3216844784/cs_office_classic"           ""
                "workshop/3076483842/cr_devisland_p1_v1"          ""
                "workshop/3070896876/cr_minecraft_jb_v2"          ""
                "workshop/3071890065/cs2_bloodstrike"             ""
                "workshop/3072640420/daymare"                     ""
                "workshop/3121217565/de_thera"                    ""
                "workshop/3070212801/de_cbble"                    ""
                "workshop/3070244931/de_cache"                    ""
                "workshop/3073892687/de_season_d_prefab"          ""
                "workshop/3070550406/de_safehouse"                ""
                "workshop/3219506727/de_lake"                     ""
                "workshop/3070581293/de_bank"                     ""
                "workshop/3070612859/de_shortdust"                ""
                "workshop/3071005299/de_assembly"                 ""
                "workshop/3079872050/de_pipeline"                 ""
                "workshop/3075706807/de_biome"                    ""
                "workshop/3070766070/de_mutiny"                   ""
                "workshop/3108513658/de_akiba"                    ""
                "workshop/3070960099/de_aztec"                    ""
                "workshop/3072352643/de_ruins_d_prefab"           ""
                "workshop/3213800338/de_aztec_classic"            ""
                "workshop/3078095785/de_dust_classic"             ""
                "workshop/3070363499/de_dust2_classic"            ""
                "workshop/3172269001/de_inferno_classic"          ""
                "workshop/3205793205/de_nuke_classic"             ""
                "workshop/3245245780/de_nuke_silly"               ""
                "workshop/3161693626/de_rats_1337_v2"             ""
                "workshop/3071818846/de_rats_kitchoon"            ""
                "workshop/3077457651/de_survivor"                 ""
                "workshop/3217247541/de_survivor_classic_m"       ""
                "workshop/3164611860/deathrun_playground"         ""
                "workshop/3083325292/deathrun_iceworld_cs2"       ""
                "workshop/3238565662/field"                       ""
                "workshop/3088183343/fun_bounce"                  ""
                "workshop/3070923343/fy_pool_day"                 ""
                "workshop/3070238628/fy_iceworld"                 ""
                "workshop/3084930277/fy_snow_y0"                  ""
                "workshop/3085490518/gd_rialto"                   ""
                "workshop/3109232789/gg_simpsons_vs_flanders_v2"  ""
                "workshop/3255907412/guardian"                          ""
                "workshop/3071094345/hs_lake"                           ""
                "workshop/3097563690/infernohideandseek"                ""
                "workshop/3070198374/ka_soccer_2009"                    ""
                "workshop/3070194623/kz_checkmate"                      ""
                "workshop/3072744536/kz_ggsh"                           ""
                "workshop/3121168339/kz_grotto"                         ""
                "workshop/3070220367/kz_hub"                            ""
                "workshop/3102712799/kz_igneous"                        ""
                "workshop/3072699538/kz_ltt"                            ""
                "workshop/3077122656/kz_nomibo"                         ""
                "workshop/3072219045/kz_rc_stonehenge"                  ""
                "workshop/3083509404/kz_rc_twotowers"                   ""
                "workshop/3078311932/kz_simplyhard"                     ""
                "workshop/3076000218/kz_sxb2_biewan"                    ""
                "workshop/3083714192/kz_sxb2_cxz"                       ""
                "workshop/3086304337/kz_victoria"                       ""
                "workshop/3186779271/minecraft"                         ""
                "workshop/3099519038/minimirage_cs2port"                ""
                "workshop/3078140567/mini_train"                        ""
                "workshop/3070541369/minus_denhet"                      ""
                "workshop/3082120895/mg_skeet_multigames_v7"            ""
                "workshop/3076765511/mg_warmcup_headshot"               ""
                "workshop/3097973183/mg_lego_minigames"                 ""
                "workshop/3188024686/mg_legospace_multigames"           ""
                "workshop/3111582979/mg_multigames_devine_is_french"    ""
                "workshop/3156615586/mg_wl_multigames"                  ""
                "workshop/3101960156/mg_swag_multigames_v7_1"           ""
                "workshop/3242033080/mg_pudding_multigames_cs2"         ""
                "workshop/3106085501/mg_saw_v64_cs2"                    ""
                "workshop/3070439729/mg_switch_course_v2"               ""
                "workshop/3070463151/mg_metro_course_v1"                ""
                "workshop/3070455802/mg_alley_course_v2"                ""
                "workshop/3070445185/mg_glave_course_v2"                ""
                "workshop/3070459211/mg_office_course_v3"               ""
                "workshop/3070464208/mg_metal_course_v2"                ""
                "workshop/3070463620/mg_acrophobia_run_v2"              ""
                "workshop/3071040020/mg_metro_course_s2"                ""
                "workshop/3070434475/mg_circle_course_v3"               ""
                "workshop/3070447697/mg_simpsons_course_v2"             ""
                "workshop/3070452642/mg_sonic_course_v2"                ""
                "workshop/3070451616/mg_sky_realm_v3"                   ""
                "workshop/3070346180/mp_raid"                           ""
                "workshop/3093088534/nuketown"                          ""
                "workshop/3074758439/only_up"                           ""
                "workshop/3073929825/scoutzknivez_pure_cs2"             ""
                "workshop/3074479691/seek_town_bs"                      ""
                "workshop/3086555291/shipment_version_1_0"              ""
                "workshop/3088413071/surf_ace"                          ""
                "workshop/3165517928/surf_astra"                        ""
                "workshop/3255589335/surf_aquaflow"                     ""
                "workshop/3070321829/surf_beginner"                     ""
                "workshop/3098972556/surf_benevolent"                   ""
                "workshop/3133346713/surf_boreas"                       ""
                "workshop/3080544577/surf_deathstar"                    ""
                "workshop/3255525511/surf_inui"                         ""
                "workshop/3076153623/surf_kitsune"                      ""
                "workshop/3125360522/surf_mesa_aether"                  ""
                "workshop/3076980482/surf_mesa_revo"                    ""
                "workshop/3129698096/surf_nyx"                          ""
                "workshop/3082548297/surf_rookie"                       ""
                "workshop/3073875025/surf_utopia_njv"                   ""
                "workshop/3070951079/winterday_bs"                      ""
            }
        }

Before I used the SourceMode and ManiAdminPlugin and EventScripts plugins to manage my Counter Strike Source game servers, now the management of plugins is less pleasant to manage and configure on Counter Strike 2, a shame that this plugin is no longer functional.

But thank you for giving us an alternative solution to manage the servers ^^.

nickj609 commented 1 month ago

Hey @Geant200, thank you for providing this information. At the moment, I am not quite sure what might be causing issues with SimpleAdmin, but I would like to first address some of the other issues to see if they play a role in this.

First, you will need a map group for each game mode in your gamemodes_server.txt rather than just using mg_perso. This is so that the correct maps are populated into the map menus for each game mode. For some context, when a game mode is launched, it will try to launch the game mode based on the configuration.

For example, in the Game Mode List, you have an entry like so:

  "comp": "Competitive",

This will display the friendly name 'Competitive', but will run exec comp.cfg (if present in csgo/cfg) when selected from the menu.

comp.cfg should have the following server command to update the map group:

css_mapgroup mg_comp

It will then update all the map lists and map menus with the maps associated with that map group and will update the Maplist.txt with just the maps from that current map group.

I think once this is configured, you will no longer experience this behavior. Please let me know how it goes!

Geant200 commented 1 month ago

Thanks for the info but if I use the group. "comp": "Competitive",

If I leave the server in Competitive mode it will remain in gaming mode. I want it to be automatic when the server switches to a map intended for a certain game mode, for example if the map cycle arrives on a Surf or Awp map that the correct game mode is activated automatically and that an admin is not No need to change the game mode manually.

nickj609 commented 1 month ago

Hey @Geant200, if an RTV plugin is being used, it should handle map rotations such that the map will change to a map within the current map group/game mode. Unfortunately, mapgroups/game modes will not change in that scenario unless a user joins the server and votes for it (if voting for game modes is enabled) or an admin changes the game mode.

If RTV is disabled, map rotations will occur as expected and every x map change (based on the config) it will change the game mode. Unfortunately, you cannot use both at the current time.

Geant200 commented 1 month ago

With the help of the Map Configurator plugin we can tell it to execute .CFG files but I know if it is compatible with the Workshop maps?. https://github.com/ManifestManah/MapConfigurator

nickj609 commented 1 month ago

@Geant200 , you are right and yes it does support Workshop maps. Technically speaking, a single map group should still display maps properly, but the !currentmode command will display incorrectly because it uses the map group name. However, I already have ideas of fixing this.

I wonder if its the shear size of maps that you have. Would you be able to provide a copy of the logs? I can also see if I can recreate this on my end as well.

Either way, now that you brought this configuration to my attention, I will work to make this plugin even more compatible with the use of a single map group, rather than just the original intention of having a mapgroup per game mode, which was really just done to simplfy things during the initial plugin creation phase.

Geant200 commented 1 month ago

If we can make the system easier that would be great ^^. Here are the logs it would be possible for you to create a menu display system like the old plugin Mani Admin Plugin I find that the display of menus with the selections of options!1!2!3 to validate a wrong choice always open the chat make our choice validate and restart the procedure I find it too long with the old plugin mani admin plugin it was simpler to use and configure would it be possible for you to make it compatible with counterstrikesharp?.

log-all20240620.txt log-cssharp20240620.txt log-GameModeManager20240620.txt

nickj609 commented 1 month ago

@Geant200 , I almost have a new version completed with better compatibility for single map groups. Regarding your specific issue, it seems like it may be related to the number of maps in the map group:

2024-06-20 15:40:21.161 +02:00 [WARN] (cssharp:Core) Display should not be longer than 26 characters for a CenterHtmlMenu item

Would you be able to change MapGroup.Style to Chat instead of Center to see if that yields the same behavior?

"MapGroup": { "Delay": 2, "Default": "mg_10Mans", "DefaultMap": "de_dust2", "Style": "chat", "File": "gamemodes_server.txt"

I am guessing that it will work and if so, it's a limitation with the CounterStrikeSharp library for CenterHTMLMenus and you will have to use the ChatMenu instead. Unfortunately, there aren't any other menu types at the moment, but I also too miss the old radio button menus. Hopefully they will bring them back soon!

Geant200 commented 1 month ago

The change for the MapGroup.Style variable is in the GameModeManager.json file?. And for ChatMenu is it the normal game chat or a plugin?

nickj609 commented 1 month ago

Yes, in the JSON file. It is normal game chat. I am cooking up a potential workaround in the event you want to continue to use the center html menu. I will let you know once it's ready and will post a pre-release for you to test.

Geant200 commented 1 month ago

if I understood correctly in the GameModeManager.json file I mify as follows.

Before

  "MapGroup": {
    "Delay": 2,
    "Default": "mg_perso",
    "DefaultMap": "de_dust2",
    "Style": "center",
    "File": "gamemodes_server.txt"
  },

After

  },
  "MapGroup.Style": {
    "Delay": 2,
    "Default": "mg_perso",
    "DefaultMap": "de_dust2",
    "Style": "center",
    "File": "gamemodes_server.txt"
  },

??.

nickj609 commented 1 month ago

No, replace "center" with "chat" where it says:

"Style": "center",

Geant200 commented 1 month ago

I tested with the modification if I leave the modification the !maps menu no longer works and at the end of the game it offers me more voting choices it considers that the vote is null and applies a map to the hazards and when I !rtv I have the official maps but not the workshop one.

Geant200 commented 1 month ago

Hello, I am still doing my configuration tests. I'm doing some testing with GunGame mode and after a while of playing the server crashes and in the logs I have two blocks which give me information that I don't think I can resolve, can you give me a solution?.

2024-06-22 14:31:37.332 +02:00 [WARN] (cssharp:Core) Display should not be longer than 26 characters for a CenterHtmlMenu ```
item
2024-06-22 14:31:37.332 +02:00 [WARN] (cssharp:Core) Display should not be longer than 26 characters for a CenterHtmlMenu item
2024-06-22 14:31:37.332 +02:00 [WARN] (cssharp:Core) Display should not be longer than 26 characters for a CenterHtmlMenu item
2024-06-22 14:31:37.333 +02:00 [WARN] (cssharp:Core) Display should not be longer than 26 characters for a CenterHtmlMenu item
2024-06-22 14:31:37.333 +02:00 [WARN] (cssharp:Core) Display should not be longer than 26 characters for a CenterHtmlMenu item
2024-06-22 14:31:37.333 +02:00 [WARN] (cssharp:Core) Display should not be longer than 26 characters for a CenterHtmlMenu item

2024-06-22 14:32:03.466 +02:00 [EROR] plugin:CS2-SimpleAdmin (RELEASE) Unable to get server ip, Check that you have added the correct start parameter "-ip <ip>"

2024-06-22 14:35:01.103 +02:00 [EROR] (cssharp:AdminManager) Failed to load admin data
System.Text.Json.JsonException: The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
 ---> System.Text.Json.JsonReaderException: The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. LineNumber: 0 | BytePositionInLine: 0.
   at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
   at System.Text.Json.Utf8JsonReader.Read()
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   --- End of inner exception stack trace ---
   at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 utf8Json, JsonTypeInfo`1 jsonTypeInfo, Nullable`1 actualByteCount)
   at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 json, JsonTypeInfo`1 jsonTypeInfo)
   at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
   at CounterStrikeSharp.API.Modules.Admin.AdminManager.LoadAdminData(String adminDataPath) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Modules/Admin/AdminPermissions.cs:line 129

log-all20240622.txt on lines 523, 546, 551, 601

nickj609 commented 1 month ago

Hey @Geant200 , after further review and testing with your exact configuration, I was able to confirm that your map group has too many maps. There is a limit of 105 maps in a single menu and this is why you are having issues. Please reduce your map group(s) to under this ammount.

Additionally, I have added support for multiple map groups per game modes. Unforuntately, this is still confined by the above limitation, but you can add up to 105 maps total accross the map groups for a single game mode. This way, you could theoretically see all the maps available by switching the game mode just once or twice versus having to cycle through all game modes to identify their maps.

Unfortunately, this is the best solution I can offer at the moment. If a better solution comes around, I will surely implement it. I will be marking this issue as completed.

nickj609 commented 1 month ago

@Geant200 , just to add to this. There are now the following commands:

!allmaps

!showallmaps

These commands will display maps from all map groups, but you will have to select the game mode first. Therefore, if you split up your single map group into multiple map groups per game mode, you will still be able to access all of the maps as a player or an admin depending on your configuration.

I hope this helps! Keep a lookout for the latest release.

Geant200 commented 1 month ago

Thank you for your time for responding to my request.

But if I make several groups my cylce map will always be on the same map group and my server will never run on the other maps of the other groups automatically unless I manipulate the group change with a command to change each time I want to play a particular game mode.

Would it be possible to ensure that in the mapcycle.txt file or another configuration file that the server map cycle faces rotate the groups of maps instead of the maps like that would be the same as a maps cycle but with groups that follow.

I can ask you why a limit of 105 maps per group?

I remember when I was configuring servers in CSS with the Metamod SourceMode Eventscript ManiAdminPlugin plugin I could place more cards it would be possible for you to use the same principle sorry I am not developed to the point of being able to create a plugin ^^.

Thank you in advance ^^.

nickj609 commented 1 month ago

@Geant200 , the limitation derives from the CounterStrikeSharp library so there is not too much I can do about it without diving into a custom solution. Regarding your question about map cycles, you are correct in stating that the map cycle will still only cycle maps within the current game mode, especially if using RTV.

If you disable RTV, users can still create per-map votes or game mode votes, but the map rotation will also change the game mode every x map changes/rotations depending on what you set in the JSON configuration file. This sounds like it may suite your needs, but please let me know otherwise.

We could potentially add all maps to the RTV map list, but that may result in the same error message regarding the menu limit, which is why many RTV plugins limit the ammount of maps in the RTV list and pick them at random.

If that is the desired behavior (with a limited but random number of maps for RTV), then I can surely build something into the plugin to allow adding all maps to the RTV map list, if desired.

Geant200 commented 1 month ago

My idea of ​​making a Group maps cycle like a Maps cycle to ensure that the group of maps rotates would be good? like this all the maps of each group would rotate without overloading the group of maps.

An example in my Cycle Group I would have 5 groups of 20 maps and the configuration file which would be called for example groupecycle.txt which would rotate the groups of maps as if it were a cycle of maps with this method all the maps forays run normally without the intervention of an admin it is possible for you to modify the plugin in this way I do not know coding to create this method ^^.

I don't know if this is crazy or a good idea? ^^.

nickj609 commented 1 month ago

@Geant200 , I think that is actually a really good idea and is definitely feasible. Let me see what I can do :)

Geant200 commented 1 month ago

Many thanks in advance for your support ^^.

nickj609 commented 1 month ago

@Geant200 , I made a commit that should allow the use of game mode schedules. In the config, you can specify a time that you want to schedule a mode change and then specify the mode. If the mode has multiple map groups, then it will rotate through the maps for that game mode.

I haven't made a release yet and will be testing it out in the coming days, but thought I would share the update.

Geant200 commented 1 month ago

Thanks again for the work, let me know when it's available ^^.

nickj609 commented 1 month ago

@Geant200 you are very welcome! I am going on vacation soon so if I don't get to it before this Saturday you should see an update early July.

Also, thanks for providing your feedback, it's been really helpful!

Geant200 commented 1 month ago

I thank you if the community can help ^^.

And have a good holiday ^^.

Geant200 commented 1 month ago

I'm not sure if I was really understandable in my example, I created a diagram ^^. exemple group cycle

nickj609 commented 1 month ago

@Geant200, I get what you mean. I added a new command called Map Cycle that can be set to 0, 1 or 2

0 = The plugin will rotate maps based on the maps from the current mode 1 = The plugin will rotate maps based on the maps from all modes 2 = The plugin will rotate maps based on maps from specific map groups.(conigurable)

This rotation requires RTV to not be in use. Additionally, you can also enable Game Mode rotations to rotate the mode every X map changes. Lastly, I have the mode schedules as I mentioned previously, where you can schedule the mode to be changed at specific times of the day.

I believe all these different options should suffice, please let me know otherwise. A release may come by the end of the week.

Geant200 commented 1 month ago

Thank you again for making this modification when it is available I will test it directly ^^.

nickj609 commented 4 weeks ago

@Geant200, a new release has been made! Let me know if you have any questions :)

Geant200 commented 4 weeks ago

A big thank you, I will test this new version and I will give you some news ^^.