This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Solved [TF2] How to see all maps on server?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 08-31-2020 , 14:07   [TF2] How to see all maps on server?
Reply With Quote #1

Team,

Any ideas on how to properly configure the /sourcemod/configs/maplist.cfg in a way that allows all Admins to see every map on the server when they use !admin, server, choose maps ? Note: I also use Ultimate Map Chooser.

The /tf/cfg/maplist.txt and the /tf/cfg/mapcycle.txt file contain a list of 435 maps maps in mapcycle format.

Interesting note: If I change the entry under "sm_map menu" from: "file" "maplist.txt" to: "file" "none" (or any made up name) Admins can successfully see and select all maps from the !admin/server/choose maps menu. However, I get this error in the logs:

PHP Code:
08/28/2020 16:20:52: [nextmap.smxFATALCannot load map cycleNextmap not loaded.
08/28/2020 16:20:52: [SMException reportedMapcycle Not Found
08/28/2020 16:20:52: [SMBlamingnextmap.smx
08/28/2020 16:20:52: [SMCall stack trace:
08/28/2020 16:20:52: [SM]   [0SetFailState
08/28/2020 16:20:52: [SM]   [1Line 143D:\builds\build-sourcemod-msvc12\windows-1.10\build\plugins\nextmap.sp::FindAndSetNextMap
08/28/2020 16:20:52: [SM]   [2Line 113D:\builds\build-sourcemod-msvc12\windows-1.10\build\plugins\nextmap.sp::OnConfigsExecuted 
Is there a way for Admins to see all maps without getting an error every map change?

content of maplists.cfg:
PHP Code:
/**
 * Use this file to configure map lists.
 *
 * Each section is a map list that plugins can use.  For example, the Admin Menu 
 * requests an "admin menu" map list, and you can control which maps appear via 
 * this file.
 *
 * Each section must have a property that explains where to read the maps from.
 * There are two properties:
 *
 *    target         - Redirect the request to another section.
 *    file             - Read a file of map names, in mapcycle.txt format.
 *
 * There is one section by default, called "mapcyclefile" - it is mapped to the 
 * mapcycle.txt file, or whatever the contents of your mapcyclefile cvar is.
 *
 * If a plugin requests a map list file which doesn't exist, or is empty, SourceMod 
 * tries the "default" section, and then the "mapcyclefile" section.
 */
"MapLists"
{
    
/**
     * Default requests go right to the mapcyclefile.
     */
    
"default"
    
{
        
"target"        "umc_mapcycle.txt"
    
}
    
    
/* Admin menu, map menu */
    
"sm_map menu"
    
{
        
"file"        "maplist.txt"
    
}
    
    
/* Admin menu, map voting menu */
    
"sm_votemap menu"
    
{
        
"file"            "default"
    
}
    
    
/* For the "randomcycle" plugin */
    
"randomcycle"
    
{
        
"target"        "default"
    
}
    
    
/* For the "mapchooser" plugin */
    
"mapchooser"
    
{
        
"target"        "default"
    
}
    
    
/* For the "nominations" plugin */
    
"nominations"
    
{
        
"target"        "default"
    
}

snippet from maplist.txt and mapcycle.txt (same content)
PHP Code:
cp_warpath
cp_warpath2
cp_well
cp_well_event_rc1
cp_well_event_rc4
cp_wetlands
cp_whiterock_rc2
cp_yukon_final
cp_zinkenite_b3a
cpm_blue_lagoon
ctf_2fort
ctf_2fort_engi_power
ctf_2fort_flooded
ctf_2fort_invasion
ctf_2fort_neocity
ctf_2fortified_v1
ctf_aerospace_b4
ctf_badlands_classicb5
ctf_chaos
ctf_convoy_v2
ctf_discover_b59
ctf_dock
ctf_doublecross 

Last edited by PC Gamer; 09-04-2020 at 02:56.
PC Gamer is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 08-31-2020 , 14:48   Re: [TF2] How to see all maps on server?
Reply With Quote #2

It depends plugins.

Like SourceMod Base Commands Map Menu
https://github.com/alliedmodders/sou...ds/map.sp#L144

ReadMapList use flag MAPLIST_FLAG_MAPSFOLDER, on failure to find map list file (like by default "addons/sourcemod/configs/adminmenu_maplist.ini"),
it will list all maps from maps folder.

-

I don't see Ultimate Map Chooser using ReadMapList().

-

There is server command: maps *
__________________
Do not Private Message @me
Bacardi is offline
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 09-02-2020 , 17:40   Re: [TF2] How to see all maps on server?
Reply With Quote #3

Bacardi... I appreciate the response but it doesn't resolve the issue.

Question: How can I get the contents of maplist.txt to be shown when an Admin uses the !admin/server/choose maps menu option?
PC Gamer is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 09-03-2020 , 01:03   Re: [TF2] How to see all maps on server?
Reply With Quote #4

ok.

I just now noticed you have some errors in ...addons/sourcemod/configs/maplists.cfg

- Use "file" key name to point file, under game mod folder. example:
Code:
...
	/* Admin menu, map menu */
	"sm_map menu"
	{
		"file"			"cfg/maplist.txt"
	}
...
- Use "target" key name to point one of keyvalue section inside maplists.cfg or "mapcyclefile" cvar. example:
Code:
"MapLists"
{
	/**
	 * Default requests go right to the mapcyclefile.
	 */
	"default"
	{
		"target"		"mapcyclefile"
	}
	
	/* Admin menu, map menu */
	"sm_map menu"
	{
		"file"			"addons/sourcemod/configs/adminmenu_maplist.ini"
	}
	
	/* Admin menu, map voting menu */
	"sm_votemap menu"
	{
		"file"			"addons/sourcemod/configs/adminmenu_maplist.ini"
	}
	
	/* For the "randomcycle" plugin */
	"randomcycle"
	{
		"target"		"default"
	}
	
	/* For the "mapchooser" plugin */
	"mapchooser"
	{
		"target"		"default"
	}
	
	/* For the "nominations" plugin */
	"nominations"
	{
		"target"		"mapchooser"
	}
}

In game there is convar called "mapcyclefile", you can change map cycle file if you like, by default it's mapcycle.txt
- File works from either ...tf/ folder or ...tf/cfg/ folder.
Code:
"mapcyclefile" = "mapcycle.txt"
 game
 - Name of the .txt file used to cycle the maps on multiplayer servers
---------------------------


About nextmap plugin error.
Either map cycle file is empty, filled wrong map names or file format wrong (new lines characters are wrong type).
Could you upload that file in your post ? maplist.txt and mapcycle.txt




-----

I give you fixed maplists.cfg


*edit
Don't use [UMC3] Ultimate Mapchooser map list umc_mapcycle.txt in config!
It's totally different map list format.
Attached Files
File Type: cfg maplists.cfg (1.3 KB, 92 views)
__________________
Do not Private Message @me

Last edited by Bacardi; 09-03-2020 at 01:06.
Bacardi is offline
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 09-04-2020 , 02:56   Re: [TF2] How to see all maps on server?
Reply With Quote #5

Problem solved. Thanks Bacardi!

Solution was to change from this:
PHP Code:
...
    
/* Admin menu, map menu */
    
"sm_map menu"
    
{
        
"file"            "maplist.txt"
    
}
... 
To this:
PHP Code:
...
    
/* Admin menu, map menu */
    
"sm_map menu"
    
{
        
"file"            "cfg/maplist.txt"
    
}
... 
Which is very odd since the maplist.txt file with all server maps already existed in /tf/ , /tf/cfg/, /tf/sourcemod/configs/ directories. Oh well... It's working now thanks to you Bacardi. Thanks!
PC Gamer is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:54.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode