Description
----------------------------------------------------
Next Map Mode is a plugin that allows you to
define modes for specific maps. It will automatically
change game type and mode appropriately.
Once map names are placed in cfg/maplist_demolition.txt,
for instance, those maps will load in Demolition mode
by default.
Commands and Cvars
---------------------------------------------------- Commands sm_nmm <mode> - (ADMFLAG_CHANGEMAP) Set the mode for the next map. This overrides any other settings and convars. Acceptable arguments for <mode>: (0, 1, 2, 3, 4, Casual, Competitive, [ArmsRace, Arms_Race, Arms Race], Demolition, [Deathmatch, Death_Match, Death Match]). (Command override: sm_nmm)
Cvars sm_nmm_version "1.4.0" - Plugin version. sm_nmm_enable "1" - Enable or disable plugin (1 - enable, 0 - disable). sm_nmm_defaultmode "0" - What mode should be used if the next map mode is not specified (0-Casual, 1-Competitive, 2-Arms Race, 3-Demolition, 4-Deathmatch). sm_nmm_random "0" -Randomize the next map mode (1 - randomize, 0 - don't randomize).
sm_nmm_maplist_casual "cfg/maplist_casual.txt" - Text file list of casual maps. sm_nmm_maplist_competitive "cfg/maplist_competitive.txt" - Text file list of competitive maps. sm_nmm_maplist_armsrace "cfg/maplist_armsrace.txt" - Text file list of arms race maps. sm_nmm_maplist_demolition "cfg/maplist_demolition.txt" - Text file list of demolition maps. sm_nmm_maplist_deathmatch "cfg/maplist_deathmatch.txt" - Text file list of deathmatch maps.
sm_nmm_mapcycle_casual "" - Mapcyclefile for casual mode (Leave blank for no change) sm_nmm_mapcycle_competitive "" - Mapcyclefile for competitive mode (Leave blank for no change) sm_nmm_mapcycle_armsrace "" - Mapcyclefile for arms race mode (Leave blank for no change) sm_nmm_mapcycle_demolition "" - Mapcyclefile for demolition mode (Leave blank for no change) sm_nmm_mapcycle_deathmatch "" - Mapcyclefile for deathmatch mode (Leave blank for no change)
Requirements
----------------------------------------------------
Counter-Strike: Global Offensive
SourceMod 1.5.0+
Installation
----------------------------------------------------
Place nextmapmode.smx in the /csgo/addons/sourcemod/plugins directory.
Change settings in csgo/cfg/sourcemod/nextmapmode.cfg.
Add maps to the maplist files according to what you want their default mode to be.
1.1.1 (16 September 2012)
-Better handling of manual map changes.
-Bug fix: Previously, plugin looked at sm_nextmap cvar to determine the next map mode, even for manual map changes.
-Fixed incorrect chat strings ("Arms Race" and "Demolition" were incorrectly labeled as Classic)
1.1.1b (24 September 2012)
-Bug fix: Previously, attempting to switch to an invalid map caused problems with the plugin (thanks to Teki).
1.1.2 (26 September 2012)
-Bug fix: Plugin now sets mode appropriately for servers waking up from hibernation.
1.2.0 (28 September 2012)
-Complete code overhaul.
-Cvars and their parameters have changed.
-Bug fix: Previously, the plugin would incorrectly identify the mode for maps with identical partial names (for instance, de_dust, de_dust2, and de_dust2_se), if they had different mode settings.
-The plugin now changes mode on game intermission instead of on map end. As a result:
-Bug fix: Loading screens now always show the correct mode for the upcoming map.
-Bug fix: Maps no longer need to be present in mapcycle.txt for the plugin to work (they just need to be on the server)
1.2.2 (29 September 2012)
-Bug fix: Setting the next map mode manually now works properly.
-Plugin version made public.
-Bug fix: Scoreboard now displays correctly at the end of the map (thanks to Teki).
1.3.0 (2 November 2012)
-Added random mode support with sm_nmm_random cvar.
-Admin command sm_nmm <mode> now supports strings as arguments ("Casual", "Competitive", "Arms Race", "Demolition")
-Plugin now execs nextmapmode.cfg in /cfg/sourcemod.
-Support for whitespace before and after commas in the maplists config.
1.4.0 (2 Feburary 2013)
-Bug fix: Plugin now looks at mp_match_restart_delay instead of erroneously looking at mp_halftime_delay.
-Map lists are now extracted from text files instead of from convars. You can now define an unlimited number of maps for each mode.
-Added support for Deathmatch mode.
-Added MapCycleFile convars to allow for dynamic map cycles when changing modes.
-Added admin/donor overrides for sm_nmm command.
Command Overrides
---------------------------------------------------- sm_nmm - Admins with access to this command can use sm_nmm to change the mode for the next map. Note that this command will override the default maplist settings (i.e. if you've set ar_baggage to load in Arms Race mode, and you use "!nmm Casual" and switch to ar_baggage, the map will load in Casual mode).
You can use admin_groups.cfg or admin_overrides.cfg to change command permissions.
Example admin_overrides.cfg:
Code:
Overrides
{
"sm_nmm" "cdr"
}
In this example, only admins who have all three "c", "d", and "r" admin flags can set the next map mode with /nmm <mode>.
To Do
----------------------------------------------------
IMPORTANT: Your server will be UNJOINABLE if your gamemodes_server.txt has not been set up to accomodate all your maps for every mode. See an example of a proper configuration here: https://forums.alliedmods.net/showpo...01&postcount=3
Create files named "maplist_competitive.txt", "maplist_deathmatch.txt", etc. in your csgo/cfg/ directory, and place map names in them (in the same manner as mapcycle.txt). If a map name is in "maplist_armsrace.txt", for instance, then that map will load in Arms Race mode by default. If a map is not present in one of the maplists, then the default mode specified by sm_nmm_defaultmode will be used.
If you define custom MapCycleFiles, e.g. sm_nmm_mapcyclefile_competitive "cfg/mapcycle_competitive.txt", then mapcycle_competitive.txt will be used as the mapcycle (for purposes of map voting and map rotations) whenever you switch to competitive mode. Note that switching back to another mode will not reset the mapcyclefile to the regular mapcycle.txt, unless you define the convars for the other modes to do so.
Ok I have setup casual and competitive gamemodes. The server starts with casual but switches to competitive mode when we switch to that kind of map. Now lets say I log off after it switches game modes then try to log back into the game...It won't let me connect ..?
CONSOLE:
Received game details information from [IP]
GameTypes: could not find matching map [MAP]
[MM] Sending reservation request to [IP]
[MM] Sending reservation request to [IP]
autoexec.cfg:
Code:
// turn on logging first, to maximize what is logged
log 1
// game_type and game_mode together determine what is played.
// use game_type 0 and game_mode 0 for "Classic Casual"
// use game_type 0 and game_mode 1 for "Classic Competitive"
// use game_type 1 and game_mode 0 for "Arms race" (standard GunGame)
// use game_type 1 and game_mode 1 for "Demolition" (GunGame w/a bomb)
game_type 0
game_mode 0
// the map group determines what maps are run
// mapgroup mg_bomb
// mapgroup mg_hostage
// mapgroup mg_dust
// mapgroup mg_armsrace
// mapgroup mg_demolition
// mapgroup random_classic
mapgroup "mg_fun"
// this is the starting map
map "fy_legofire_v1"
// further settings can be changed in cfg/server.cfg and in gamemodes.txt.
nextmapmode.cfg:
Code:
// This file was auto-generated by SourceMod (v1.5.0-dev+3678)
// ConVars for plugin "nextmapmode.smx"
// Default Mode for undefined maps. 0-Casual, 1-Competitive, 2-Armsrace, 3-Demolition. Default: 0
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "3.000000"
sm_nmm_defaultmode "0"
// Enable (1) or Disable( 0) Next Map Mode. Default: 1
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_nmm_enable "1"
// List of Comma(,) delimited maps for armsrace games
// -
// Default: ""
sm_nmm_maps_armsrace ""
// List of Comma(,) delimited maps for casual games
// -
// Default: ""
sm_nmm_maps_casual "ka_madcage,aim_avianation,aim_deagle7k,fy_urbanstreets_b8,fy_xenom,fy_legofire_v1,aim_iraq,fy_pool_day_beta,fy_astra,fy_cottage_beta,he_tennis_go,ka_outside_aztec,de_westwood,aim_elite_training,fy_office_rest,fy_thomson_bridge"
// List of Comma(,) delimited maps for competitive games
// -
// Default: ""
sm_nmm_maps_competitive "cs_compound_gc,cs_italy,cs_office,cs_sauna_go,cs_storage,de_aurelia,de_aztec,de_belukha_b1a,de_cambodia_bx,de_cefalu_go_a23,de_dust,de_dust2,de_elysium,de_frost_csgo_final1,de_grnlight_b2,de_inferno,de_interrupt_b3,de_kismayo,de_nuke,de_train,de_vertigo,"
// List of Comma(,) delimited maps for demolition games
// -
// Default: ""
sm_nmm_maps_demolition ""
// Randomize the mode each map? Default: 0
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_nmm_random "0"
Ok I have setup casual and competitive gamemodes. The server starts with casual but switches to competitive mode when we switch to that kind of map. Now lets say I log off after it switches game modes then try to log back into the game...It won't let me connect ..?
I should put as a footnote that this plugin isn't very kind to server administrators, if your game modes haven't been properly set up =P
Your problem is caused by not having gamemodes_server.txt configured such that every game mode uses the same mapgroup, and all maps are in that single mapgroup. For instance, here is my gamemodes_server.txt:
Once you have gamemodes_server.txt up to par, you should be set. Note that if you need to change the game mode manually, use sm_nmm <mode>, then change the map.
Well you don't really need this plugin if you're using map-specific configs, you can just change game_type and game_mode in per-map.
But what exactly "doesn't work" about the plugin? Did you check that the plugin loaded ("sm plugins list" in console)? If it loaded, can you try "!nmm Casual" in chat and see if it switches the mode? Or is it an issue with the maps not changing to the correct mode when the map ends (and if so, can I see your nextmapmode.cfg)?