Raised This Month: $218 Target: $400
 54% 

maplists.cfg Question


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BigBaller
Veteran Member
Join Date: Mar 2004
Location: Everett, WA
Old 03-02-2008 , 13:09   maplists.cfg Question
Reply With Quote #1

Can someone explain how to use the maplists.cfg ?

I use this plugin
http://forums.alliedmods.net/showthread.php?t=56376

Which creates the file maplist.txt in the base mod directory (next the mapcycle.txt). I read how the maplists.cfg file works, is it able to read .txt files in the base mod directory? Or does it need to be a .ini file like the addons/sourcemod/configs/adminmenu_maplist.ini listed. Does it have to be the sourcemod/configs/ directory?

Just looking for some clarification on this.
__________________

BigBaller is offline
Jérémie
Member
Join Date: Feb 2008
Old 03-03-2008 , 10:18   Re: maplists.cfg Question
Reply With Quote #2

maplist.cfg can read any file in a simple text format.

For example, you could have :
Code:
"rockthevote"
{
"file" "/home/anyUser/Another-Dir/andYetAnother/And_some-randomFile.booze"
}
for rtv, it should work.
Jérémie is offline
BAILOPAN
Join Date: Jan 2004
Old 03-03-2008 , 17:43   Re: maplists.cfg Question
Reply With Quote #3

It reads from the base mod folder. But, it only works if a plugin actually uses it. If your plugin doesn't use maplists.cfg (that is, ReadMapList) then it's not a concern for you.

Hrm, I'm not sure if it can read absolute paths though :] if it can without "file://" then it's a bug
__________________
egg
BAILOPAN is offline
BigBaller
Veteran Member
Join Date: Mar 2004
Location: Everett, WA
Old 03-05-2008 , 12:36   Re: maplists.cfg Question
Reply With Quote #4

Quote:
Originally Posted by Error Logs
L 03/04/2008 - 00:08:42: SourceMod error session started
L 03/04/2008 - 00:08:42: Info (map "de_aztec") (file "errors_20080304.log")
L 03/04/2008 - 00:08:42: [SM] Could not parse file "C:\servers\overdosedcss\cstrike\addons\sourc emod\configs\maplists.cfg"
L 03/04/2008 - 00:08:42: [SM] Error on line 63 (col 3): Section beginning without a matching ending
L 03/04/2008 - 00:08:48: Error log file session closed.
L 03/04/2008 - 00:08:49: SourceMod error session started
L 03/04/2008 - 00:08:49: Info (map "de_cbble") (file "errors_20080304.log")
L 03/04/2008 - 00:08:49: [SM] Could not parse file "C:\servers\overdosedcss\cstrike\addons\sourc emod\configs\maplists.cfg"
L 03/04/2008 - 00:08:49: [SM] Error on line 63 (col 3): Section beginning without a matching ending
L 03/04/2008 - 00:08:49: [SM] Could not parse file "C:\servers\overdosedcss\cstrike\addons\sourc emod\configs\maplists.cfg"
L 03/04/2008 - 00:08:49: [SM] Error on line 63 (col 3): Section beginning without a matching ending
L 03/04/2008 - 00:08:49: [SM] Could not parse file "C:\servers\overdosedcss\cstrike\addons\sourc emod\configs\maplists.cfg"
L 03/04/2008 - 00:08:49: [SM] Error on line 63 (col 3): Section beginning without a matching ending
L 03/04/2008 - 00:08:49: [SM] Could not parse file "C:\servers\overdosedcss\cstrike\addons\sourc emod\configs\maplists.cfg"
L 03/04/2008 - 00:08:49: [SM] Error on line 63 (col 3): Section beginning without a matching ending
L 03/04/2008 - 00:18:49: [SM] Could not parse file "C:\servers\overdosedcss\cstrike\addons\sourc emod\configs\maplists.cfg"
L 03/04/2008 - 00:18:49: [SM] Error on line 63 (col 3): Section beginning without a matching ending
L 03/04/2008 - 00:18:55: Error log file session closed.
L 03/04/2008 - 00:18:56: SourceMod error session started
I am now getting that in my error logs. I am confused as to why this is going on so here is the copy of maplists.cfg

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"        "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"     {         "file"      "addons/sourcemod/configs/adminmenu_maplist.ini"     }         /* For the "rockthevote" plugin */     "rockthevote"     {         "file"      "addons/sourcemod/configs/adminmenu_maplist.ini"     }     "autochangemap"     {         "file"      "maplist.txt"     }

Line 63 would be the very last item in the maplists.cfg
__________________

BigBaller is offline
BAILOPAN
Join Date: Jan 2004
Old 03-05-2008 , 16:53   Re: maplists.cfg Question
Reply With Quote #5

Looks like you're missing a closing }
__________________
egg
BAILOPAN is offline
BigBaller
Veteran Member
Join Date: Mar 2004
Location: Everett, WA
Old 03-06-2008 , 16:19   Re: maplists.cfg Question
Reply With Quote #6

AHHHHHHH

you rock BAILOPAN.

I guess that happens when you try to fix your server up during the middle of the night.
__________________

BigBaller is offline
MjrNuT
SourceMod Donor
Join Date: Feb 2008
Location: Under the Beaming CA Sun
Old 04-08-2008 , 19:25   Re: maplists.cfg Question
Reply With Quote #7

Just when I thought I was understanding the language of this stuff...kapooey!!

I don't understand how to, for instance, set a different file for my "mapchooser". For the life of me, per this post and per the Wiki, I have been scouring for the

Just when I thought I was understanding the language of this stuff...kapooey!!

I don't understand how to, for instance, set a different file for my "mapchooser". For the life of me, per this post and per the Wiki, I have been scouring for the following file:

Code:
addons/sourcemod/configs/adminmenu_maplist.ini
to no avail.

So I guess I'm to think of creating this file? If so, then I don't know the usage.

I apologize if it's right in front of me....
__________________
Flames and Ash Gaming
Addon: SM v1.4.0-dev MM 1.8.5-dev
Plugins: Advertisements, Webshortcuts, spray tracer, SBans, RTD, gScramble Balance, misc
MjrNuT is offline
Extreme_One
Veteran Member
Join Date: Nov 2006
Old 04-09-2008 , 05:33   Re: maplists.cfg Question
Reply With Quote #8

If it doesn't exist then create the file in a simple text editor like notepad. Then list the maps you'd like your admins to be able to choose from:

Code:
cs_office
de_dust2
as_dust
fy_scoutknives
__________________
Extreme_One is offline
MjrNuT
SourceMod Donor
Join Date: Feb 2008
Location: Under the Beaming CA Sun
Old 04-09-2008 , 12:17   Re: maplists.cfg Question
Reply With Quote #9

Cheers for the reply!!
__________________
Flames and Ash Gaming
Addon: SM v1.4.0-dev MM 1.8.5-dev
Plugins: Advertisements, Webshortcuts, spray tracer, SBans, RTD, gScramble Balance, misc
MjrNuT is offline
chundo
Senior Member
Join Date: May 2008
Old 08-25-2008 , 16:42   Re: maplists.cfg Question
Reply With Quote #10

Quote:
Originally Posted by BAILOPAN View Post
It reads from the base mod folder. But, it only works if a plugin actually uses it. If your plugin doesn't use maplists.cfg (that is, ReadMapList) then it's not a concern for you.

Hrm, I'm not sure if it can read absolute paths though :] if it can without "file://" then it's a bug
Does this mean it understands URLs (i.e. I could enter a webpage that returns a maplist), or is file:// a special case?
__________________
chundo is offline
Reply


Thread Tools
Display Modes

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 05:08.


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